/* ==========================================================================
   Simple Booking - Frontend Styles
   ========================================================================== */

/* --- 1. General & Utility Styles --- */

.sbf-error-message {
    color: #D8000C;
    background-color: #FFD2D2;
    padding: 10px;
    border-radius: 3px;
}

.sbf-success-message {
    color: #4F8A10;
    background-color: #DFF2BF;
    padding: 10px;
    border-radius: 3px;
}

/* Asterisk for required labels */
label.required::after,
.sbf-option-label.required::after {
    content: ' *';
    color: #c00;
    margin-left: 2px;
    font-weight: 700;
}

.sbf-field-hint {
    font-size: 0.8em;
}


/* --- 2. Event List & Widget --- */

.sbf-booking-widget {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sbf-widget-title {
    margin-top: 0;
}

.sbf-event-list.sbf-display-style-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sbf-event-list-item {
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sbf-list-item-title {
    margin: 0;
    font-size: 1em;
    flex-basis: 100%; /* Takes full width on small screens */
}

.sbf-list-item-datetime,
.sbf-list-item-price,
.sbf-list-item-places {
    margin: 0;
    font-size: 0.9em;
    color: #555;
    display: flex;
    align-items: center;
}

.sbf-list-item-places-inline {
    margin-left: auto; /* Pushes the element to the right */
    white-space: nowrap;
}

.sbf-inline-seats {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.8em;
    color: #666;
}


/* --- 3. Modal Base Styles --- */

/* Hidden checkbox — only the message modal still uses the checkbox pattern
   (it auto-opens via `checked` and needs no JS). The booking and revocation
   modals are JS-driven via the `.is-open` class on `.sbf-modal-wrap`. */
.sbf-modal-toggle {
    display: none;
}

/* Full-screen overlay */
.sbf-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 12px; /* prevent edge-to-edge overflow on small screens */
}

/* Show overlay: JS-driven modals (booking/revocation) via .is-open … */
.sbf-modal-wrap.is-open > .sbf-modal-overlay,
.sbf-modal-wrap.is-open .sbf-modal-overlay,
/* … and the checkbox-driven message modal. */
.sbf-modal-toggle:checked ~ .sbf-modal-overlay {
    display: flex;
}

/* Frame — wraps content box and anchors the close button outside it */
.sbf-modal-frame {
    position: relative;
    max-width: 640px;
    width: 100%;
}

/* Modal content box */
.sbf-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-height: 80vh;

    /* dvh tracks the *visible* viewport, so the submit button stays reachable
       when the mobile URL bar or on-screen keyboard shrinks the viewport.
       vh above is the fallback for browsers without dvh support. */
    max-height: 80dvh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

/* Lock background scroll while a modal is open (set by modal-accessibility.js). */
body.sbf-modal-open {
    overflow: hidden;
}

.sbf-close-button {
    appearance: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(40, 40, 40, 0.85);
    color: #fff;
    font-size: 1.3em !important;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
}

.sbf-close-button:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #fff;
}

.sbf-close-button:active {
    transform: translateY(1px);
}

.sbf-close-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}


/* --- 4. Message Modal --- */

.sbf-message-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001; /* Higher than booking modal */
    justify-content: center;
    align-items: center;
}

.sbf-message-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    position: relative;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}

.sbf-message-modal-close-button {
    margin-top: 20px;
    cursor: pointer;
    padding: 12px 24px;
    min-height: 44px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    display: inline-block;
    text-decoration: none;
}


/* --- 5. Buttons --- */

