/* Festival Passes widget — two-panel card (cream content + green price panel).
   Colors sampled from the approved layout:
   cream #FFFCDF, green #4C925B, navy #002239, ink #33333E. */

.pass-type-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 1.5rem auto;
}

.festival-pass-card {
    display: flex;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba( 76, 146, 91, 0.7 );
    background: #4C925B; /* so the clipped right panel corners never show a seam */
}

/* ---- Left: cream content panel ---- */
.festival-pass-content {
    flex: 0 0 60%;   /* consistent cream width (the "Content Width" control overrides) */
    max-width: 60%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* title stays at the top in both states (no jump) */
    background: #FFFCDF;
    color: #002239; /* button navy for header + body text */
    padding: 22px 26px;
    font-family: 'Poppins', sans-serif;
}

.festival-pass-title {
    display: flex;
    align-items: flex-start; /* caret stays with the first line when the title wraps */
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #002239;
    font-family: 'Poppins', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* no pink mobile tap flash */
    -webkit-user-select: none;
    user-select: none;                         /* clicking doesn't pink-select the text */
}

/* No hover/focus/click highlight at all. Kills the theme's pink button state
   (reset.css button:hover/:focus) and the white focus-visible ring
   (reset.css box-shadow:#fff + black outline). !important because those reset
   rules are aggressive. */
.festival-pass-title:hover,
.festival-pass-title:focus,
.festival-pass-title:focus-visible,
.festival-pass-title:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* The title color lives on the span itself (Style control), so it does NOT
   inherit the theme's white-on-hover button color -- no !important needed. */

.festival-pass-title-text {
    flex: 1 1 auto;
    min-width: 0;            /* allow the flex item to shrink so the text wraps */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* nudge the caret down to sit on the title's first line */
.festival-pass-caret {
    margin-top: 0.4rem;
}

.festival-pass-caret {
    flex: 0 0 auto;
    font-size: 1.1rem;
    color: #4C925B;
    transition: transform 0.2s ease;
    transform: rotate( -90deg ); /* collapsed default: points right */
}

.festival-pass-card.is-open .festival-pass-caret {
    transform: rotate( 0deg ); /* open: points down */
}

/* ---- Collapsible body (grid 0fr<->1fr: smooth height animation) ---- */
.festival-pass-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier( 0.4, 0, 0.2, 1 );
}

.festival-pass-card.is-open .festival-pass-body {
    grid-template-rows: 1fr;
}

.festival-pass-body-inner {
    overflow: hidden;
    min-height: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.festival-pass-card.is-open .festival-pass-body-inner {
    opacity: 1;
}

.festival-pass-body p {
    margin: 0.65rem 0 0 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #002239;
}

/* ---- Right: green price panel ---- */
.festival-pass-price-panel {
    flex: 1 1 auto;   /* always fills the remainder of the card, so the split is consistent */
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    background: #4C925B;
    color: #FFFFFF;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.festival-pass-price-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding: 20px 22px;
}

/* price sits ABOVE the all-inclusive line */
.festival-pass-price {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.05;
    color: #FFFFFF;
}

.festival-pass-pricing-note {
    max-width: 220px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #FFFFFF;
}

.festival-buy-now {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: #002239;
    color: #FFFFFF !important;
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;   /* keep "Buy Now" / "Sold Out" on one line for consistent buttons */
    transition: background 0.15s ease;
}

.festival-buy-now:hover,
.festival-buy-now:focus {
    background: #013457;
    color: #FFFFFF !important;
}

/* ---- Collapsed state: compact pricing column ----
   Hide the all-inclusive line and put the price + Buy Now on one row so the
   green column matches the shortened card. */
.festival-pass-card:not(.is-open) .festival-pass-pricing-note {
    display: none;
}

.festival-pass-card:not(.is-open) .festival-pass-price-panel {
    flex-direction: row;
    align-items: stretch;      /* let the button fill the full card height */
    justify-content: flex-end;
    gap: 0;
    padding: 0;                /* so the button can reach the card edges */
}

.festival-pass-card:not(.is-open) .festival-pass-price-inner {
    flex: 1 1 auto;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
}

/* Buy Now flush to the top, bottom and right edges (card overflow clips the
   outer corners to the rounded card). */
.festival-pass-card:not(.is-open) .festival-buy-now {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0 26px;
    border-radius: 0;
}

/* ---- Sold out: strike the price, disable the button ---- */
.festival-pass-card--sold-out .festival-pass-price {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    opacity: 0.8;
}

.festival-buy-now--sold-out {
    background: #51665C !important; /* muted grey-green */
    color: #D7DED9 !important;
    cursor: default;
    pointer-events: none;
}

.festival-buy-now--sold-out:hover,
.festival-buy-now--sold-out:focus {
    background: #51665C !important;
    color: #D7DED9 !important;
}

/* ---- Responsive: stack on narrow screens ---- */
@media only screen and (max-width: 700px) {
    .festival-pass-card {
        flex-direction: column;
    }

    .festival-pass-price-panel {
        flex: 1 1 auto;
        max-width: none;
    }

    /* full-width stacked on mobile; the Content Width % doesn't apply in a column */
    .festival-pass-content {
        flex: 1 1 auto !important;
        max-width: none !important;
    }

    .festival-pass-title {
        font-size: 1.6rem;
    }
}
