/**
 * Amaizonia Chatbot Styles
 * Sophisticated chatbot with 3D avatar and multi-language support
 */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.5);
}

.chatbot-toggle::before {
    content: '💬';
    font-size: 28px;
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    max-height: 90vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 10002; /* Above cookie button (10001) and toggle (10000) */
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
}

.chatbot-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chatbot Header */
.chatbot-header {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px 16px 0 0;
    gap: 0.75rem;
}

.avatar-container {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    position: relative;
    min-width: 40px;
    min-height: 40px;
}

#chatbot-avatar {
    width: 100%;
    height: 100%;
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
    border: 1.5px solid #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    display: block;
    visibility: visible;
    opacity: 1;
    background: transparent;
    object-fit: contain;
}

@media (max-width: 480px) {
    #chatbot-avatar {
        max-width: 32px;
        max-height: 32px;
        border-width: 1px;
        box-shadow: 0 1px 4px rgba(255, 215, 0, 0.3);
    }
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

.chatbot-status {
    margin: 0.25rem 0 0 0;
    font-size: 0.75rem;
    color: #4ecdc4;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

.chatbot-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}


.language-selector {
    padding: 0.25rem 0.5rem;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 10px 10px;
    padding-right: 1.5rem;
    min-width: 80px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-selector:hover {
    background-color: rgba(30, 30, 30, 0.95);
    border-color: #ffd700;
}

.voice-toggle-btn {
    padding: 0.4rem 0.5rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    color: #ffd700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

.voice-toggle-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: scale(1.05);
}

.voice-toggle-btn.muted {
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(150, 150, 150, 0.5);
    color: #999;
    opacity: 0.6;
}

.voice-toggle-btn.speaking {
    animation: voicePulse 1.5s ease-in-out infinite;
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
}

@keyframes voicePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0);
    }
}

.language-selector:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.language-selector option {
    background: rgba(20, 20, 20, 0.98);
    color: #fff;
    padding: 0.5rem;
}

.voice-provider-selector {
    padding: 0.25rem 0.5rem;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 10px 10px;
    padding-right: 1.5rem;
    max-width: 150px;
    min-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.35rem;
}

.voice-provider-selector:hover {
    background-color: rgba(30, 30, 30, 0.95);
    border-color: #ffd700;
}

.voice-provider-selector:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.voice-provider-selector option {
    background: rgba(20, 20, 20, 0.98);
    color: #fff;
    padding: 0.5rem;
}

.voice-selector {
    padding: 0.25rem 0.5rem;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 10px 10px;
    padding-right: 1.5rem;
    max-width: 140px;
    min-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-selector:hover {
    background-color: rgba(30, 30, 30, 0.95);
    border-color: #ffd700;
}

.voice-selector:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.voice-selector option {
    background: rgba(20, 20, 20, 0.98);
    color: #fff;
    padding: 0.5rem;
}

.voice-speed-selector {
    padding: 0.25rem 0.5rem;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 4px;
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 10px 10px;
    padding-right: 1.5rem;
    max-width: 120px;
    min-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.35rem;
}

.voice-speed-selector:hover {
    background-color: rgba(30, 30, 30, 0.95);
    border-color: #ffd700;
}

.voice-speed-selector:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.voice-speed-selector option {
    background: rgba(20, 20, 20, 0.98);
    color: #fff;
    padding: 0.5rem;
}

.chatbot-close {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-close:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.message {
    display: flex;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

.user-message .message-content {
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Chatbot Input */
.chatbot-input-container {
    padding: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(10, 10, 10, 0.5);
}

#chatbot-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#chatbot-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

#chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#chatbot-input:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.voice-input-btn {
    padding: 0.75rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #ffd700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.voice-input-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: scale(1.05);
}

.voice-input-btn.listening {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
}

.voice-status {
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    min-height: 20px;
    transition: all 0.3s ease;
}

.voice-status.listening {
    color: #4ecdc4;
    animation: blink 1s ease-in-out infinite;
}

.voice-status.error {
    color: #f44336;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

#chatbot-send {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    transition: all 0.2s ease;
}

#chatbot-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* Chatbot Footer */
.chatbot-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(10, 10, 10, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.book-meeting-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.book-meeting-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.collect-details-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffd700;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    transition: all 0.2s ease;
}

.collect-details-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
}

.connect-agent-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    transition: all 0.2s ease;
    animation: agentPulse 2s ease-in-out infinite;
}

.connect-agent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.5);
    animation: none;
}

@keyframes agentPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(78, 205, 196, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(78, 205, 196, 0);
    }
}

