.asa-events {
    --asa-green: #77b89d;
    --asa-green-dark: #4f8f75;
    --asa-cream: #f7f3ed;
    --asa-ink: #3f3d39;
    --asa-muted: #77746d;
    --asa-line: #e7e0d6;
    --asa-yellow: #e3b957;
    --asa-red: #d66a5f;
    --asa-blue: #86c7d5;
    max-width: 1040px;
    margin: 0 auto;
    padding: 34px 18px;
    color: var(--asa-ink);
    font-family: "source-sans-3", sans-serif;
}

.asa-events__intro {
    text-align: center;
    margin-bottom: 26px;
}

.asa-events__eyebrow {
    margin: 0 0 6px;
    color: var(--asa-green-dark);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 13px;
}

.asa-events__title {
    margin: 0;
    font-family: "cormorant-garamond", serif;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1;
    font-weight: 700;
}

.asa-events__text {
    margin: 12px auto 0;
    max-width: 620px;
    color: var(--asa-muted);
    font-size: 18px;
}

.asa-events__tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.asa-events__tab {
    border: 1px solid var(--asa-line);
    background: #fff;
    color: var(--asa-ink);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font: inherit;
    box-shadow: 0 5px 16px rgba(45, 38, 31, .06);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.asa-events__tab:hover,
.asa-events__tab.is-active {
    background: var(--asa-green);
    border-color: var(--asa-green);
    color: #fff;
    transform: translateY(-1px);
}

.asa-events__panel { display: none; }
.asa-events__panel.is-active { display: block; }

.asa-events__list {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 16px 42px rgba(45, 38, 31, .12);
    overflow: hidden;
    border: 1px solid var(--asa-line);
}

.asa-event-row {
    border-bottom: 1px solid var(--asa-line);
    position: relative;
}
.asa-event-row:last-child { border-bottom: 0; }

.asa-event-row::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--asa-green);
}
.asa-event-row.is-limited::after { background: var(--asa-yellow); }
.asa-event-row.is-low::after,
.asa-event-row.is-full::after,
.asa-event-row.is-closed::after { background: var(--asa-red); }

.asa-event-row__summary {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 150px;
    gap: 22px;
    width: 100%;
    padding: 24px 28px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    align-items: center;
    font: inherit;
}

