/* Mystery Tour Booking — public UI
 * Scoped aggressively to .mtb-booking so the theme/WooCommerce cannot easily
 * override the booking controls. v0.2.4
 */
.mtb-booking {
    --mtb-purple: #a884f4;
    --mtb-purple-dark: #8c63e7;
    --mtb-text: #30323a;
    --mtb-muted: #727783;
    --mtb-border: #d9dce3;
    --mtb-soft: #f7f7f9;
    box-sizing: border-box;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    padding: 18px 20px 20px;
    border: 1px solid #e1e2e6;
    border-radius: 3px;
    background: #fff;
    color: var(--mtb-text) !important;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: none;
}

.mtb-booking *,
.mtb-booking *::before,
.mtb-booking *::after {
    box-sizing: border-box;
}

.mtb-booking .mtb-title {
    margin: 0 0 14px !important;
    padding: 0 !important;
    color: var(--mtb-text) !important;
    font-size: 21px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.mtb-booking .mtb-step {
    margin: 0 0 12px;
}

.mtb-booking .mtb-step-label {
    margin: 0 0 7px;
    color: #454956 !important;
    font-size: 12px;
    font-weight: 700;
}

.mtb-booking .mtb-choice-list {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 6px;
}

/* Reset theme button styling deliberately. */
.mtb-booking button.mtb-choice,
.mtb-booking button.mtb-counter,
.mtb-booking .mtb-counter button {
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    outline: 0;
}

.mtb-booking button.mtb-choice {
    appearance: none;
    -webkit-appearance: none;
    min-height: 30px;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 1px solid var(--mtb-border) !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: #454956 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, color .12s ease;
}

.mtb-booking button.mtb-choice:hover:not(:disabled) {
    border-color: var(--mtb-purple) !important;
    background: #faf8ff !important;
    color: #30284a !important;
}

.mtb-booking button.mtb-choice.is-active,
.mtb-booking button.mtb-choice.is-active:hover {
    border-color: var(--mtb-purple-dark) !important;
    background: var(--mtb-purple) !important;
    color: #fff !important;
}

.mtb-booking button.mtb-choice:focus-visible,
.mtb-booking .mtb-counter button:focus-visible,
.mtb-booking .mtb-add-to-cart:focus-visible {
    outline: 2px solid rgba(140, 99, 231, .38) !important;
    outline-offset: 2px;
}

.mtb-booking button.mtb-choice:disabled,
.mtb-booking button.mtb-choice.is-sold-out {
    opacity: .45;
    cursor: not-allowed;
    background: #f4f4f5 !important;
    color: #777 !important;
}

/* Show names should fit compactly like the original WooCommerce selector. */
.mtb-booking .mtb-shows .mtb-choice {
    max-width: 100%;
    font-size: 10.5px !important;
    white-space: normal;
    text-align: left;
}

.mtb-booking .mtb-dates .mtb-choice,
.mtb-booking .mtb-times .mtb-choice {
    text-align: center;
}

.mtb-booking .mtb-time {
    display: inline-flex;
    min-width: 66px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.mtb-booking .mtb-time strong {
    color: inherit !important;
    font-size: 11px;
    font-weight: 600;
}

.mtb-booking .mtb-time small {
    display: block;
    color: inherit !important;
    opacity: .78;
    font-size: 9px;
    white-space: nowrap;
}

.mtb-booking .mtb-availability-line {
    margin: 0 0 9px;
    color: #4d5260 !important;
    font-size: 11px;
    font-weight: 600;
}

.mtb-booking .mtb-ticket-list {
    display: grid;
    gap: 6px;
}

.mtb-booking .mtb-ticket-row {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--mtb-border);
    border-radius: 3px;
    background: #fff;
    color: var(--mtb-text) !important;
}

.mtb-booking .mtb-ticket-row > div:first-child {
    min-width: 0;
}

.mtb-booking .mtb-ticket-row strong {
    display: block;
    margin: 0 0 2px;
    color: #454956 !important;
    font-size: 11px;
    font-weight: 600;
}

.mtb-booking .mtb-ticket-row > div:first-child > div {
    color: #666c78 !important;
    font-size: 10.5px;
}

.mtb-booking .mtb-counter {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

.mtb-booking .mtb-counter button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #cfd2d9 !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: #474b55 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    cursor: pointer;
}

.mtb-booking .mtb-counter button:hover {
    border-color: var(--mtb-purple) !important;
    background: #faf8ff !important;
    color: var(--mtb-purple-dark) !important;
}

.mtb-booking .mtb-qty {
    min-width: 18px;
    color: #454956 !important;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.mtb-booking .mtb-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 11px;
    color: #5b606c !important;
    font-size: 10.5px;
}

.mtb-booking .mtb-summary strong {
    color: #454956 !important;
}

.mtb-booking .mtb-add-to-cart,
.mtb-booking button.mtb-add-to-cart.button.alt {
    appearance: none;
    -webkit-appearance: none;
    width: 100% !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 8px 14px !important;
    border: 1px solid var(--mtb-purple) !important;
    border-radius: 3px !important;
    background: var(--mtb-purple) !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.mtb-booking .mtb-add-to-cart:hover:not(:disabled),
.mtb-booking button.mtb-add-to-cart.button.alt:hover:not(:disabled) {
    border-color: var(--mtb-purple-dark) !important;
    background: var(--mtb-purple-dark) !important;
    color: #fff !important;
}

.mtb-booking .mtb-add-to-cart:disabled,
.mtb-booking button.mtb-add-to-cart.button.alt:disabled {
    opacity: .55 !important;
    cursor: not-allowed;
}

.mtb-booking .mtb-message {
    min-height: 0;
    margin-top: 8px;
    color: #555b66 !important;
    font-size: 11px;
}

.mtb-booking .mtb-message:empty {
    display: none;
}

.mtb-booking .mtb-message a {
    color: var(--mtb-purple-dark) !important;
    font-weight: 600;
}

.mtb-booking-empty {
    padding: 14px 16px;
}

/* On actual WooCommerce product pages hide the native cart controls when the
 * Mystery Tour selector is enabled. The shortcode in normal pages is unaffected. */
.mtb-booking-enabled form.cart.variations_form,
.mtb-booking-enabled form.cart:not(.mtb-preserve-cart) {
    display: none !important;
}

@media (max-width: 600px) {
    .mtb-booking {
        max-width: 100%;
        padding: 15px 14px 16px;
        font-size: 13px;
    }

    .mtb-booking .mtb-title {
        font-size: 19px !important;
    }

    .mtb-booking .mtb-choice-list {
        gap: 5px;
    }

    .mtb-booking .mtb-shows .mtb-choice {
        flex: 1 1 calc(50% - 5px);
    }

    .mtb-booking .mtb-ticket-row {
        gap: 8px;
        padding: 8px;
    }

    .mtb-booking .mtb-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}
