/**
 * Booking Calendar Styles
 * Modern, responsive calendar interface with theme colors
 */

/* Modal Overlay */
.booking-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.booking-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.booking-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.booking-modal-close:hover {
    background: #f0f0f0;
    color: #000;
    transform: rotate(90deg);
}

.booking-modal-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Calendar Grid */
.booking-calendars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 1024px) {
    .booking-calendars-grid {
        grid-template-columns: 1fr;
    }
}

/* Calendar Card */
.booking-calendar-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid #000000;
    transition: all 0.3s;
}

.booking-calendar-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Calendar Header */
.booking-calendar-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #000000;
    min-height: 230px;
}

.advisor-info {
    text-align: center;
}

.advisor-name {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 8px 0;
}

.advisor-title {
    font-size: 16px;
    color: #000000;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.advisor-tagline {
    font-size: 13px;
    color: #000000;
    margin: 0 0 12px 0;
    font-weight: 400;
    line-height: 1.4;
}

.advisor-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--theme-color);
    margin: 0;
}

/* Calendar Navigation */
.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav-btn {
    background: var(--theme-color);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Calendar Grid */
.calendar-grid {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.past {
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.no-availability {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

.calendar-day.no-availability::before,
.calendar-day.no-availability::after {
    content: '';
    position: absolute;
    width: 120%;
    height: 2px;
    background: #d1d5db;
    top: 50%;
    left: 50%;
    transform-origin: center;
    border-radius: 1px;
}

.calendar-day.no-availability::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.calendar-day.no-availability::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.calendar-day.available {
    background: white;
    color: #1a1a1a;
    border: 2px solid #e5e7eb;
}

.calendar-day.available:hover {
    background: var(--theme-color);
    color: white;
    border-color: var(--theme-color);
    transform: scale(1.05);
}

.calendar-day.today {
    border-color: var(--theme-color);
    font-weight: 700;
}

.calendar-day.selected {
    background: var(--theme-color);
    color: white;
    border-color: var(--theme-color);
}

/* Time Slots */
.time-slots-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.time-slots-container h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.selected-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-color);
    margin-bottom: 16px;
    text-align: center;
    padding: 12px;
    background: rgba(var(--theme-color), 0.1);
    border-radius: 8px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.time-slot-btn {
    background: white;
    border: 2px solid var(--theme-color);
    color: var(--theme-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot-btn:hover {
    background: var(--theme-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-back-to-calendar {
    width: 100%;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    color: #1a1a1a;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back-to-calendar:hover {
    background: #e5e7eb;
}

.loading, .error, .no-slots {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.error {
    color: #dc2626;
}

/* Booking Form Overlay */
.booking-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-in;
}

.booking-form-container {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.booking-form-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.booking-form-close:hover {
    background: #f0f0f0;
    color: #000;
}

.booking-form-container h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
}

/* Booking Summary */
.booking-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-item:last-child {
    border-bottom: none;
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #e5e7eb;
}

.summary-label {
    color: #666;
    font-weight: 500;
}

.summary-value {
    color: #1a1a1a;
    font-weight: 600;
}

/* Form Styles */
.booking-details-form {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-submit-booking {
    width: 100%;
    background: linear-gradient(135deg, #3B82F6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 24px;
}

.btn-submit-booking:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-submit-booking:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Stripe Payment */
.stripe-payment-info {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.stripe-payment-info p {
    margin: 0 0 8px 0;
    color: #1a1a1a;
}

.payment-note {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Form Messages */
.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Consultation Type Selector */
.consultation-type-selector {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.consultation-type-selector label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 6px;
}

.consultation-type-dropdown {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
}

.consultation-type-dropdown:hover {
    border-color: var(--theme-color, #3B82F6);
}

.consultation-type-dropdown:focus {
    outline: none;
    border-color: var(--theme-color, #3B82F6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Consultation Types List on Advisor Card */
.consultation-types-list {
    margin-top: 12px;
    padding: 10px 0;
}

.consultation-type-item {
    padding: 8px 12px;
    margin: 6px 0;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #1f2937;
    border-left: 3px solid var(--theme-color, #3B82F6);
}

.consultation-type-item strong {
    color: #111827;
    font-weight: 600;
}

.type-duration {
    color: #6b7280;
    font-size: 0.85rem;
    margin-left: 4px;
}

/* Free consultation styling */
.consultation-type-item:has(:contains("FREE")),
.consultation-type-item {
    transition: transform 0.2s ease;
}

.consultation-type-item:hover {
    transform: translateX(2px);
}

/* Success Notification */
.booking-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    max-width: 400px;
    transform: translateX(500px);
    transition: transform 0.3s ease-out;
}

.booking-success-notification.show {
    transform: translateX(0);
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #10B981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.booking-success-notification h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    text-align: center;
}

.booking-success-notification p {
    margin: 8px 0;
    color: #666;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-modal-content {
        padding: 24px;
    }
    
    .booking-modal-title {
        font-size: 24px;
    }
    
    .booking-calendars-grid {
        gap: 20px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .booking-form-container {
        padding: 24px;
    }
}
