/* Zeora Hospitality Chatbot Styles - FIXED VERSION */
:root {
    --zeora-primary: #d4af37;
    --zeora-primary-dark: #b8941f;
    --zeora-primary-light: #e6c659;
    --zeora-secondary: #2c3e50;
    --zeora-accent: #34495e;
    --zeora-white: #ffffff;
    --zeora-gray-50: #f8fafc;
    --zeora-gray-100: #f1f5f9;
    --zeora-gray-200: #e2e8f0;
    --zeora-gray-300: #cbd5e1;
    --zeora-gray-400: #94a3b8;
    --zeora-gray-600: #475569;
    --zeora-gray-700: #334155;
    --zeora-gray-800: #1e293b;
    --zeora-gray-900: #0f172a;
    --zeora-success: #059669;
    --zeora-error: #dc2626;
    --zeora-warning: #f59e0b;
    --zeora-whatsapp: #25D366;
    --zeora-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --zeora-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --zeora-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Chatbot Toggle Button */
.zeora-chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--zeora-primary), var(--zeora-primary-dark));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: var(--zeora-shadow);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zeora-pulse 3s infinite;
    font-size: 24px;
    font-weight: bold;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.zeora-chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zeora-chatbot-toggle:hover::before {
    opacity: 1;
}

.zeora-chatbot-toggle:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: var(--zeora-shadow-xl);
}

.zeora-chatbot-toggle.active {
    background: linear-gradient(135deg, var(--zeora-secondary), var(--zeora-accent));
    animation: none;
    transform: rotate(90deg);
}

.zeora-chatbot-toggle.active:hover {
    transform: scale(1.05) translateY(-2px) rotate(90deg);
}

.zeora-close-icon {
    font-size: 28px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.zeora-chatbot-toggle.active .zeora-close-icon {
    transform: rotate(180deg);
}

@keyframes zeora-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Chatbot Container */
.zeora-chatbot-container {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 380px;
    height: 580px;
    background: var(--zeora-white);
    border-radius: 20px;
    box-shadow: var(--zeora-shadow-xl);
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
    border: 1px solid var(--zeora-gray-200);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.zeora-chatbot-container.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chatbot Header */
.zeora-chatbot-header {
    background: linear-gradient(135deg, var(--zeora-secondary), var(--zeora-accent));
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.zeora-chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.zeora-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.zeora-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zeora-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--zeora-primary), var(--zeora-primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.zeora-brand-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.zeora-status {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.zeora-status::before {
    content: '🟢';
    animation: zeora-blink 2s infinite;
}

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

.zeora-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.zeora-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}

/* Chatbot Body */
.zeora-chatbot-body {
    height: 480px;
    overflow-y: auto;
    padding: 20px;
    background: var(--zeora-gray-50);
    scrollbar-width: thin;
    scrollbar-color: var(--zeora-gray-300) transparent;
    position: relative;
}

.zeora-chatbot-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, var(--zeora-gray-50), transparent);
    pointer-events: none;
    z-index: 1;
}

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

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

.zeora-chatbot-body::-webkit-scrollbar-thumb {
    background: var(--zeora-gray-300);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.zeora-chatbot-body::-webkit-scrollbar-thumb:hover {
    background: var(--zeora-gray-400);
}

/* Messages */
.zeora-message {
    margin-bottom: 16px;
    animation: zeora-fadeInUp 0.5s ease;
}

.zeora-message.bot {
    text-align: left;
}

.zeora-message.user {
    text-align: right;
}

.zeora-message-bubble {
    display: inline-block;
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    transition: all 0.3s ease;
}

.zeora-message.bot .zeora-message-bubble {
    background: var(--zeora-white);
    color: var(--zeora-gray-800);
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--zeora-gray-200);
}

.zeora-message.bot .zeora-message-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent var(--zeora-white) transparent;
    filter: drop-shadow(-1px 1px 1px rgba(0, 0, 0, 0.05));
}