.sbf-open-button {
    appearance: none;
    cursor: pointer;
    padding: 12px 24px;
    min-height: 44px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1.1em;
    font-weight: 500;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sbf-open-button:hover {
    background-color: #005a87;
}

.sbf-open-button:focus-visible,
.sbf-close-button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Button in list view */
.sbf-list-item-button {
    margin-left: auto; /* Pushes button to the right */
}

.sbf-open-button .sbf-list-item-button {
    padding: 8px 15px;
    font-size: 0.9em;
}

/* Submit button inside modal */
.sbf-modal-content input[type="submit"],
.sbf-modal-content .sbf-submit-button {
    width: 100%;
    padding: 12px;
    min-height: 44px;
    background-color: #0073aa;
    color: #FFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-transform: none;
}

.sbf-modal-content input[type="submit"]:hover,
.sbf-modal-content .sbf-submit-button:hover,
.sbf-modal-content .sbf-submit-button:focus {
    background-color: #005a87;
    box-shadow: none;
}

.sbf-submit-field .sbf-submit-button {
    display: inline-block;
    width: 100%;
}


/* --- 6. Form Styles --- */

/* Layout & Typography */
.sbf-modal-body {
    font-size: 0.9em;
}

.sbf-modal-content h2 {
    font-size: 1.3em;
    margin-top: 0;
}

.sbf-modal-content p {
    margin-bottom: 20px;
}

.sbf-form-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.sbf-form-row > p {
    flex: 1 1 200px;
    margin: 0 0 10px 0;
}

.sbf-attendee-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sbf-attendee-field {
    flex: 1 1 100%;
    margin: 0 0 10px 0;
}

.sbf-attendee-field--half {
    flex: 1 1 calc(50% - 10px);
}

.sbf-attendee-field--full {
    flex: 1 1 100%;
}

.sbf-attendee-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.sbf-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sbf-dynamic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sbf-dynamic-field {
    flex: 1 1 100%;
    margin: 0;
}

.sbf-attendee-controls-block {
    flex: 1 1 100%;
    margin: 0;
}

.sbf-attendee-controls-block .sbf-attendees-section {
    margin-top: 6px;
}

.sbf-dynamic-field--half {
    flex: 1 1 calc(50% - 12px);
}

/* Form Fields */
.sbf-modal-content label {
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
    font-size: 0.8em;
}

.sbf-modal-content input[type="text"],
.sbf-modal-content input[type="email"],
.sbf-modal-content input[type="tel"],
.sbf-modal-content input[type="number"],
.sbf-modal-content select,
.sbf-modal-content textarea {
    width: 100%;
    padding: 12px;
    min-height: 44px;
    margin-top: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    font-family: inherit;
}

.sbf-modal-content input[type="checkbox"],
.sbf-modal-content input[type="radio"] {
    width: auto;
    min-width: 20px;
    min-height: 20px;
    margin-right: 8px;
}

.sbf-modal-content input[type="checkbox"] + label,
.sbf-modal-content input[type="radio"] + label {
    display: inline;
    vertical-align: middle;
    font-weight: 400;
    font-size: 0.8em;
    line-height: 1.4;
}

.sbf-option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 10px;
}

.sbf-choice-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sbf-option-label {
    display: block;
    margin-bottom: 3px;
    font-weight: 700;
    font-size: 0.8em;
}

.sbf-choice-item .sbf-choice-label {
    display: inline;
    margin: 0;
    font-weight: 400;
    font-size: 0.8em;
    line-height: 1.4;
    cursor: pointer;
}

.sbf-choice-item input[type="checkbox"],
.sbf-choice-item input[type="radio"] {
    margin-right: 0;
    margin-top: 0;
}

.sbf-field-radio,
/* stylelint-disable-next-line selector-class-pattern -- class is generated from the field-type key `checkbox_group`. */
.sbf-field-checkbox_group {
    padding-bottom: 8px;
}

.sbf-modal-content .sbf-dynamic-field.sbf-field-checkbox {
    margin: 0 0 20px;
}

.sbf-conditional-hidden {
    display: none !important;
}

.sbf-hidden {
    display: none;
}

.sbf-attendee-controls-inline {
    margin: 10px 0;
}

.sbf-attendee-controls-inline .sbf-controls-row {
    margin-top: 6px;
}

.sbf-ticket-type label {
    font-size: 0.8em;
}

/* Attendees Section */
.sbf-contact-section h4, .sbf-attendees-section h4 {
    margin: 10px 0;
}

.sbf-attending-toggle {
    margin-top: -5px;
}

