/* Madrid Bullfighting Season Packages - isolated frontend styles */

body.mbf-season-active {
    overflow: hidden;
}

/* Do not delete or rewrite legacy elements; only suppress them while package mode owns the UI. */
body.mbf-season-active .wc-pao-addon-area,
body.mbf-season-active .wc-pao-addon-seat,
body.mbf-season-active .number-people,
body.mbf-season-active #number-people-container,
body.mbf-season-active .wc_bookings_field_persons,
body.mbf-season-active .wc-bookings-booking-form-button.single_add_to_cart_button {
    visibility: hidden !important;
    pointer-events: none !important;
}

.mbf-season-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    padding: 5vh 24px;
    overflow: hidden;
    box-sizing: border-box;
}
.mbf-season-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.66);
}

.mbf-season-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    height: 90vh;
    max-height: 90vh;
    margin: 0 auto;
    background: #fff;
    color: #111;
    padding: 24px;
    box-sizing: border-box;
    box-shadow: 0 12px 36px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mbf-season-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.mbf-season-header h2 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.2;
}

.mbf-season-date,
.mbf-season-muted,
.mbf-season-package-description {
    color: #666;
}

.mbf-season-error {
    margin: 0 0 16px;
    padding: 12px;
    background: #fff4f4;
    border: 1px solid #d63638;
    color: #8a1f21;
}

.mbf-season-list {
    display: grid;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    margin-right: -2px;
}
.mbf-season-package {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid #ddd;
    padding: 16px;
}

.mbf-season-package-name {
    font-weight: 700;
    font-size: 16px;
}

.mbf-season-package-description {
    margin-top: 3px;
    font-size: 13px;
}

.mbf-season-package-meta {
    margin-top: 6px;
    font-size: 14px;
}

.mbf-season-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mbf-season-qty button {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #222;
    background: #fff;
    color: #111;
    font-size: 22px;
    cursor: pointer;
}

.mbf-season-qty button:disabled {
    opacity: .35;
    cursor: default;
}

.mbf-season-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
}

.mbf-season-summary {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}

.mbf-season-summary-total {
    text-align: right;
}

.mbf-season-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.mbf-season-actions button {
    min-height: 46px;
    padding: 10px 18px;
    border-radius: 0;
    font-weight: 700;
    cursor: pointer;
}

.mbf-season-change-date {
    border: 1px solid #222;
    background: #fff;
    color: #111;
}

.mbf-season-buy {
    border: 1px solid #111;
    background: #111;
    color: #fff;
}

.mbf-season-buy:disabled {
    opacity: .45;
    cursor: default;
}

@media (max-width: 640px) {
    .mbf-season-modal {
        padding: 12px;
    }

    .mbf-season-dialog {
        margin: 18px auto;
        padding: 18px;
    }

    .mbf-season-package {
        grid-template-columns: 1fr;
    }

    .mbf-season-qty {
        justify-content: flex-end;
    }

    .mbf-season-actions {
        flex-direction: column;
    }

    .mbf-season-actions button {
        width: 100%;
    }
}


/* Direct WooCommerce product page / mobile package mode.
   Legacy form stays in the DOM and keeps its own state; package mode only masks
   controls that should not be actionable while the independent package modal owns the purchase. */
body.mbf-season-active-product #wc_bookings_field_persons,
body.mbf-season-active-product .wc_bookings_field_persons,
body.mbf-season-active-product .wc-pao-addon-area,
body.mbf-season-active-product .wc-pao-addon-seat,
/* Multilingual legacy product customization uses numeric Product Add-On classes
   rather than the area/seat slugs used by the English implementation. */
body.mbf-season-active-product .wc-pao-addon-container.wc-pao-addon-647-0,
body.mbf-season-active-product .wc-pao-addon-container.wc-pao-addon-647-1,
body.mbf-season-active-product .wc-pao-addon-no-of-people,
body.mbf-season-active-product #product-addons-total,
body.mbf-season-active-product .wc-bookings-booking-form-button.single_add_to_cart_button,
body.mbf-season-active-product form.cart > button.single_add_to_cart_button {
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 767px) {
    .mbf-season-dialog {
        width: 100%;
        margin: 12px auto;
        padding: 16px;
    }

    .mbf-season-header h2 {
        font-size: 21px;
    }

    .mbf-season-package {
        padding: 14px;
    }

    .mbf-season-package-name {
        font-size: 15px;
    }

    .mbf-season-summary {
        align-items: flex-start;
    }
}


.mbf-season-demand-note {
    margin: 0 0 16px;
    padding: 12px 14px;
    background: #f6f6f6;
    border: 1px solid #e2e2e2;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}


.mbf-season-header,
.mbf-season-demand-note,
.mbf-season-summary,
.mbf-season-actions {
    flex: 0 0 auto;
}

.mbf-season-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.mbf-season-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 30px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    margin: -4px -4px 0 0;
}

.mbf-season-close:hover,
.mbf-season-close:focus {
    background: #f3f3f3;
    outline: none;
}

@media (max-width: 767px) {
    .mbf-season-modal {
        padding: 3vh 12px;
    }

    .mbf-season-dialog {
        width: 100%;
        height: 94dvh;
        max-height: 94dvh;
        margin: 0 auto;
        padding: 16px;
    }

    .mbf-season-close {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }
}

.mbf-season-loading{padding:18px 4px;text-align:center;color:#555;}
