* {
  margin: 0;
  box-sizing: border-box;
}

#html {
  touch-action: pan-x pan-y;
  height: 100%;
}

body {
  font-family: Arial, sans-serif;
  margin: 2rem;
  background-color: #f4f4f4;
}

#wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

#chatbox {
  display: flex;
  flex-direction: column;
  height: 92%;
  border-radius: 10px;
  padding: 1rem;
  overflow-y: auto;
  background-color: #fff;
  margin-bottom: 1rem;
}

#chatbox .message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;
}

#chatbox .bot-message {
    align-items: flex-start;
}

#chatbox .user-message {
    align-items: flex-end;
}

#chatbox .message .message-text {
    padding: 12px 16px;
    max-width: 75%;
    font-size: 0.95rem;
}

#chatbox .bot-message.thinking .message-text {
    padding: 2px 16px;
}

#chatbox .bot-message .message-text {
    background: #F2F2FF;
    border-radius: 3px 13px 13px 13px;
}

#chatbox .user-message .message-text {
    color: #fff;
    background: #5350C4;
    border-radius: 13px 3px 13px 13px;
}

#chatbox .bot-message .thinking-indicator {
    display: flex;
    gap: 4px;
    padding-block: 15px;
}

#chatbox .bot-message .thinking-indicator .dot {
    width: 7px;
    height: 7px;
    opacity: 0.7;
    border-radius: 50%;
    background: #6F6BC2;
    animation: dotPulse 1.8s ease-in-out infinite;
}

#chatbox .bot-message .thinking-indicator .dot:nth-child(1) {
    animation-delay: 0.2s;
}

#chatbox .bot-message .thinking-indicator .dot:nth-child(2) {
    animation-delay: 0.3s;
}

#chatbox .bot-message .thinking-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 44% {
        transform: translateY(0);
    }

    28% {
        opacity: 0.4;
        transform: translateY(-4px);
    }

    44% {
        opacity: 0.2;
    }
}

pre {
  background-color: #272822;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  position: relative;
}

code {
  font-family: monospace;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fff;
  border: none;
  padding: 2px 6px;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 4px;
}

#input-area {
  display: flex;
  gap: 0.5rem;
}

#user-input {
  flex: 1;
  padding: 0.5rem;
  height: 50px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#user-input:focus {
  outline: none;
  border-color: #7C5AF2;
}

#send-button, #cancel-button {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid #ccc;
  background-color: #fff;
  width: 50px;
}

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: #f44336;
    color: white;
    padding: 12px 16px;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeInOut 3.5s ease forwards;
    font-size: 0.9rem;
}

@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateY(20px); }
    10%  { opacity: 1; transform: translateY(0); }
    90%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}