.asa-event-row__summary:hover { background: #fbf8f3; }

.asa-event-row__image-wrap {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--asa-cream);
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(45, 38, 31, .15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.asa-event-row__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asa-event-row__image-placeholder {
    color: var(--asa-green-dark);
    font-weight: 700;
}

.asa-event-row__main,
.asa-event-row__side {
    display: flex;
    flex-direction: column;
}

.asa-event-row__date {
    color: var(--asa-green-dark);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.asa-event-row__title {
    font-family: "cormorant-garamond", serif;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.05;
    font-weight: 400;
    color: var(--asa-ink);
}

.asa-event-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    color: var(--asa-muted);
    font-size: 15px;
}

.asa-event-row__excerpt {
    margin-top: 10px;
    color: var(--asa-muted);
    font-size: 15px;
    line-height: 1.45;
}

.asa-event-row__side {
    align-items: flex-end;
    gap: 12px;
}

.asa-event-row__spaces {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background: var(--asa-green);
    font-weight: 700;
    font-size: 14px;
}
.asa-event-row__spaces.is-limited { background: var(--asa-yellow); color: #4b3715; }
.asa-event-row__spaces.is-low,
.asa-event-row__spaces.is-full,
.asa-event-row__spaces.is-closed { background: var(--asa-red); }

.asa-event-row__chevron {
    color: var(--asa-muted);
    font-size: 22px;
    transition: transform .2s ease;
}
.asa-event-row.is-open .asa-event-row__chevron { transform: rotate(180deg); }

.asa-event-row__details {
    background: #fbf8f3;
    border-top: 1px solid var(--asa-line);
}

.asa-event-row__details-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
    padding: 28px;
}

.asa-event-row__description {
    font-size: 17px;
    line-height: 1.65;
    color: var(--asa-ink);
}
.asa-event-row__description p:first-child { margin-top: 0; }

.asa-booking-form {
    background: #fff;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(45, 38, 31, .09);
    border: 1px solid var(--asa-line);
}

.asa-booking-form h3 {
    margin: 0 0 10px;
    font-family: "cormorant-garamond", serif;
    font-size: 31px;
    line-height: 1;
}

.asa-booking-form__note {
    margin: 0 0 18px;
    color: var(--asa-muted);
    font-size: 14px;
}

.asa-booking-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.asa-booking-form label {
    display: block;
    margin-bottom: 14px;
}

.asa-booking-form label span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.asa-booking-form em {
    color: var(--asa-muted);
    font-style: normal;
    font-weight: 400;
}

.asa-booking-form input,
.asa-booking-form textarea {
    width: 100%;
    border: 1px solid var(--asa-line);
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
    background: #fff;
}

.asa-booking-form input:focus,
.asa-booking-form textarea:focus {
    outline: 3px solid rgba(119, 184, 157, .25);
    border-color: var(--asa-green);
}

.asa-booking-form__full { grid-column: 1 / -1; }

.asa-booking-form__button {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: var(--asa-green);
    color: #fff;
    padding: 14px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(79, 143, 117, .25);
}

.asa-booking-form__button:disabled {
    background: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}

.asa-events__empty {
    text-align: center;
    background: #fff;
    border-radius: 22px;
    padding: 36px;
    border: 1px solid var(--asa-line);
    box-shadow: 0 16px 42px rgba(45, 38, 31, .08);
}

@media (max-width: 820px) {
    .asa-event-row__summary {
        grid-template-columns: 64px 1fr;
        gap: 16px;
        padding: 20px;
    }
    .asa-event-row__side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .asa-event-row__image-wrap {
        width: 60px;
        height: 60px;
    }
    .asa-event-row__details-inner {
        grid-template-columns: 1fr;
        padding: 22px;
    }
    .asa-booking-form__grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   ASA Sensory Bookings Frontend v2
   Layout update: expanded event description full width above
   booking form, with the form full width underneath.
   ========================================================== */

.asa-event-row__details-inner {
    display: block !important;
    grid-template-columns: none !important;
    padding: 30px 28px 32px;
}

.asa-event-row__description {
    width: 100%;
    max-width: none;
    margin: 0 0 24px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--asa-line);
    font-size: 17px;
    line-height: 1.7;
}

.asa-event-row__description p:last-child {
    margin-bottom: 0;
}

.asa-booking-form {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.asa-booking-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.asa-booking-form label {
    margin-bottom: 16px;
}

.asa-booking-form__full {
    display: block;
    width: 100%;
}

.asa-booking-form textarea {
    min-height: 120px;
    resize: vertical;
}

.asa-booking-form__agreements,
.asa-booking-form__checkboxes {
    display: grid;
    gap: 10px;
    margin: 4px 0 18px;
}

.asa-booking-form__agreement,
.asa-booking-form__checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 0 !important;
    padding: 12px 14px;
    border: 1px solid var(--asa-line);
    border-radius: 14px;
    background: #fbf8f3;
    font-size: 14px;
    line-height: 1.45;
}

.asa-booking-form__agreement input,
.asa-booking-form__checkbox input,
.asa-booking-form input[type="checkbox"] {
    width: auto;
    min-width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
}

.asa-booking-form__agreement span,
.asa-booking-form__checkbox span {
    display: inline;
    margin: 0;
    font-weight: 400;
}

.asa-booking-form__agreement a,
.asa-booking-form__checkbox a {
    color: var(--asa-green-dark);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (min-width: 900px) {
    .asa-booking-form {
        padding: 28px;
    }

    .asa-booking-form__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .asa-booking-form__grid label:nth-child(1),
    .asa-booking-form__grid label:nth-child(2) {
        grid-column: span 2;
    }

    .asa-booking-form__grid label:nth-child(3),
    .asa-booking-form__grid label:nth-child(4) {
        grid-column: span 2;
    }
}

@media (max-width: 820px) {
    .asa-event-row__details-inner {
        display: block !important;
        padding: 22px;
    }

    .asa-event-row__description {
        margin-bottom: 20px;
        padding-bottom: 18px;
    }

    .asa-booking-form__grid {
        grid-template-columns: 1fr;
    }
}


/* v1.5 additions */
.asa-booking-form__honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.asa-booking-form__closed-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fbf8f3;
    border: 1px solid var(--asa-line);
    color: var(--asa-muted);
    font-size: 14px;
}

.asa-booking-form__agreements a {
    margin-left: 4px;
}


.asa-booking-form__status-message,
.asa-booking-unavailable {
    background: #fff7e6;
    border: 1px solid rgba(227, 185, 87, .45);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 0 0 18px;
    color: var(--asa-ink);
    line-height: 1.5;
}

.asa-booking-form__status-message--full {
    background: #fff7e6;
}

.asa-booking-form--waiting-list .asa-booking-form__button {
    background: var(--asa-yellow);
    color: #4b3715;
    box-shadow: 0 9px 22px rgba(227, 185, 87, .25);
}

.asa-booking-unavailable {
    background: #fff;
    box-shadow: 0 10px 28px rgba(45, 38, 31, .09);
}

.asa-booking-unavailable h3 {
    margin: 0 0 10px;
    font-family: "cormorant-garamond", serif;
    font-size: 31px;
    line-height: 1;
}

.asa-booking-unavailable p {
    margin: 0;
    color: var(--asa-muted);
}

/* v2.3 booking notice tidy-up */
.asa-events__notice {
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 16px 22px;
    border-radius: 18px;
    text-align: center;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: 0 10px 28px rgba(45, 38, 31, .08);
}

.asa-events__notice--success {
    background: #f2fbf7;
    border: 1px solid rgba(119, 184, 157, .45);
    color: #315f4d;
}

.asa-events__notice--error {
    background: #fff4f1;
    border: 1px solid rgba(214, 106, 95, .4);
    color: #8d342d;
}

.asa-events__notice + .asa-events__tabs {
    margin-top: 6px;
}

/* v2.7 - Cancellation page header/mobile menu gap tidy-up
   The cancellation screen is rendered inside the website, but some theme header/menu rules add spacing above the header on this URL.
   Scope this to the booking cancellation page only. */
body.asa-cancel-page,
body.asa-cancel-page #page,
body.asa-cancel-page .site,
body.asa-cancel-page .site-wrapper,
body.asa-cancel-page .page-wrapper,
body.asa-cancel-page .main-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.asa-cancel-page .skip-link,
body.asa-cancel-page a[href="#content"],
body.asa-cancel-page a[href="#main"],
body.asa-cancel-page .screen-reader-text.skip-link {
    display: none !important;
}

body.asa-cancel-page header,
body.asa-cancel-page .site-header,
body.asa-cancel-page .main-header,
body.asa-cancel-page .header,
body.asa-cancel-page .custom-header,
body.asa-cancel-page .asa-header {
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media (max-width: 900px) {
    body.asa-cancel-page .site-header,
    body.asa-cancel-page .main-header,
    body.asa-cancel-page .header,
    body.asa-cancel-page .mobile-header,
    body.asa-cancel-page .mobile-menu,
    body.asa-cancel-page .mobile-navigation,
    body.asa-cancel-page .main-navigation,
    body.asa-cancel-page .nav-menu,
    body.asa-cancel-page .menu-panel,
    body.asa-cancel-page .menu-drawer,
    body.asa-cancel-page .nav-overlay,
    body.asa-cancel-page .offcanvas-menu,
    body.asa-cancel-page .drawer-menu {
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.asa-cancel-page .site-header::before,
    body.asa-cancel-page .site-header::after,
    body.asa-cancel-page .main-header::before,
    body.asa-cancel-page .main-header::after,
    body.asa-cancel-page .mobile-menu::before,
    body.asa-cancel-page .mobile-navigation::before {
        margin-top: 0 !important;
    }
}

/* v2.8 - Cancellation page admin bar mobile header fix
   The theme adds top:46px to .asa-site-header on mobile when the WP admin bar is present.
   On the cancellation page only, force the header/menu to sit flush at the top. */
@media (max-width: 900px) {
    body.asa-booking-cancel-page.admin-bar .asa-site-header,
    body.asa-cancel-page.admin-bar .asa-site-header {
        top: 0 !important;
    }

    body.asa-booking-cancel-page.admin-bar .asa-site-header,
    body.asa-booking-cancel-page.admin-bar header.asa-site-header,
    body.asa-cancel-page.admin-bar .asa-site-header,
    body.asa-cancel-page.admin-bar header.asa-site-header {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* v3.1 - Cancellation page header spacing match
   Keep the admin-bar offset removed on the cancellation page, but preserve the same mobile header breathing room as the main site. */
@media (max-width: 900px) {
    body.asa-booking-cancel-page.admin-bar .asa-site-header,
    body.asa-cancel-page.admin-bar .asa-site-header {
        top: 0 !important;
        margin-top: 0 !important;
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }
}

/* v3.3 - Max places per booking note */
.asa-booking-form__limit-note {
    display: block;
    margin-top: 6px;
    color: var(--asa-muted);
    font-size: 13px;
    line-height: 1.35;
}

/* v4.0 - Ticket type selector */
.asa-ticket-selector {
    grid-column: 1 / -1;
    margin: 4px 0 18px;
    padding: 16px;
    border: 1px solid var(--asa-line);
    border-radius: 16px;
    background: #fbf8f3;
}

.asa-ticket-selector h4 {
    margin: 0 0 12px;
    font-family: "cormorant-garamond", serif;
    font-size: 25px;
    line-height: 1.1;
    color: var(--asa-ink);
}

.asa-ticket-selector__row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 14px;
    align-items: center;
    margin: 0 0 10px !important;
    padding: 12px 0;
    border-bottom: 1px solid var(--asa-line);
}

.asa-ticket-selector__row:last-of-type {
    border-bottom: 0;
}

.asa-ticket-selector__info strong,
.asa-ticket-selector__info em {
    display: block;
}

.asa-ticket-selector__info em {
    margin-top: 3px;
    color: var(--asa-muted);
    font-style: normal;
    font-size: 14px;
}

.asa-ticket-selector__row input[type="number"] {
    text-align: center;
}

.asa-ticket-selector__summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--asa-line);
    font-weight: 700;
}

.asa-booking-form__limit-note {
    display: block;
    margin-top: 6px;
    color: var(--asa-muted);
    font-size: 13px;
    font-style: normal;
}

@media (max-width: 560px) {
    .asa-ticket-selector__row {
        grid-template-columns: 1fr 72px;
    }
}


/* v5.0 - Secure booking checkout page */
.asa-checkout-page-wrap {
    background: #f7f3ed;
    padding: 42px 18px 54px;
}

.asa-checkout {
    --asa-green: #77b89d;
    --asa-green-dark: #4f8f75;
    --asa-cream: #f7f3ed;
    --asa-ink: #3f3d39;
    --asa-muted: #77746d;
    --asa-line: #e7e0d6;
    max-width: 1040px;
    margin: 0 auto;
    color: var(--asa-ink);
    font-family: "source-sans-3", sans-serif;
}

.asa-checkout__intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 28px;
}

.asa-checkout__intro h1 {
    margin: 0;
    font-family: "cormorant-garamond", serif;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1;
    font-weight: 700;
}

.asa-checkout__intro p {
    color: var(--asa-muted);
    font-size: 18px;
    line-height: 1.55;
}

.asa-checkout__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 24px;
    align-items: start;
}

.asa-checkout__card {
    background: #fff;
    border: 1px solid var(--asa-line);
    border-radius: 22px;
    padding: 26px;
    box-shadow: 0 16px 42px rgba(45, 38, 31, .10);
}

.asa-checkout__card h1,
.asa-checkout__card h2,
.asa-checkout__card h3 {
    font-family: "cormorant-garamond", serif;
    color: var(--asa-ink);
}

.asa-checkout__card h1 {
    font-size: 42px;
    line-height: 1;
    margin: 0 0 12px;
}

.asa-checkout__card h2 {
    font-size: 32px;
    line-height: 1;
    margin: 0 0 14px;
}

.asa-checkout__card h3 {
    font-size: 25px;
    line-height: 1;
    margin: 0 0 8px;
}

.asa-checkout__event-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
}

