/* Booking Flow Styles */

:root {
    --brand-primary: #6366f1;
    --brand-secondary: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
}

.booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Booking Screens */
.booking-screen {
    display: none;
    animation: slideIn 0.4s ease forwards;
}

.booking-screen.active {
    display: block;
}

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

/* Header */
.booking-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.booking-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.back-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--bg-light);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Content */
.booking-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Timing Options (Step 1) */
.timing-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.timing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    text-align: center;
}

.timing-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.timing-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.timing-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.timing-card p {
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.timing-note {
    display: inline-block;
    font-size: 12px;
    color: var(--brand-primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Form Elements */
.form-section {
    margin-bottom: 24px;
}

.form-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.booking-select,
.booking-input,
.booking-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.booking-select:focus,
.booking-input:focus,
.booking-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.booking-textarea {
    resize: vertical;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--brand-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
}

.btn-secondary:hover {
    background: var(--brand-primary);
    color: white;
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

/* State Displays */
.state-display {
    text-align: center;
    padding: 60px 20px;
}

.pulsating-indicator {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--brand-primary);
    border-radius: 50%;
    animation: pulsate 1.5s ease-in-out infinite;
}

@keyframes pulsate {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Experts Gallery */
.experts-gallery {
    margin-top: 30px;
}

.experts-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.expert-card {
    flex: 0 0 300px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    cursor: pointer;
}

.expert-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}

.expert-card.selected {
    border-color: var(--brand-primary);
    border-width: 3px;
    background: rgba(99, 102, 241, 0.05);
}

.expert-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 600;
}

.expert-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.expert-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
}

.expert-title {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.expert-services {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.service-name {
    font-weight: 500;
}

.service-price {
    color: var(--brand-primary);
    font-weight: 600;
}

.book-expert-btn {
    width: 100%;
    margin-top: 16px;
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.book-expert-btn:hover {
    background: var(--brand-secondary);
}

/* Time Slots */
.timeslots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.timeslot-btn {
    padding: 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 500;
}

.timeslot-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(99, 102, 241, 0.05);
}

.timeslot-btn.selected {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: white;
}

.or-divider {
    text-align: center;
    color: var(--text-secondary);
    margin: 30px 0;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

/* Success Animation */
.success-content {
    text-align: center;
}

.success-animation {
    margin: 40px 0;
}

.checkmark-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s var(--transition-bounce);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.checkmark {
    color: white;
    font-size: 64px;
    font-weight: 700;
    animation: checkmarkAppear 0.3s ease 0.3s forwards;
    opacity: 0;
}

@keyframes checkmarkAppear {
    to {
        opacity: 1;
    }
}

.confirmation-text {
    color: var(--text-secondary);
    margin: 20px 0;
}

.request-summary {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
    font-size: 48px;
}

.star {
    cursor: pointer;
    color: #d1d5db;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #fbbf24;
    transform: scale(1.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 16px;
    margin-top: 30px;
}

.action-buttons button {
    flex: 1;
}

/* Disclaimer */
.disclaimer {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .timing-options {
        grid-template-columns: 1fr;
    }

    .booking-content {
        padding: 24px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .timeslots-container {
        grid-template-columns: 1fr;
    }
}