.sbf-controls-row {
    display: flex;
    gap: 10px;
    margin: 6px 0 12px 0;
    align-items: center;
}

.sbf-add-attendee {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    min-height: 44px;
    background-color: #f6f7f7;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    color: #1d2327;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}

.sbf-add-attendee:hover {
    background-color: #eceff0;
}

.sbf-submit-row {
    margin: 18px 0;
}

.sbf-coupon-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 700;
}

.sbf-coupon-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sbf-coupon-controls input[type="text"] {
    flex: 1 1 auto;
}

.sbf-add-attendee:active {
    transform: translateY(1px);
}

.sbf-attendees-list .sbf-attendee-row {
    border: 1px dashed #ddd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    position: relative;
}

.sbf-attendees-list .sbf-remove-attendee {
    appearance: none;
    float: right;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #d0d0d0;
    background: #f5f5f5;
    color: #444;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}

.sbf-attendees-list .sbf-remove-attendee:hover {
    background: #e8e8e8;
    color: #8b0000;
    border-color: #c8c8c8;
}

.sbf-attendees-list .sbf-remove-attendee:active {
    transform: translateY(1px);
}

/* Consents Section */
.sbf-modal-content .sbf-consents {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sbf-modal-content .sbf-consents p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sbf-modal-content .sbf-consents p label {
    margin: 0;
    line-height: 1.35;
}


/* --- 7. Coupon Styles --- */

.sbf-coupon-field {
    margin-top: 10px;
}

.sbf-apply-coupon {
    appearance: none;
    display: inline-block;
    white-space: nowrap;
    padding: 12px 16px;
    min-height: 44px;
    background-color: #0073aa;
    border: 1px solid #006a9b;
    border-radius: 4px;
    color: #fff;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
    margin-top: 5px;
}

.sbf-apply-coupon:hover {
    background-color: #005a87;
    border-color: #00517a;
}

.sbf-apply-coupon:active {
    transform: translateY(1px);
}

.sbf-coupon-message {
    font-size: 0.9em;
    margin-top: 5px;
}

.sbf-coupon-field .sbf-coupon-message {
    margin-left: 0;
    display: block;
}

.sbf-coupon-success {
    color: #4F8A10;
}

.sbf-coupon-error {
    color: #D8000C;
}


/* --- 8. Pricing Summary Styles --- */

.sbf-price-summary {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.sbf-price-summary .sbf-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0;
}

.sbf-price-summary .sbf-summary-line span {
    display: inline-block;
}

.sbf-price-summary .sbf-summary-line.sbf-total {
    margin-top: 8px;
    font-weight: 700;
}

.sbf-price-summary .sbf-capacity-warning {
    margin-top: 6px;
    color: #8b0000;
}

.sbf-summary-note {
    font-size: 0.8em;
    color: #666;
}

/* --- 9. Loading & Spinner Styles --- */

.sbf-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: sbf-spin 1s linear infinite;
    z-index: 1002;
}

@keyframes sbf-spin {

    0% { transform: translate(-50%, -50%) rotate(0deg); }

    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Loading state on form */
.sbf-booking-form.sbf-loading {
    opacity: 0.5;
    pointer-events: none;
}

.sbf-booking-form.sbf-loading .sbf-spinner {
    display: block;
}


/* --- 10. Responsive Adjustments --- */

/* Small mobile devices (< 480px) */
@media (max-width: 479px) {

    .sbf-modal-content {
        padding: 20px 16px;
        max-height: 90vh;
        max-height: 90dvh;
    }

    .sbf-modal-overlay {
        padding: 8px;
    }

    /* Stack form elements vertically on very small screens */
    .sbf-attendee-field--half {
        flex: 1 1 100%;
    }

    .sbf-dynamic-field--half {
        flex: 1 1 100%;
    }

    /* Full-width buttons on small screens */
    .sbf-add-attendee,
    .sbf-apply-coupon {
        width: 100%;
        justify-content: center;
    }

    .sbf-coupon-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sbf-coupon-controls input[type="text"] {
        width: 100%;
    }
}

/* Tablets and larger mobile devices (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {

    .sbf-modal-content {
        padding: 24px;
    }

    /* Keep half-width fields on medium screens */
    .sbf-attendee-field--half {
        flex: 1 1 calc(50% - 5px);
    }

    .sbf-dynamic-field--half {
        flex: 1 1 calc(50% - 6px);
    }
}

/* Desktop and larger screens (768px+) */
@media (min-width: 768px) {

    /* Event list item adjustments */
    .sbf-list-item-title {
        flex-basis: auto; /* Auto width on larger screens */
        margin-right: 15px;
        font-size: 1em;
    }

    .sbf-list-item-datetime {
        flex-grow: 1; /* Allows datetime to take available space */
    }

    .sbf-modal-content {
        padding: 30px;
    }
}

/* Large desktops (1024px+) */
@media (min-width: 1024px) {

    .sbf-modal-content {
        max-width: 720px;
    }
}

/* ============================================
   Revocation form ([sbf_revocation_form])
   ============================================ */
.sbf-revocation-form-wrap { max-width: 560px; }

.sbf-revocation-form .sbf-revocation-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }

