/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* container query */

.activity-finder {
    container-type: inline-size;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

.activity-finder {
    padding: 60px 0;
}

.activity-finder__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 24px;
    margin-top: 32px;
}

.activity-finder__filter {
    position: relative;
}

.activity-finder__select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 280px;
    padding: 12px 44px 12px 20px;
    border: none;
    border-radius: var(--btn-border-radius-lg);
    background-color: var(--gray);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14"><polygon points="2,4 12,4 7,11" fill="%23231f20"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    color: var(--black);
    font-size: 16px;
    cursor: pointer;
}

.activity-finder__clear {
    border: none;
    background: none;
    padding: 0;
    color: var(--purple-md);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

@container (max-width: 760px) {
    .activity-finder__filters {
        flex-direction: column;
        align-items: stretch;
    }

    .activity-finder__select {
        width: 100%;
        min-width: 0;
    }

    .activity-finder__clear {
        align-self: center;
    }
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* RESULTS / CARDS */

.activity-finder__results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
}

.activity-finder__empty {
    text-align: center;
    padding: 40px 0;
}

.activity-finder__card {
    display: flex;
    align-items: stretch;
    height: 162px;
    background: var(--white);
    border-radius: var(--box-border-radius-sm);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.activity-finder__card:hover {
    box-shadow: 0 4px 14px rgba(35, 31, 32, 0.10);
}

.activity-finder__card.is-hidden {
    display: none;
}

/* Pre-animation rest state: card sits invisible-and-translated-down while the
   IntersectionObserver waits for it to scroll into frame. */
.activity-finder__card.is-pending {
    opacity: 0;
    transform: translateY(16px);
}

/* Staggered fade-up — JS swaps is-pending → is-entering when the card
   intersects the viewport, and sets --enter-i so cards entering in the same
   IO tick cascade in 80ms apart. */
.activity-finder__card.is-entering {
    animation: activity-finder-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--enter-i, 0) * 80ms);
}

@keyframes activity-finder-card-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .activity-finder__card.is-pending {
        opacity: 1;
        transform: none;
    }
    .activity-finder__card.is-entering,
    .activity-finder__price-skeleton,
    .activity-finder__skeleton-line {
        animation: none;
    }
}

.activity-finder__date {
    flex: 0 0 auto;
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--blue-dk);
    color: var(--white);
    padding: 20px 12px;
}

.activity-finder__date-month {
    font-family: "Cachet";
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 4px;
}

.activity-finder__date-day {
    font-family: "Cachet";
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
}

.activity-finder__info {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 28px;
    border-top: 1px solid var(--gray);
    border-bottom: 1px solid var(--gray);
}

.activity-finder__name {
    margin: 0 0 12px;
    color: var(--blue-dk);
    text-transform: uppercase;
    font-size: 20px;
}

.activity-finder__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-finder__meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-finder__meta-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: var(--blue-lt);
    display: inline-flex;
}

.activity-finder__meta-icon svg {
    width: 100%;
    height: 100%;
}

.activity-finder__pricing {
    flex: 0 0 auto;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 20px 28px;
    position: relative;
    border-top: 1px solid var(--gray);
    border-bottom: 1px solid var(--gray);
}

/* Vertical divider — solid 1px line, inset from the top/bottom of the
   pricing column so it starts and stops abruptly with white space on each end. */
.activity-finder__pricing::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 1px;
    background: rgba(0, 0, 0, 0.18);
}

.activity-finder__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.activity-finder__price-amt {
    color: var(--blue-dk);
    font-weight: bold;
    font-size: 20px;
}

.activity-finder__spots {
    margin-top: 6px;
    color: var(--blue-lt);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
}

/* Two stacked shimmer bars hint at the member / non-member price layout
   that fillCard() drops in once enrich resolves. */
.activity-finder__price-skeleton {
    display: block;
    width: 140px;
    height: 14px;
    border-radius: 4px;
    background:
        linear-gradient(
            90deg,
            var(--gray) 0%,
            var(--gray) 35%,
            rgba(255, 255, 255, 0.85) 50%,
            var(--gray) 65%,
            var(--gray) 100%
        );
    background-size: 220% 100%;
    animation: activity-finder-shimmer 1.4s linear infinite;
}

.activity-finder__price-skeleton + .activity-finder__price-skeleton {
    width: 100px;
    margin-top: 10px;
    animation-delay: 0.2s;
}

@keyframes activity-finder-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -120% 0; }
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* full-card loading skeleton — shown while a fetch is in flight, swapped for
   real cards on resolve. Reuses the card frame (blue date block, purple arrow)
   so the silhouette matches; the info + price rows shimmer via the gray gradient. */

.activity-finder__card--skeleton {
    cursor: default;
    pointer-events: none;
}

.activity-finder__card--skeleton:hover {
    box-shadow: none;
}

.activity-finder__skeleton-line {
    display: block;
    width: 85%;
    height: 13px;
    margin-bottom: 8px;
    border-radius: 4px;
    background:
        linear-gradient(
            90deg,
            var(--gray) 0%,
            var(--gray) 35%,
            rgba(255, 255, 255, 0.85) 50%,
            var(--gray) 65%,
            var(--gray) 100%
        );
    background-size: 220% 100%;
    animation: activity-finder-shimmer 1.4s linear infinite;
}

.activity-finder__skeleton-line--title {
    width: 60%;
    height: 20px;
    margin-bottom: 16px;
}

.activity-finder__skeleton-line--short {
    width: 45%;
    margin-bottom: 0;
}

.activity-finder__register {
    flex: 0 0 auto;
    width: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--purple-md);
    color: var(--white);
    transition: background 0.2s ease;
}

.activity-finder__register svg {
    width: 22px;
    height: 22px;
}

/* The whole card is the hover unit — the arrow darkens when you're anywhere on it. */
.activity-finder__card:hover .activity-finder__register {
    background: var(--purple-dk);
}

.activity-finder__loadmore-wrap {
    margin-top: 32px;
    text-align: left;
}

.activity-finder__load-more .btn-text .icon {
    font-size: 18px;
}
.activity-finder__load-more .btn-text .icon svg {
    height: 1em;
    width: auto;
}

.activity-finder__status {
    margin-top: 16px;
    text-align: center;
}

@container (max-width: 760px) {
    /* Sections stack here, so the blue/purple end blocks no longer cap the sides.
       Draw the outline on the card itself and drop the per-section edge borders
       (they only formed the desktop top/bottom edge) so nothing doubles up. */
    .activity-finder__card {
        flex-wrap: wrap;
        height: auto;
        border: 1px solid var(--gray);
    }

    .activity-finder__date {
        width: 84px;
    }

    .activity-finder__info {
        border-top: none;
        border-bottom: none;
    }

    .activity-finder__pricing {
        width: 100%;
        border-bottom: none;
        /* keep a single divider between the info and pricing rows */
        border-top: 1px solid var(--gray);
    }

    /* Vertical fade line doesn't fit the stacked mobile layout. */
    .activity-finder__pricing::before {
        display: none;
    }

    .activity-finder__register {
        width: 100%;
        height: 52px;
    }
}
