:root {
    --primary-color: #4759f9;
    --primary-light: #eef0f5;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body {
    background-color: #f5f7fb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-widget {
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--text-light);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #4759f9 0%, #3b9bfc 100%);
    padding: 1.25rem;
    color: var(--text-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.app-description {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}

.app-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--text-light);
    scroll-behavior: smooth;
}

.message-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.user-container {
    align-self: flex-end;
    align-items: flex-end;
}

.bot-container {
    align-self: flex-start;
    align-items: flex-start;
}

.message {
    padding: 0.875rem 1rem;
    border-radius: 16px;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.25rem;
    word-break: break-word;
    /* Prevents long words from overflowing */
}

.bot-message {
    background: var(--primary-light);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--primary-color);
    color: var(--text-light);
    border-bottom-right-radius: 4px;
}

.feedback-buttons {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    opacity: 0;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.bot-container:hover .feedback-buttons {
    opacity: 1;
}

.feedback-button {
    background: rgba(0, 0, 0, 0.03);
    /* Lighter background */
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Subtle border */
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: #718096;
    /* Muted color */
}

.feedback-button:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.feedback-button.active {
    color: var(--primary-color);
    background-color: rgba(71, 89, 249, 0.1);
}

.chat-input {
    padding: 0.5rem;
    background: var(--text-light);
    border-top: 1px solid var(--primary-light);
}

.input-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    /* Add some padding to the input container */
}

.input-field {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid var(--primary-light);
    border-radius: 12px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(71, 89, 249, 0.1);
}

.button-container {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-button {
    background: var(--primary-color);
    color: var(--text-light);
    flex: 1;
}

.primary-button:hover {
    background: #3b4ad8;
}

.primary-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.support-button {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.875rem 1rem;
}

.support-button:hover {
    background: #e2e4eb;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: 12px;
    width: fit-content;
    margin-bottom: 2rem;
    margin-left: 20px;
}

/* Move to bot end and add a margin */
.bot-container .typing-indicator {
    margin-left: 0;
    /* Reset default margin */
    margin-bottom: 1rem;
    /* Added margin for space */
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #a0aec0;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%,
    60%,
    100% {
        transform: initial;
        opacity: 0.3;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.auth-container {
    width: 100%;
    padding: 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    margin: 15px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
}

.hidden {
    display: none;
}

/* Scrollbar Styling */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.suggested-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.7rem;
}

.suggested-question {
    background-color: #ffffff;
    border: 1px solid #ccc;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
}

.suggested-question:hover {
    background-color: #e0e0e0;
}

.timestamp {
    display: inline-block;
    /* Ensure timestamp is visible */
    font-size: 12px;
    /* Adjust size */
    color: gray;
    /* Make it readable */
    margin-left: 10px;
    /* Add space from message */
}

/* Toster Style */
.toster {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}
.suggested-questions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    margin: 10px;
}

.suggested-question-button {
    background-color: #e2f2ff; 
    border: none;
    color: rgb(0, 0, 0);
    padding: 8px 16px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.suggested-question-button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
}