.sbf-revocation-form .sbf-revocation-field label { font-weight: 600; }

.sbf-revocation-form .sbf-revocation-field input,
.sbf-revocation-form .sbf-revocation-field textarea { min-height: 44px; padding: 8px 10px; font: inherit; box-sizing: border-box; width: 100%; }

.sbf-revocation-form .sbf-revocation-field textarea { min-height: 96px; resize: vertical; }

.sbf-revocation-form .sbf-revocation-intro { margin: 0 0 16px; }

.sbf-required-marker { color: #b32d2e; }

.sbf-revocation-submit { margin-top: 8px; }

.sbf-revocation-submit-btn { min-height: 44px; padding: 10px 20px; font: inherit; cursor: pointer; }

.sbf-revocation-result { margin: 0 0 16px; padding: 12px 16px; border-radius: 4px; border: 1px solid transparent; }

.sbf-revocation-result.sbf-revocation-success { background: #edfaef; border-color: #b6e3bf; color: #1f5b2c; }

.sbf-revocation-result.sbf-revocation-error { background: #fdecea; border-color: #f5b7b1; color: #7a1f17; }

.sbf-revocation-result p { margin: 0 0 10px; }

.sbf-revocation-result p:last-child { margin-bottom: 0; }

.sbf-revocation-check-mail { font-size: 0.95em; }

.sbf-revocation-echo {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 4px 16px;
    margin: 12px 0 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    font-size: 0.9em;
}

.sbf-revocation-echo dt { font-weight: 600; margin: 0; }

.sbf-revocation-echo dd { margin: 0; word-break: break-word; }

/* Revocation modal trigger — render as a subtle text link, not a primary button,
   so it does not compete visually with the booking CTA. */
.sbf-widget-revocation { margin-top: 12px; }

.sbf-revocation-modal-wrap .sbf-revocation-modal-trigger.sbf-open-button {
    background: transparent;
    color: #0073aa;
    padding: 12px 2px;
    min-height: 44px;
    border: none;
    border-radius: 0;
    font-size: 0.95em;
    font-weight: 400;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.sbf-revocation-modal-wrap .sbf-revocation-modal-trigger.sbf-open-button:hover,
.sbf-revocation-modal-wrap .sbf-revocation-modal-trigger.sbf-open-button:focus {
    background: transparent;
    color: #005a87;
    text-decoration: none;
}

/* Ensure the trigger remains keyboard-reachable with a visible focus ring. */
.sbf-revocation-modal-wrap .sbf-revocation-modal-trigger.sbf-open-button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Cancellation policy disclosure shown above the submit button. */
.sbf-cancellation-policy {
    margin: 12px 0;
    padding: 8px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    background: #fafafa;
}

.sbf-cancellation-policy > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    padding: 4px 0;
}

.sbf-cancellation-policy > summary::-webkit-details-marker {
    display: none;
}

.sbf-cancellation-policy > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 6px;
    transition: transform .15s ease;
}

.sbf-cancellation-policy[open] > summary::before {
    transform: rotate(90deg);
}

.sbf-cancellation-policy__body {
    margin-top: 8px;
    font-size: 0.95em;
}

.sbf-cancellation-policy > summary:focus,
.sbf-cancellation-policy > summary:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Honeypot field — hidden off-screen, never visible to humans. */
.sbf-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

/* Booking-modal sub-title heading (h4) keeps the visual weight of the previous h3. */
.sbf-modal-content .sbf-modal-subtitle {
    font-size: 1.1em;
    margin-top: 0.6em;
    margin-bottom: 0.4em;
}

/* ============================================
   Radio / Checkbox group fieldsets (WCAG 1.3.1)
   ============================================ */
.sbf-option-fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 12px;
}

.sbf-option-fieldset > .sbf-option-label {
    padding: 0;
    display: inline-block;
    margin-bottom: 4px;
}

/* ============================================
   Accessibility: visible focus rings (WCAG 2.4.7)
   ============================================ */

/* Form inputs in the booking modal. */
.sbf-modal-content input[type="text"]:focus,
.sbf-modal-content input[type="email"]:focus,
.sbf-modal-content input[type="tel"]:focus,
.sbf-modal-content input[type="number"]:focus,
.sbf-modal-content select:focus,
.sbf-modal-content textarea:focus,
.sbf-modal-content input[type="checkbox"]:focus,
.sbf-modal-content input[type="radio"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-color: #0073aa;
}

/* Revocation form inputs (inline + modal). */
.sbf-revocation-form input:focus,
.sbf-revocation-form textarea:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
    border-color: #0073aa;
}