.zeora-message.user .zeora-message-bubble {
    background: linear-gradient(135deg, var(--zeora-primary), var(--zeora-primary-dark));
    color: white;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.25);
}

.zeora-message.user .zeora-message-bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 12px 12px 0;
    border-color: transparent var(--zeora-primary-dark) transparent transparent;
}

/* Typing Indicator */
.zeora-typing-indicator {
    display: none;
    padding: 14px 18px;
    background: var(--zeora-white);
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--zeora-gray-200);
    width: fit-content;
    position: relative;
}

.zeora-typing-indicator::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 12px;
    border-color: transparent transparent var(--zeora-white) transparent;
    filter: drop-shadow(-1px 1px 1px rgba(0, 0, 0, 0.05));
}

.zeora-typing-indicator.active {
    display: block;
    animation: zeora-fadeInUp 0.3s ease;
}

.zeora-typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.zeora-typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--zeora-gray-400);
    border-radius: 50%;
    animation: zeora-typing 1.4s infinite;
}

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

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

@keyframes zeora-typing {
    0%, 60%, 100% { 
        transform: translateY(0);
        background: var(--zeora-gray-400);
    }
    30% { 
        transform: translateY(-8px);
        background: var(--zeora-primary);
    }
}

/* Options buttons - ALL GOLD with white text by default */
.zeora-options {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zeora-option-button {
    /* All buttons are gold with white text by default */
    background: linear-gradient(135deg, var(--zeora-primary), var(--zeora-primary-dark));
    border: 2px solid var(--zeora-primary);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    text-align: left;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    /* Ensure text wraps properly */
    white-space: normal;
    word-wrap: break-word;
    min-height: 44px;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.zeora-option-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.zeora-option-button:hover::before {
    left: 100%;
}

.zeora-option-button.clicked {
    transform: scale(0.96);
    background: var(--zeora-primary-dark);
    border-color: var(--zeora-primary-dark);
    color: white;
}

.zeora-option-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--zeora-gray-100);
    color: var(--zeora-gray-500);
    border-color: var(--zeora-gray-200);
    box-shadow: none;
}

/* Hover states - different colors but all keep white text */
.zeora-option-button.whatsapp:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--zeora-whatsapp), #1ea855);
    color: white;
    border-color: var(--zeora-whatsapp);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transform: translateY(-1px);
}

.zeora-option-button.consultation:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--zeora-primary-light), var(--zeora-primary));
    color: white;
    border-color: var(--zeora-primary-light);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.zeora-option-button.callback:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--zeora-success), #047857);
    color: white;
    border-color: var(--zeora-success);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
}

/* Default hover for buttons without specific class */
.zeora-option-button:hover:not(.disabled):not(.whatsapp):not(.consultation):not(.callback) {
    background: linear-gradient(135deg, var(--zeora-primary-light), var(--zeora-primary));
    color: white;
    border-color: var(--zeora-primary-light);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

/* Forms */
.zeora-input-form {
    margin-top: 16px;
    background: var(--zeora-white);
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--zeora-gray-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.zeora-input-group {
    margin-bottom: 16px;
}

.zeora-input-group:last-of-type {
    margin-bottom: 20px;
}

.zeora-input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--zeora-gray-800);
    font-size: 13px;
    letter-spacing: 0.025em;
}

.zeora-input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--zeora-gray-200);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--zeora-gray-50);
    box-sizing: border-box;
}

