
/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Chat Toggle Button */
.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: pulse 2s infinite;
    z-index: 1001;
    pointer-events: auto;
    user-select: none;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.6);
}

.chat-toggle:active {
    transform: scale(0.95);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.8);
}

.chat-toggle i {
    font-size: 24px;
    color: white;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f56565;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    animation: bounce 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(79, 172, 254, 0.6), 0 0 0 10px rgba(79, 172, 254, 0.1);
    }
    100% {
        box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Chat Container */
.chat-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: bottom right;
}

.chat-container.open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chat-container.minimized {
    height: 60px;
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chat-container.minimized #minimizeChat {
    display: none;
}

.chat-container.minimized #maximizeChat {
    display: flex !important;
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.bot-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.status {
    font-size: 12px;
    opacity: 0.9;
}

.header-actions {
    margin-left: auto;
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Messages */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-container.minimized .chat-messages {
    display: none;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 100%;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.user-message .message-avatar {
    background: #e2e8f0;
    color: #4a5568;
}

.message-content {
    background: #f7fafc;
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
    font-size: 14px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.message-content p {
    margin: 0;
    line-height: 1.4;
}

.message-time {
    font-size: 10px;
    color: #a0aec0;
    margin-top: 4px;
}

.user-message .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Typing Animation for Bot Messages */
.typing-text {
    overflow: hidden;
    border-right: 2px solid #4facfe;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: #4facfe; }
    51%, 100% { border-color: transparent; }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 10px;
    max-width: 85%;
    align-self: flex-start;
    animation: messageSlideIn 0.3s ease-out;
}

.chat-container.minimized .typing-indicator {
    display: none !important;
}

.typing-dots {
    background: #f7fafc;
    padding: 10px 14px;
    border-radius: 16px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #a0aec0;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Quick Suggestions */
.quick-suggestions {
    padding: 12px 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #e2e8f0;
}

.chat-container.minimized .quick-suggestions {
    display: none;
}

.suggestion-chip {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.suggestion-chip:hover {
    background: #e6fffa;
    border-color: #4facfe;
    color: #4facfe;
    transform: translateY(-1px);
}

.suggestion-chip i {
    font-size: 10px;
}

/* FAQ Suggestion Chips */
.suggestion-chip.faq-suggestion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin: 3px;
    max-width: 100%;
    text-align: left;
}

.suggestion-chip.faq-suggestion:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    border-color: transparent;
}

.suggestion-chip.faq-suggestion .suggestion-number {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    margin-right: 8px;
    font-size: 11px;
}

.suggestion-chip.faq-suggestion .suggestion-text {
    flex: 1;
    line-height: 1.3;
}

.suggestion-chip.faq-suggestion i {
    font-size: 12px;
    margin-right: 6px;
    opacity: 0.9;
}

/* Inline Feedback Buttons */
.feedback-buttons {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: block !important;
    visibility: visible !important;
    opacity: 1;
    transition: all 0.3s ease;
}

.feedback-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.9);
    font-weight: 500;
}

.feedback-btn-inline {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(5, 5, 5, 0.9);
    padding: 8px 14px;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    min-width: 45px;
    justify-content: center;
}

.feedback-btn-inline:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feedback-btn-inline.helpful:hover {
    background: rgba(76, 175, 80, 0.4);
    border-color: #4caf50;
    color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.feedback-btn-inline.not-helpful:hover {
    background: rgba(244, 67, 54, 0.4);
    border-color: #f44336;
    color: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Mobile responsive feedback buttons */
@media (max-width: 768px) {
    .feedback-buttons {
        margin-top: 12px;
        padding-top: 12px;
    }

    .feedback-prompt {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .feedback-prompt span {
        margin-bottom: 5px;
    }

    .feedback-btn-inline {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: 60px;
    }
}

/* Inline Booking Form */
.inline-booking-form {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    border-radius: 20px !important;
    padding: 0 !important;
    margin: 15px 0 !important;
    max-width: 100% !important;
    overflow: hidden;
}

.inline-booking-content {
    padding: 25px;
}

.booking-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    color: white;
}

.booking-header i {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
}

.booking-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.inline-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inline-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.inline-form input,
.inline-form select {
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.inline-form input:focus,
.inline-form select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.inline-form input::placeholder {
    color: #7f8c8d;
}

.inline-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-inline {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-book {
    background: rgba(255, 255, 255, 0.95);
    color: #2980b9;
    border: 2px solid rgba(255, 255, 255, 0.95);
}

.btn-book:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-book:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Booking Success */
.booking-success {
    text-align: center;
    padding: 30px;
    color: white;
}

.booking-success i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #27ae60;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 20px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.booking-success h4 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.booking-success p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.booking-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

.booking-details p {
    margin: 5px 0;
    font-size: 0.95rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .inline-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .inline-form input,
    .inline-form select {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .inline-form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .booking-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .booking-header i {
        font-size: 2rem;
        padding: 15px;
    }
}

/* Chat Input */
.chat-input-container {
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.chat-container.minimized .chat-input-container {
    display: none;
}

.chat-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

#messageInput {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    background: #f7fafc;
}

#messageInput:focus {
    border-color: #4facfe;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.send-button {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Real-time Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    transform: translateY(-100%);
}

.suggestions-dropdown.show {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8fafc;
    color: #2563eb;
}

.suggestion-item.selected {
    background: #eff6ff;
    color: #2563eb;
}

.suggestion-item .suggestion-icon {
    color: #9ca3af;
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.suggestion-item:hover .suggestion-icon {
    color: #2563eb;
}

/* Toast */
.toast {
    display:none !important;
    position: fixed;
    top: 20px;
    right: 20px;
    background: #f44336;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

/* FAQ Update Notification */
.faq-update-notification {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInFromTop 0.5s ease-out;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.faq-update-notification i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.faq-update-notification span {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.close-notification {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.close-notification:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-section h1 {
        font-size: 2rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .chat-widget {
        bottom: 15px;
        right: 15px;
    }

    .chat-container {
        width: calc(100vw - 30px);
        right: -15px;
        bottom: 75px;
        height: 450px;
    }

    .chat-toggle {
        width: 55px;
        height: 55px;
    }

    .chat-toggle i {
        font-size: 22px;
    }

    .message {
        max-width: 90%;
    }

    .quick-suggestions {
        flex-direction: column;
        gap: 6px;
    }

    .suggestion-chip {
        justify-content: center;
        text-align: center;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Hide widget on very small screens */
@media (max-width: 480px) {
    .chat-container {
        width: calc(100vw - 20px);
        right: -10px;
        height: 400px;
    }
}