.asa-checkout__summary {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 8px 14px;
    margin: 0 0 24px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--asa-line);
}

.asa-checkout__summary dt {
    font-weight: 700;
    color: var(--asa-green-dark);
}

.asa-checkout__summary dd {
    margin: 0;
    color: var(--asa-ink);
}

.asa-checkout__tickets {
    line-height: 1.7;
}

.asa-checkout__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fbf8f3;
    border: 1px solid var(--asa-line);
    font-size: 18px;
}

.asa-checkout__total strong {
    font-size: 26px;
    color: var(--asa-green-dark);
}

.asa-checkout__method {
    border: 1px solid var(--asa-line);
    border-radius: 18px;
    padding: 18px;
    margin-top: 16px;
    background: #fff;
}

.asa-checkout__method--card {
    background: #fbf8f3;
}

.asa-checkout__method p {
    color: var(--asa-muted);
    line-height: 1.55;
}

.asa-checkout__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: var(--asa-green);
    color: #fff;
    padding: 14px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(79, 143, 117, .25);
}

.asa-checkout__button:hover {
    color: #fff;
    background: var(--asa-green-dark);
}

.asa-checkout__button--disabled,
.asa-checkout__button:disabled {
    background: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}

.asa-checkout__secure-note {
    font-size: 13px;
    margin-bottom: 0;
}

