/* Advanced Homepage Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.6);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden by default */
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.open {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: -0.01em;
}

.chatbot-status {
    margin: 4px 0 0 0;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    animation: blink 2s infinite;
}

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

.chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chatbot-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f7fafc;
}

.message {
    display: flex;
    margin-bottom: 20px;
    padding: 4px 0;
    animation: fadeIn 0.3s ease-out;
}

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

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.message-content {
    max-width: 75%;
    background: white;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.user-message .message-content p {
    color: white;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.message-sender {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    letter-spacing: 0.3px;
}

.user-message .message-sender {
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
}

.bot-message .message-sender {
    color: #374151;
}

.message-content p {
    margin: 0;
    line-height: 1.7;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2d3748;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.message-content p + p {
    margin-top: 12px;
}

.message-content br {
    display: block;
    content: "";
    margin: 8px 0;
}

.message-time {
    display: block;
    font-size: 11px;
    color: #a0aec0;
    margin-top: 6px;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.7);
    text-align: right;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.quick-action-btn {
    padding: 10px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
    letter-spacing: -0.01em;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chatbot-input-container {
    display: flex;
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    resize: none;
    max-height: 120px;
    transition: border-color 0.2s;
    color: #2d3748;
    line-height: 1.5;
}

.chatbot-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.chatbot-input:focus {
    outline: none;
    border-color: #667eea;
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 20px;
    justify-content: center;
    background: #f7fafc;
}

/* Dark mode overrides */
.dark-mode .chatbot-window {
    background: #0f172a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.dark-mode .chatbot-messages {
    background: #0b1220;
}

.dark-mode .message-content {
    background: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark-mode .message-content p {
    color: #e5e7eb;
}

.dark-mode .message-time {
    color: #9ca3af;
}

.dark-mode .chatbot-input-container {
    background: #0f172a;
    border-top: 1px solid #1f2937;
}

.dark-mode .chatbot-input {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb;
}

.dark-mode .chatbot-input::placeholder {
    color: #6b7280;
}

.dark-mode .chatbot-typing {
    background: #0b1220;
}

/* Dark mode for Booking Form */
.dark-mode .booking-form-inline {
    background: #1e293b;
    border: 1px solid #334155;
}

.dark-mode .booking-form-inline h4 {
    color: #f1f5f9;
}

.dark-mode .form-field input,
.dark-mode .form-field select {
    background: #0f172a;
    border-color: #475569;
    color: #f1f5f9;
}

.dark-mode .form-field input::placeholder {
    color: #94a3b8;
}

.dark-mode .form-field input:focus,
.dark-mode .form-field select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.dark-mode .form-field select option {
    background: #1e293b;
    color: #f1f5f9;
}

/* Fix date picker for dark mode in Chrome */
.dark-mode .form-field input[type="date"] {
    color-scheme: dark;
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* Make calendar icon white/visible - clickable */
.dark-mode .form-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0);
    cursor: pointer;
}

/* Ensure the date input text is visible - WHITE text */
.dark-mode .form-field input[type="date"]::-webkit-datetime-edit {
    color: #ffffff !important;
}

.dark-mode .form-field input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    color: #ffffff !important;
}

.dark-mode .form-field input[type="date"]::-webkit-datetime-edit-text {
    color: #ffffff !important;
}

.dark-mode .form-field input[type="date"]::-webkit-datetime-edit-month-field,
.dark-mode .form-field input[type="date"]::-webkit-datetime-edit-day-field,
.dark-mode .form-field input[type="date"]::-webkit-datetime-edit-year-field {
    color: #ffffff !important;
}

/* Placeholder text for date */
.dark-mode .form-field input[type="date"]::placeholder {
    color: #ffffff !important;
    opacity: 1;
}

.dark-mode .booking-confirmation {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dark-mode .booking-confirmation h4 {
    color: #34d399;
}

.dark-mode .booking-confirmation p {
    color: #e2e8f0;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Booking Form Styles */
.booking-form-inline {
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 8px;
}

.booking-form-inline h4 {
    margin: 0 0 16px 0;
    color: #2d3748;
    font-size: 16px;
}

.form-field {
    margin-bottom: 12px;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: #667eea;
}

.booking-submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.booking-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.booking-confirmation {
    text-align: center;
    padding: 20px;
    background: #f0fff4;
    border-radius: 8px;
    margin-top: 8px;
}

.confirmation-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.booking-confirmation h4 {
    margin: 0 0 12px 0;
    color: #38a169;
    font-size: 18px;
}

.booking-confirmation p {
    margin: 8px 0;
    color: #2d3748;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 16px;
        right: 16px;
    }
    
    .chatbot-window {
        position: fixed;
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 16px;
        left: 16px;
        margin: 0 auto;
    }
    
    .message-content {
        max-width: 85%;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .message-content p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .chatbot-messages {
        padding: 16px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .quick-action-btn {
        font-size: 13px;
        padding: 10px;
    }
    
    .chatbot-input-container {
        padding: 12px;
        gap: 10px;
    }
    
    .chatbot-input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 14px;
        min-width: 0; /* Allow shrinking */
        flex: 1;
    }
    
    .chatbot-send-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 12px;
        right: 12px;
    }
    
    .chatbot-window {
        position: fixed;
        width: calc(100vw - 16px);
        height: calc(100vh - 80px);
        bottom: 70px;
        right: 8px;
        left: 8px;
        border-radius: 12px;
    }
    
    .chatbot-header {
        padding: 16px;
    }
    
    .chatbot-header h3 {
        font-size: 16px;
    }
    
    .message-content {
        max-width: 90%;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .chatbot-input-container {
        padding: 10px 12px;
    }
}

/* Scrollbar Styles */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

