/* Chat Container */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

/* Chat Window */
#chat-window {
    width: 300px;
    height: 400px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* By default open */
#chat-window.chat-closed {
    display: none;
}

/* Header */
.chat-header {
    background: var(--amucta-teal-blue);
    color: #fff;
    padding: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* Body */
.chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f9f9f9;
}
.chat-message {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
}
.chat-message.bot {
    background: #e2e8f0;
    align-self: flex-start;
}
.chat-message.user {
    background: #bee3f8;
    align-self: flex-end;
}

/* Footer */
.chat-footer {
    display: flex;
    border-top: 1px solid #ddd;
}
.chat-footer input {
    flex: 1;
    border: none;
    padding: 10px;
    outline: none;
}
.chat-footer button {
    background: var(--amucta-blue);
    color: white;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.chat-footer button:hover {
    background: #2c5282;
}

/* Floating Chat Icon */
#chat-icon {
    width: 50px;
    height: 50px;
    background: var(--amucta-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    margin-top: 10px;
}
#chat-icon:hover {
    background: #2c5282;
}

.phone-form-container {
    margin: 20px auto;
    padding: 24px 20px;
    max-width: 340px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.phone-form-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f6ff;
    color: #1769e0;
    font-size: 20px;
}

.phone-form-container h4 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #172033;
}

.phone-form-container p {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.6;
    color: #70798a;
}

.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.phone-input-wrapper i {
    position: absolute;
    left: 14px;
    color: #8b95a7;
    font-size: 14px;
}

.phone-input-wrapper input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 40px;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.2s;
}

.phone-input-wrapper input:focus {
    border-color: #1769e0;
    box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.08);
}

#phone-submit-btn {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: #1769e0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: 0.2s;
}

#phone-submit-btn:hover {
    background: #1258bd;
}

#phone-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.phone-error {
    margin-top: 10px;
    min-height: 16px;
    font-size: 12px;
    color: #dc3545;
}

/* Typing animation */
.chat-message.typing {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
}

.chat-message.typing::before,
.chat-message.typing::after,
.chat-message.typing {
    /* keep normal bubble styling */
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}