/* Details Form Overlay */
.details-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10003; /* Above chatbot container (10002) to ensure modal appears on top */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.details-form {
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.details-form h3 {
    margin: 0 0 0.75rem 0;
    color: #ffd700;
    font-family: var(--font-brand, 'Playfair Display', serif);
    font-size: 1.5rem;
}

.details-form .form-description {
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

#user-details-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#user-details-form input,
#user-details-form textarea {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
}

#user-details-form input::placeholder,
#user-details-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#user-details-form input:focus,
#user-details-form textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.form-buttons button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-nav, 'Montserrat', sans-serif);
    transition: all 0.2s ease;
}

.form-buttons button[type="submit"] {
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    color: #fff;
}

.form-buttons button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.form-buttons button[type="button"] {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.form-buttons button[type="button"]:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        max-height: 85vh;
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
        width: 56px;
        height: 56px;
    }

    .chatbot-input-container {
        padding: 0.75rem;
    }

    #chatbot-form {
        gap: 0.4rem;
        flex-wrap: nowrap;
    }

    #chatbot-input {
        padding: 0.6rem;
        font-size: 0.85rem;
        min-width: 0;
        flex: 1 1 auto;
    }

    .voice-input-btn {
        padding: 0.6rem;
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    #chatbot-send {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .chatbot-footer {
        padding: 0.6rem;
    }

    .book-meeting-btn,
    .collect-details-btn,
    .connect-agent-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .details-form {
        width: 95%;
        padding: 1.5rem;
    }

    .chatbot-header {
        padding: 0.75rem;
        flex-wrap: wrap;
    }
    
    .chatbot-controls {
        flex-wrap: wrap;
        gap: 0.3rem;
        max-width: 100%;
    }

    .avatar-container {
        width: 45px;
        height: 45px;
        margin-right: 0.85rem;
    }

    .chatbot-info h3 {
        font-size: 1rem;
    }

    .chatbot-controls {
        gap: 0.35rem;
    }

    .voice-toggle-btn {
        padding: 0.35rem 0.4rem;
        font-size: 0.9rem;
        min-width: 28px;
        height: 26px;
    }


    .language-selector {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        padding-right: 1.4rem;
        background-size: 9px 9px;
        background-position: right 0.3rem center;
        min-width: 70px;
        max-width: 100px;
    }
    
    .voice-selector {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        padding-right: 1.4rem;
        background-size: 9px 9px;
        background-position: right 0.3rem center;
        min-width: 90px;
        max-width: 120px;
    }

    .chatbot-close {
        width: 26px;
        height: 26px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
    }

    .chatbot-header {
        border-radius: 0;
        padding: 0.6rem;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .chatbot-controls {
        width: 100%;
        justify-content: flex-start;
        gap: 0.25rem;
    }

    .avatar-container {
        width: 32px;
        height: 32px;
        margin-right: 0.5rem;
        min-width: 32px;
        min-height: 32px;
    }

    .chatbot-info h3 {
        font-size: 0.95rem;
    }

    .chatbot-status {
        font-size: 0.7rem;
    }

    .chatbot-controls {
        gap: 0.3rem;
    }

    .voice-toggle-btn {
        padding: 0.3rem 0.35rem;
        font-size: 0.85rem;
        min-width: 26px;
        height: 24px;
    }

    .language-selector {
        font-size: 0.7rem;
        padding: 0.2rem 0.35rem;
        padding-right: 1.3rem;
        background-size: 8px 8px;
        background-position: right 0.25rem center;
        min-width: 65px;
        max-width: 90px;
        flex: 1 1 auto;
    }
    
    .voice-selector {
        font-size: 0.6rem;
        padding: 0.2rem 0.35rem;
        padding-right: 1.3rem;
        background-size: 8px 8px;
        background-position: right 0.25rem center;
        min-width: 80px;
        max-width: 100px;
        flex: 1 1 auto;
    }

    .chatbot-close {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }

    .chatbot-input-container {
        padding: 0.6rem;
        padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    }

    #chatbot-form {
        gap: 0.3rem;
    }

    #chatbot-input {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .voice-input-btn {
        padding: 0.5rem;
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    #chatbot-send {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .chatbot-footer {
        padding: 0.5rem;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }

    .book-meeting-btn,
    .collect-details-btn,
    .connect-agent-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .chatbot-messages {
        padding: 0.75rem;
    }

    .message-content {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Content Moderation Warnings */
.content-warning-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 193, 7, 0.95);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10003;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.4);
    animation: slideInRight 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.content-termination-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10003;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.4);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .content-warning-badge,
    .content-termination-badge {
        top: 5px;
        right: 5px;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}