/* ============================================
   AI ASSISTANT CHAT WIDGET STYLES
   ============================================ */

/* Container */
#ai-assistant-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Toggle Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: white;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(13, 71, 161, 0.5);
}

.chat-toggle-btn .close-icon {
    display: none;
}

.chat-toggle-btn.active .chat-icon {
    display: none;
}

.chat-toggle-btn.active .close-icon {
    display: block;
}

/* Chat Window */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.chat-window.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    font-weight: 600;
    font-size: 14px;
}

.chat-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

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

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

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

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.message {
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.assistant-message .message-content {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content p {
    margin: 0 0 8px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Link Style used for Resume Download */
.chat-resume-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 16px;
    background-color: #f1f5f9;
    color: #0d47a1;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.chat-resume-link:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.quick-action-btn {
    padding: 8px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #0d47a1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: #0d47a1;
    color: white;
    border-color: #0d47a1;
}

/* Chat Input */
.chat-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.chat-input::placeholder {
    color: #94a3b8;
}

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

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-disclaimer {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }
}

/* Mobile Responsive */
@media screen and (max-width: 480px) {
    #ai-assistant-container {
        bottom: 16px;
        right: 16px;
    }

    .chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 70px;
        right: -8px;
    }

    .chat-toggle-btn {
        width: 56px;
        height: 56px;
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ============================================
   BOOKING WIDGET STYLES
   ============================================ */
.booking-widget {
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    max-width: 100%;
}

.booking-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-step {
    animation: fadeIn 0.3s ease;
}

/* Date Scroll */
.date-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    /* Hide scrollbar */

}

.date-scroll::-webkit-scrollbar {
    display: none;
}

.date-card {
    flex: 0 0 auto;
    width: 60px;
    height: 70px;
    border-radius: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-card:hover {
    border-color: #0d47a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.date-card.active {
    background: #0d47a1;
    border-color: #0d47a1;
    color: white;
}

.card-day {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}

.date-card.active .card-day {
    color: rgba(255, 255, 255, 0.8);
}

.card-date {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.date-card.active .card-date {
    color: white;
}

/* Time Grid */
.time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.time-btn {
    padding: 10px;
    border-radius: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-btn:hover {
    border-color: #0d47a1;
    color: #0d47a1;
    background: #f0f9ff;
}

/* Booking Form */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.booking-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.booking-input:focus {
    border-color: #0d47a1;
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.1);
}

.confirm-btn {
    padding: 10px;
    border-radius: 8px;
    background: #0d47a1;
    color: white;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.confirm-btn:hover {
    background: #1565c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(13, 71, 161, 0.2);
}

/* Navigation */
.back-link {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
}

.back-link:hover {
    color: #0f172a;
    text-decoration: underline;
}

.selected-date-display {
    font-size: 13px;
    color: #0d47a1;
    font-weight: 500;
    margin-bottom: 12px !important;
}

/* Success State */
.booking-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.booking-success h4 {
    color: #0f172a;
    margin: 0 0 8px 0;
}

.final-slot {
    color: #0d47a1;
    font-weight: 600;
    margin: 4px 0;
}

.small-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 12px !important;
}