/* Coupon apply button. */
.sbf-coupon-controls .sbf-apply-coupon:focus,
.sbf-coupon-controls .sbf-apply-coupon:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Add-attendee + remove-attendee buttons. */
.sbf-add-attendee:focus,
.sbf-add-attendee:focus-visible,
.sbf-attendees-list .sbf-remove-attendee:focus,
.sbf-attendees-list .sbf-remove-attendee:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Primary open button (used for Booking modal and Listings). */
.sbf-open-button:focus,
.sbf-open-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
    box-shadow: 0 0 0 2px #0073aa;
}

/* ────────────────────────────────────────────────────────────────────────
   Duplicate-attendee warning popup (rendered dynamically by duplicate-check.js).
   ──────────────────────────────────────────────────────────────────────── */
.sbf-duplicate-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbf-duplicate-popup {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sbf-duplicate-popup__title {
    margin: 0 0 16px 0;
    font-size: 1.2em;
    color: #333;
}

.sbf-duplicate-popup__message {
    margin: 0 0 20px 0;
    color: #555;
    line-height: 1.5;
}

.sbf-duplicate-popup__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sbf-duplicate-popup__btn {
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.sbf-duplicate-popup__btn--primary {
    border: none;
    background: #0073aa;
    color: #fff;
}

.sbf-duplicate-popup__btn--secondary {
    border: 1px solid #ccc;
    background: #f7f7f7;
    color: #333;
}

.sbf-duplicate-popup__btn--cancel {
    border: 1px solid #ccc;
    background: #f7f7f7;
    color: #666;
}

/* Submit-button dimmed state — set via .sbf-is-busy rather than inline opacity. */
.sbf-submit-button.sbf-is-busy,
button[type="submit"].sbf-is-busy {
    opacity: 0.6;
}

/* Sold-out warning rendered by price-handlers.js when no ticket is selected. */
.sbf-ticket-warning {
    color: #c00;
    font-size: 0.9em;
    margin-top: 0.5em;
    padding: 0.5em;
    background: #fff5f5;
    border: 1px solid #fcc;
    border-radius: 4px;
}

/* Coupon AJAX message colors (replaces inline style.color writes). */
.sbf-coupon-message--success { color: #008000; }

.sbf-coupon-message--error   { color: #f00; }

.sbf-coupon-message--info    { color: #00f; }