@media (max-width: 860px) {
    .asa-checkout__grid {
        grid-template-columns: 1fr;
    }

    .asa-checkout__summary {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .asa-checkout__card {
        padding: 22px;
    }
}


/* v5.1 Square card payment styles */
.asa-square-card-container {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--asa-line, #e7e0d6);
    border-radius: 14px;
    background: #fff;
}

.asa-square-payment-errors {
    margin: 10px 0 0;
    color: #8d342d;
    font-weight: 700;
    line-height: 1.45;
}

.asa-checkout__button.is-loading {
    opacity: .75;
    cursor: wait;
}


/* v5.2 - Checkout reassurance message */
.asa-checkout__reassurance {
    margin: 18px auto 0;
    max-width: 760px;
    padding: 16px 20px;
    border-radius: 18px;
    background: #f2fbf7;
    border: 1px solid rgba(119, 184, 157, .35);
    color: var(--asa-ink, #3f3d39);
    box-shadow: 0 10px 28px rgba(45, 38, 31, .06);
}

.asa-checkout__reassurance strong {
    display: block;
    margin-bottom: 6px;
    color: var(--asa-green-dark, #4f8f75);
}

.asa-checkout__reassurance p {
    margin: 0;
    line-height: 1.55;
}


.asa-booking-form__consent-note {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    opacity: 0.9;
}