.zeora-input-group input:focus {
    outline: none;
    border-color: var(--zeora-primary);
    background: var(--zeora-white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    transform: translateY(-1px);
}

.zeora-submit-button {
    background: linear-gradient(135deg, var(--zeora-primary), var(--zeora-primary-dark));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.zeora-submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.zeora-submit-button:hover::before {
    left: 100%;
}

.zeora-submit-button:hover:not(.zeora-loading) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.zeora-submit-button:active {
    transform: translateY(0);
}

.zeora-submit-button:disabled,
.zeora-submit-button.zeora-loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Error States */
.zeora-error {
    color: var(--zeora-error);
    background: #fee2e2;
    border-color: #fecaca;
}

.zeora-error-message .zeora-message-bubble {
    background: #fee2e2 !important;
    color: var(--zeora-error) !important;
    border-color: #fecaca !important;
}

/* Animations */
@keyframes zeora-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.zeora-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* CHANGED: Much smaller mobile dimensions */
@media (max-width: 768px) {
    .zeora-chatbot-container {
        width: 320px; /* CHANGED: Smaller from 380px to 320px */
        right: 16px;
        bottom: 85px;
        height: 450px; /* CHANGED: Smaller from 580px to 450px */
    }
    
    .zeora-chatbot-body {
        height: 350px; /* CHANGED: Adjusted for smaller container */
        padding: 16px;
    }
    
    .zeora-chatbot-toggle {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .zeora-message-bubble {
        max-width: 90%;
        font-size: 13px;
        padding: 12px 15px;
    }
    
    .zeora-option-button {
        font-size: 12px;
        padding: 10px 14px;
        min-height: 40px;
        line-height: 1.2;
    }
    
    .zeora-input-form {
        padding: 16px;
    }
    
    .zeora-options {
        gap: 6px;
    }
    
    .zeora-chatbot-header {
        padding: 16px;
    }
}

/* CHANGED: Even smaller for very small screens */
@media (max-width: 480px) {
    .zeora-chatbot-container {
        width: 300px; /* CHANGED: Even smaller for phones */
        right: 10px;
        left: 10px;
        bottom: 75px;
        height: 400px; /* CHANGED: Even smaller height */
    }
    
    .zeora-chatbot-body {
        height: 300px; /* CHANGED: Adjusted proportionally */
        padding: 12px;
    }
    
    .zeora-chatbot-toggle {
        right: 10px;
        bottom: 10px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .zeora-message-bubble {
        max-width: 95%;
        font-size: 12px;
        padding: 10px 14px;
    }
    
    .zeora-option-button {
        font-size: 11px;
        padding: 8px 12px;
        min-height: 36px;
        line-height: 1.1;
    }
    
    .zeora-input-form {
        padding: 14px;
    }
    
    .zeora-chatbot-header {
        padding: 14px;
    }
    
    .zeora-brand-text h3 {
        font-size: 14px;
    }
    
    .zeora-status {
        font-size: 11px;
    }
}

@media (max-width: 320px) {
    .zeora-chatbot-container {
        width: calc(100vw - 16px);
        right: 8px;
        left: 8px;
        height: 380px; /* CHANGED: Even smaller for very small screens */
    }
    
    .zeora-chatbot-body {
        height: 280px; /* CHANGED: Proportionally smaller */
        padding: 10px;
    }
    
    .zeora-chatbot-header {
        padding: 12px;
    }
    
    .zeora-input-form {
        padding: 12px;
    }
    
    .zeora-option-button {
        font-size: 10px;
        padding: 6px 10px;
        min-height: 32px;
    }
    
    .zeora-message-bubble {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .zeora-chatbot-toggle {
        border: 3px solid white;
    }
    
    .zeora-option-button {
        border-width: 3px;
    }
    
    .zeora-message-bubble {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .zeora-chatbot-toggle {
        animation: none;
    }
    
    .zeora-chatbot-container {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .zeora-chatbot-container.active {
        transform: none;
    }
    
    .zeora-message {
        animation: none;
    }
    
    .zeora-typing-indicator.active {
        animation: none;
    }
    
    .zeora-typing-dots span {
        animation: none;
    }
    
    .zeora-option-button:hover:not(.disabled) {
        transform: none;
    }
    
    .zeora-submit-button:hover:not(.zeora-loading) {
        transform: none;
    }
    
    .zeora-close-btn:hover {
        transform: scale(1.1);
    }
}