/* Booking Modal Styles */
#booking-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#booking-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.booking-modal-container {
    background: white;
    width: 95%;
    max-width: 1060px;
    height: 650px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    font-family: 'Inter', sans-serif;
}

#booking-modal-overlay.open .booking-modal-container {
    transform: translateY(0);
}

/* Sidebar */
.bm-sidebar {
    width: 30%;
    min-width: 280px;
    border-right: 1px solid #e5e7eb;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.bm-profile-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #f3f4f6;
    margin-bottom: 16px;
    /* Placeholder style if no image */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #6b7280;
}

.bm-host-name {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.bm-event-title {
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.bm-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

/* Description in Sidebar */
.bm-description {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    margin-top: 16px;
    font-style: italic;
    border-left: 3px solid #e5e7eb;
    padding-left: 12px;
}

.bm-main {
    flex: 1;
    display: flex;
    padding: 32px;
    /* overflow-y: auto; */
}

.bm-calendar-col {
    flex: 1;
    /* Approx 40-50% */
    padding-right: 32px;
    border-right: 1px solid #e5e7eb;
}

.bm-form-col {
    flex: 0 0 340px;
    padding-left: 32px;
    display: flex;
    flex-direction: column;
}

.bm-form-col .fade-in,
.bm-slots-list {
    /* padding-left: 0; */
    flex: 1;
}

.bm-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
}

/* Custom Flatpickr Overrides to match design */
.flatpickr-calendar {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 340px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: #0069ff !important;
    /* Calendly Blue */
    border-color: #0069ff !important;
    border-radius: 50%;
}

.flatpickr-months .flatpickr-month {
    height: 40px;
}

.flatpickr-current-month {
    font-size: 110%;
    /* padding-top: 0; */
}

/* Form Styles */
.bm-form-group {
    margin-bottom: 16px;
}

.bm-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.bm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.bm-input:focus {
    border-color: #0069ff;
    box-shadow: 0 0 0 3px rgba(0, 105, 255, 0.1);
}

.bm-submit-btn {
    margin-top: 16px;
    width: 100%;
    padding: 12px;
    background-color: #0069ff;
    color: white;
    font-weight: 700;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.bm-submit-btn:hover {
    background-color: #0055cc;
}

.bm-time-zone {
    margin-top: auto;
    font-size: 12px;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bm-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    z-index: 10;
}

.bm-close-btn:hover {
    color: #111827;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .booking-modal-container {
        flex-direction: column;
        height: 100%;
        max-height: 100%;
        width: 100%;
        border-radius: 0;
    }

    .bm-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 20px;
        flex: 0 0 auto;
    }

    .bm-host-name {
        display: none;
        /* Simplify header on mobile */
    }

    .bm-meta-item {
        display: inline;
        margin-left: 20px;
    }

    .bm-event-title {
        margin-bottom: 0;
        font-size: 18px;
    }

    .bm-main {
        flex-direction: column;
        padding: 20px;
        overflow-y: auto;
    }

    .bm-calendar-col {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .bm-form-col {
        padding-left: 0;
        flex: 1;
    }

    .flatpickr-calendar.inline {
        margin: auto;
    }
}

/* Time Slots & Dynamic Content Styles */
.bm-slots-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    /* max-height: 400px; */
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 30px;
}

.bm-time-slot-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid #0069ff;
    border-radius: 8px;
    background: white;
    color: #0069ff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.bm-time-slot-btn:hover {
    background: #0069ff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 105, 255, 0.2);
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
}

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

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