* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2f5;
    height: 100vh;
}


/* Main application */

.app-container {
    width: 100%;
    max-width: 1100px;
    height: 100vh;
    margin: auto;

    background: white;

    display: flex;
    flex-direction: column;

    box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
}


/* Header */

.chat-header {
    background: #1f4f7a;
    color: white;

    padding: 16px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: white;
    color: #1f4f7a;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    font-weight: bold;
}

.chat-header h1 {
    font-size: 20px;
    margin-bottom: 5px;
}

.status {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 12px;
    opacity: 0.9;
}

.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #55c97a;
}


/* New conversation */

#new-chat-button {
    border: 1px solid rgba(255, 255, 255, 0.5);

    background: transparent;

    color: white;

    padding: 9px 14px;

    border-radius: 7px;

    cursor: pointer;

    font-size: 13px;
}

#new-chat-button:hover {
    background: rgba(255, 255, 255, 0.12);
}


/* Chat */

.chat-container {
    flex: 1;

    overflow-y: auto;

    padding: 28px;

    background: #f7f9fb;
}


/* Messages */

.message {
    display: flex;

    gap: 10px;

    margin-bottom: 20px;

    max-width: 82%;
}

.avatar {
    width: 36px;
    height: 36px;

    min-width: 36px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 11px;
    font-weight: bold;
}

.assistant-message {
    align-items: flex-start;
}

.assistant-message .avatar {
    background: #1f4f7a;
    color: white;
}

.user-message {
    margin-left: auto;
    flex-direction: row-reverse;
}

.user-message .avatar {
    background: #555;
    color: white;
}

.message-content {
    padding: 13px 17px;

    border-radius: 13px;

    line-height: 1.5;

    font-size: 14px;
}

.assistant-message .message-content {
    background: white;

    border: 1px solid #e0e5e9;
}

.user-message .message-content {
    background: #1f4f7a;

    color: white;
}

.message-content p {
    margin-bottom: 9px;
}

.message-content p:last-child {
    margin-bottom: 0;
}


/* Quick options */

.quick-options {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin: 5px 0 25px 46px;
}

.issue-button {
    display: flex;
    align-items: center;
    gap: 8px;

    background: white;

    border: 1px solid #cbd5dd;

    color: #1f4f7a;

    padding: 11px 15px;

    border-radius: 9px;

    font-size: 13px;

    cursor: pointer;

    transition: 0.2s;
}

.issue-button:hover {
    background: #1f4f7a;

    color: white;

    border-color: #1f4f7a;

    transform: translateY(-1px);
}

.issue-button:disabled {
    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}


/* Input */

.input-area {
    display: flex;

    gap: 10px;

    padding: 16px;

    border-top: 1px solid #ddd;

    background: white;
}

#message-input {
    flex: 1;

    padding: 13px 15px;

    border: 1px solid #cbd3da;

    border-radius: 8px;

    outline: none;

    font-size: 14px;
}

#message-input:focus {
    border-color: #1f4f7a;
}

#send-button {
    padding: 0 25px;

    border: none;

    border-radius: 8px;

    background: #1f4f7a;

    color: white;

    font-size: 14px;

    cursor: pointer;
}

#send-button:hover {
    background: #163b5c;
}

#send-button:disabled {
    background: #9ba8b3;

    cursor: not-allowed;
}


/* Typing */

.typing {
    font-size: 13px;

    color: #777;

    font-style: italic;

    margin: 5px 0 15px 46px;
}


/* Mobile */

@media (max-width: 600px) {

    .chat-header {
        padding: 13px 15px;
    }

    .chat-header h1 {
        font-size: 16px;
    }

    #new-chat-button {
        padding: 7px 9px;
        font-size: 11px;
    }

    .chat-container {
        padding: 15px;
    }

    .message {
        max-width: 92%;
    }

    .quick-options {
        margin-left: 0;
    }

    .input-area {
        padding: 10px;
    }

    #send-button {
        padding: 0 16px;
    }
}
/* =========================================
   AI TYPING INDICATOR
========================================= */

.typing-content {
    display: flex;
    align-items: center;
    gap: 5px;
}

.typing-dots {
    display: inline-flex;
    gap: 2px;
}

.typing-dots span {
    animation: typingDot 1.4s infinite;
}

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

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

@keyframes typingDot {

    0%,
    60%,
    100% {
        opacity: 0.3;
    }

    30% {
        opacity: 1;
    }
}