/**
 * Booking Form Styles
 * 
 * Design: Fashion Editorial
 * Colors: #232323 (primary), #ffcfd9 (accent pink), #e8b4b8 (secondary pink)
 */

/* ==========================================================================
   Modal Overlay & Container
   ========================================================================== */

.booking-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.booking-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.booking-modal__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.booking-modal__container {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    margin: 20px;
    background-color: #fff;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.booking-modal.is-open .booking-modal__container {
    transform: translateY(0);
}

.booking-modal__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #232323;
    transition: color 0.3s ease;
    z-index: 10;
}

.booking-modal__close:hover {
    color: #e8b4b8;
}

.booking-modal__content {
    padding: 48px;
}

@media (max-width: 640px) {
    .booking-modal__content {
        padding: 32px 24px;
    }
    
    .booking-modal__close {
        top: 16px;
        right: 16px;
    }
}

/* ==========================================================================
   Modal Header
   ========================================================================== */

.booking-modal__header {
    margin-bottom: 32px;
}

.booking-modal__title {
    font-family: var(--font-heading, 'Josefin Sans', sans-serif);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px;
}

.booking-modal__title-main {
    text-transform: uppercase;
    color: #232323;
}

.booking-modal__title-accent {
    font-style: italic;
    font-weight: 400;
    color: #ffcfd9;
}

.booking-modal__subtitle {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Payment Type Selection
   ========================================================================== */

.booking-form__payment-type {
    background-color: #fafafa;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.booking-form__label {
    display: block;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #232323;
    margin-bottom: 12px;
}

.booking-form__radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.booking-form__radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.booking-form__radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease;
}

.booking-form__radio input[type="radio"]:checked {
    border-color: #232323;
}

.booking-form__radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #232323;
    border-radius: 50%;
}

.booking-form__radio-label {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 14px;
    color: #232323;
}

.booking-form__paypal-icon {
    font-size: 12px;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.booking-form__field {
    margin-bottom: 24px;
}

.booking-form__field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-form__price {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: #232323;
}

.booking-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.booking-form__field--wide {
    grid-column: span 1;
}

.booking-form__field--narrow {
    max-width: 100px;
}

@media (max-width: 480px) {
    .booking-form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.booking-form__input,
.booking-form__textarea {
    width: 100%;
    padding: 12px 0;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 16px;
    color: #232323;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e5e5e5;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.booking-form__input::placeholder,
.booking-form__textarea::placeholder {
    color: #999;
}

.booking-form__input:focus,
.booking-form__textarea:focus {
    border-bottom-color: #232323;
    box-shadow: 0 2px 0 0 #232323;
}

.booking-form__textarea {
    resize: vertical;
    min-height: 80px;
}

/* Native select styling */
.booking-form__select {
    width: 100%;
    padding: 12px 0;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 16px;
    color: #232323;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e5e5e5;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23232323' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.booking-form__select:focus {
    border-bottom-color: #232323;
    box-shadow: 0 2px 0 0 #232323;
}

/* ==========================================================================
   Address Fields (Conditional)
   ========================================================================== */

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

.booking-form__address.is-hidden {
    display: none;
}

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

/* ==========================================================================
   Choices.js Custom Styling
   ========================================================================== */

.choices {
    margin-bottom: 0;
}

.choices__inner {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    padding: 12px 0 !important;
    min-height: auto !important;
    font-size: 16px !important;
}

.choices__inner:focus-within {
    border-bottom-color: #232323 !important;
}

.choices__list--single {
    padding: 0 !important;
}

.choices__list--single .choices__item {
    padding: 0 !important;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
    border: 1px solid #e5e5e5 !important;
    border-radius: 0 !important;
    margin-top: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    padding: 0 !important;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background-color: #fff5f7 !important;
}

.choices__placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.choices[data-type*='select-one']::after {
    border-color: #232323 transparent transparent transparent;
    right: 0;
}

/* Course Item in Dropdown */
.course-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.course-option:hover {
    background-color: #fff5f7;
}

.course-option.is-selected {
    background-color: #ffcfd9;
}

.course-option__image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
}

.course-option__info {
    flex: 1;
    min-width: 0;
}

.course-option__title {
    font-family: var(--font-heading, 'Josefin Sans', sans-serif);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #232323;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-option__date {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 11px;
    color: #e8b4b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-option__price {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 16px;
    font-weight: 700;
    color: #232323;
    flex-shrink: 0;
}

/* Selected course display */
.course-selected {
    display: flex;
    align-items: center;
    gap: 12px;
}

.course-selected__image {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.course-selected__title {
    font-size: 14px;
    color: #232323;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.booking-form__submit {
    margin-top: 32px;
    text-align: center;
}

.booking-form__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px 32px;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    background-color: #232323;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.booking-form__button:hover {
    background-color: #4a7cc9;
}

.booking-form__button svg {
    width: 16px;
    height: 16px;
}

.booking-form__button--paypal {
    background-color: #0070ba;
}

.booking-form__button--paypal:hover {
    background-color: #005ea6;
}

.booking-form__footer-text {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-top: 16px;
}

/* ==========================================================================
   Success State
   ========================================================================== */

.booking-form__success {
    text-align: center;
    padding: 48px 24px;
    animation: fadeIn 0.3s ease;
}

.booking-form__success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background-color: #e8f5e9;
    color: #4caf50;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.booking-form__success h3 {
    font-family: var(--font-heading, 'Josefin Sans', sans-serif);
    font-size: 24px;
    font-weight: 700;
    color: #232323;
    margin: 0 0 12px;
}

.booking-form__success p {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Booking Trigger Button
   ========================================================================== */

.booking-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    background-color: #232323;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.booking-trigger:hover {
    background-color: #e8b4b8;
    color: #232323;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.booking-form.is-loading .booking-form__button {
    pointer-events: none;
    opacity: 0.7;
}

.booking-form.is-loading .booking-form__button-text::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ==========================================================================
   Error State
   ========================================================================== */

.booking-form__error {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 14px;
}

/* ==========================================================================
   Body Lock (when modal is open)
   ========================================================================== */

body.modal-open {
    overflow: hidden;
}

/* ==========================================================================
   PayPal Payment Options
   ========================================================================== */

.booking-form__paypal-options {
    margin-bottom: 24px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.booking-form__radio-group--vertical {
    flex-direction: column;
    gap: 12px;
}

.booking-form__radio--card {
    display: block;
    width: 100%;
}

.booking-form__radio--card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.booking-form__radio-card {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-form__radio--card input[type="radio"]:checked + .booking-form__radio-card {
    border-color: #232323;
    background-color: #fafafa;
}

.booking-form__radio-card-title {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #232323;
}

.booking-form__radio-card-price {
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    font-size: 24px;
    font-weight: 700;
    color: #232323;
    margin: 4px 0;
}

.booking-form__radio-card-desc {
    font-size: 12px;
    color: #6c757d;
}

/* PayPal Button Style */
.booking-form__button--paypal {
    background-color: #0070ba;
}

.booking-form__button--paypal:hover {
    background-color: #003087;
}
