/* ===== Accessibility ===== */

.pf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Loading States ===== */

#pf-results-container,
#ef-results-container {
    transition: opacity 0.2s ease;
}

#pf-results-container.pf-loading,
#ef-results-container.pf-loading {
    opacity: 0.4;
    pointer-events: none;
}

.pf-spinner {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

.pf-spinner.active {
    display: block;
}

.pf-spinner::after {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #ccc;
    border-top-color: #4b2e83;
    border-radius: 50%;
    animation: pf-spin 0.6s linear infinite;
}

@keyframes pf-spin {
    to { transform: rotate(360deg); }
}

/* ===== Filter Sidebar ===== */

#product-finder-container .col-md-4,
#event-finder-container aside {
    background: #f7f6f2;
    border: 1px solid #e3e3e3;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

#product-finder-container .col-md-4 > .form-group,
#event-finder-container aside > .form-group {
    margin-bottom: 0;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

#product-finder-container .col-md-4 > .form-group:first-child,
#event-finder-container aside > .form-group:first-child {
    padding-top: 0;
}

#product-finder-container .col-md-4 > .form-group:last-of-type,
#event-finder-container aside > .form-group:last-of-type {
    border-bottom: none;
}

/* Filter group headings */
#product-finder-container .form-group > label,
#event-finder-container .form-group > label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #4b2e83;
    margin-bottom: 0.5rem;
    display: block;
}

/* Search input label */
#product-finder-container label[for="pf-search"],
#event-finder-container label[for="event-search-query"] {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #4b2e83;
}

/* Checkbox container - remove default indent */
#product-finder-container .pl-2,
#event-finder-container .pl-2 {
    padding-left: 0 !important;
}

/* Custom checkboxes */
#product-finder-container .form-check,
#product-finder-container .form-check.mb-1,
#event-finder-container .form-check,
#event-finder-container .form-check.mb-1 {
    padding: 0 !important;
    margin: 0 0 0.5rem 0 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.25rem;
}

#product-finder-container .collapse,
#product-finder-container .collapsing,
#event-finder-container .collapse,
#event-finder-container .collapsing {
    margin: 0.25rem 0 0.5rem 0 !important;
    padding: 0 0 0 1.5rem !important;
    overflow: hidden;
}

#product-finder-container .form-check-input,
#event-finder-container .form-check-input {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem;
    margin: 0 !important;
    border: 2px solid #aaa !important;
    border-radius: 2px !important;
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: #fff !important;
    background-image: none !important;
    position: static !important;
    float: none !important;
}

#product-finder-container .form-check-input:checked,
#event-finder-container .form-check-input:checked {
    background-color: #4b2e83 !important;
    border-color: #4b2e83 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-size: 20px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* The UW WP theme (bootstrap.css) adds content:'?' via #page input[type=checkbox]:checked:before
   which renders as a stray character on top of our custom checkbox. Suppress it. */
#product-finder-container .form-check-input:checked::before,
#event-finder-container .form-check-input:checked::before {
    content: '' !important;
    display: none !important;
}

#product-finder-container .form-check-input:focus,
#event-finder-container .form-check-input:focus {
    outline: 2px solid #b7a57a;
    outline-offset: 1px;
    box-shadow: none !important;
}

#product-finder-container .form-check-label,
#event-finder-container .form-check-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
}

#product-finder-container .form-check-label:hover,
#event-finder-container .form-check-label:hover {
    color: #4b2e83;
}

/* Expand/collapse toggle */
#product-finder-container .show-children-toggle,
#event-finder-container .show-children-toggle {
    font-size: 11px;
    color: #1a62c7;
    text-decoration: none;
    padding: 0 !important;
    margin: 0 0 0 auto !important;
    line-height: 1.4;
    white-space: nowrap;
    border: none;
    background: none;
    height: auto;
}

#product-finder-container .show-children-toggle:hover,
#event-finder-container .show-children-toggle:hover {
    color: #4b2e83;
    text-decoration: underline;
}

/* Two-column card layout override (lg breakpoint) */
@media (min-width: 992px) {
    .pf-cols-2 > .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* EventFolder uses <main id="primary" class="...col-md-8"> as the right column.
   The UW WP theme has `@media (max-width:991px) { #primary { width:100% } }` which
   collapses the events results below the filter sidebar on iPad portrait. Restore
   the col-md-8 width in the 768-991 range so the layout matches /online/courses.
   UW-9773 */
@media (min-width: 768px) and (max-width: 991px) {
    #event-finder-container #primary.col-md-8 {
        flex: 0 0 66.6666666667%;
        max-width: 66.6666666667%;
        width: auto;
    }
}

/* Search form-group full width when rendered directly in the row (no filters sidebar) */
#product-finder-container > .row > .form-group {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}

/* Search input */
#product-finder-container .form-control,
#event-finder-container .form-control {
    border: 2px solid #ddd;
    border-radius: 2px;
    font-size: 14px;
    padding: 0.5rem 0.75rem;
}

#product-finder-container .form-control:focus,
#event-finder-container .form-control:focus {
    border-color: #4b2e83;
    box-shadow: 0 0 0 2px rgba(75, 46, 131, 0.15);
}

/* Search button */
#product-finder-container .btn-primary,
#event-finder-container .btn-primary {
    background-color: #4b2e83;
    border-color: #4b2e83;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 2rem;
    border-radius: 2px;
    margin-top: 1rem;
}

#product-finder-container .btn-primary:hover,
#event-finder-container .btn-primary:hover {
    background-color: #3a2366;
    border-color: #3a2366;
}

/* ===== Total Results ===== */

.pf-total-results {
    font-size: 14px;
    font-weight: 700;
    color: #626364;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e3e3e3;
}

/* ===== Card ===== */

#pf-results-container .col,
#ef-results-container .col {
    margin-bottom: 1.5rem;
}

.pf-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pf-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.pf-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pf-card__link:hover,
.pf-card__link:focus {
    text-decoration: none;
    color: inherit;
}

/* ===== Card Image ===== */

.pf-card__image {
    position: relative;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 16 / 9;
}

.pf-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pf-card:hover .pf-card__image img {
    transform: scale(1.03);
}

.pf-card__overlay {
    display: none;
}

/* ===== Card Body ===== */

.pf-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ===== Badge ===== */

.pf-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    margin-bottom: 0.625rem;
    align-self: flex-start;
}

.pf-badge--cert {
    background: #4b2e83;
    color: #fff;
}

.pf-badge--degree {
    background: #1a62c7;
    color: #fff;
}

.pf-badge--course {
    background: #e8e3d3;
    color: #333;
}

.pf-badge--bootcamp {
    background: #c28b00;
    color: #fff;
}

.pf-badge--spec {
    background: #1D7EAF;
    color: #fff;
}

.pf-badge--default {
    background: #626364;
    color: #fff;
}

/* Event badge variants.
   One colour per Event Type dropdown value (UW-10039, Joel's spec 2026-08-13). Three of the five
   used to land on --event-default together, so a Featured band holding several events read as one
   repeated type. The colours are lifted from the program-type badges above rather than invented,
   so an event badge and a program badge belong to the same system:
     Open House   mirrors .pf-badge--degree
     Alumni Event mirrors .pf-badge--course
     Career Event mirrors .pf-badge--spec
   Info Session keeps the purple it already had. Special Event is the one new colour. */
.pf-badge--event-info {
    background: #4b2e83;
    color: #fff;
}

.pf-badge--event-openhouse {
    background: #1a62c7;
    color: #fff;
}

.pf-badge--event-alumni {
    background: #e8e3d3;
    color: #333;
}

.pf-badge--event-career {
    background: #1D7EAF;
    color: #fff;
}

.pf-badge--event-special {
    background: #B7A57A;
    color: #000;
}

/* Not dropdown values. Salesforce writes eventType unvalidated, so these catch free text. */
.pf-badge--event-online {
    background: #1a62c7;
    color: #fff;
}

.pf-badge--event-workshop {
    background: #c28b00;
    color: #fff;
}

.pf-badge--event-default {
    background: #626364;
    color: #fff;
}

/* ===== Title ===== */

.pf-card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
    margin: 0 0 0.75rem 0;
}

.pf-card:hover .pf-card__title {
    color: #4b2e83;
}

/* ===== Divider ===== */

.pf-card__divider {
    display: none;
}

/* ===== Meta List ===== */

.pf-card__meta {
    list-style: none;
    padding: 0 !important;
    padding-left: 0 !important;
    margin: 0 0 1rem 0;
    margin-left: 0 !important;
    flex: 1;
}

.pf-card__meta li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 13px;
    color: #373a3c;
    line-height: 1.4;
    padding: 0.25rem 0;
}

.pf-card__meta li + li {
    border-top: 1px solid #f2f2f2;
}

/* ===== Icons ===== */

.pf-icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    color: #4b2e83;
    margin-top: 1px;
}

/* ===== CTA ===== */

.pf-card__cta {
    display: none;
}

/* ===== Search input with inline submit button ===== */
.pf-search-wrap {
    position: relative;
    outline: 1px solid #ADADAD;
    font-family: "Encode Sans Compressed", sans-serif;
    font-size: 20px;
}

.pf-search-wrap:focus-within {
    outline: 2px solid black;
}

.pf-search-wrap #pf-search {
    width: 100%;
    padding: 14px 55px 13px 25px;
    border: none;
    font-size: 16px;
    font-weight: 400;
    outline: none;
    background-color: #F5F5F5;
    border-radius: 0;
    box-shadow: none;
    height: auto;
}

.pf-search-submit {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 55px;
    border: none;
    border-radius: 0;
    background: url('/assets/svg/search.svg') no-repeat center center #4b2e83;
    background-size: 22px;
    color: white;
    cursor: pointer;
    outline: 1px solid #4b2e83;
}

.pf-search-submit:hover {
    background-color: #32006e;
    outline-color: #32006e;
}

.pf-search-submit:focus {
    background-color: #85754d;
    outline: 1px solid black;
}

/* ============================================================
   UW-10039: Featured Events band on /events.

   Sits above .pf-total-results so that count still reads as
   describing the list beneath it. Reuses .pf-card wholesale for
   the multi-event states; only the marquee is new.
   ============================================================ */

.pf-featured {
    margin-bottom: 2rem;
}

.pf-featured__heading {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: #4b2e83;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-featured__heading::after {
    content: "";
    flex: 1;
    height: 2px;
    background: #b7a57a;
}

.pf-featured__grid {
    display: grid;
    gap: 1.5rem;
}

/* Two across at desktop, three across for three or more. Both collapse to a
   single column on phones, matching the results grid below. */
@media (min-width: 768px) {
    .pf-featured__grid--2 { grid-template-columns: repeat(2, 1fr); }
    .pf-featured__grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* The events folder can switch the results grid to two columns. When it does,
   a three-across featured band would be narrower than the cards underneath it,
   so drop it to two there as well. */
@media (min-width: 992px) {
    #event-finder-container[data-two-column-cards="true"] .pf-featured__grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pf-card--featured {
    border-color: #b7a57a;
}

/* The gold .pf-badge--event-special lived here, and has moved up to the event badge block with the
   rest of them. It was never a type colour originally, it was the *featured* colour, named "special"
   back when the Featured band and the "Special Event" type were the same thing. Splitting Featured
   onto its own checkbox left it with no owner; Joel's spec then made it a genuine type colour, which
   is why it reads #B7A57A on #000 now rather than the old #2b2416 text. The featured card keeps the
   gold accent on .pf-card--featured above, independently. */

/* ===== Marquee (single featured event) ===== */

.pf-marquee {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-top: 4px solid #4b2e83;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.pf-marquee:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.pf-marquee__link {
    display: grid;
    grid-template-columns: 1fr;
    text-decoration: none;
    color: inherit;
}

.pf-marquee__link:hover,
.pf-marquee__link:focus {
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .pf-marquee__link {
        grid-template-columns: 46% 1fr;
    }
}

.pf-marquee__image {
    position: relative;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 16 / 9;
}

/* Once the marquee is side by side, the copy column drives the height and a fixed
   16/9 image leaves dead white space beneath it. Drop the ratio and let the grid
   cell stretch instead; object-fit on the img keeps the crop sensible. Event header
   images are wide banners (the current one is 1600x245), so they crop to a centre
   slice either way. Stacked on phones the ratio still applies, because there is no
   sibling column to take height from. */
@media (min-width: 768px) {
    .pf-marquee__image {
        aspect-ratio: auto;
        height: 100%;
    }
}

.pf-marquee__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pf-marquee:hover .pf-marquee__image img {
    transform: scale(1.03);
}

.pf-marquee__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
}

.pf-marquee__title {
    font-size: 23px;
    font-weight: 700;
    line-height: 1.22;
    color: #333;
    margin: 0;
}

.pf-marquee:hover .pf-marquee__title {
    color: #4b2e83;
}

.pf-marquee__desc {
    font-size: 14px;
    line-height: 1.55;
    color: #373a3c;
    margin: 0;
    max-width: 52ch;
}

.pf-marquee__cta {
    align-self: flex-start;
    background: #4b2e83;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 10px 24px;
    margin-top: 0.35rem;
}

.pf-marquee:hover .pf-marquee__cta {
    background: #32006e;
}

/* The marquee's meta list is the card's, but the marquee has room for it to
   breathe and must not stretch to fill the column the way the card's does. */
.pf-marquee__body .pf-card__meta {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.pf-marquee__body .pf-card__meta li {
    font-size: 13.5px;
}

@media (prefers-reduced-motion: reduce) {
    .pf-marquee,
    .pf-marquee__image img {
        transition: none;
    }

    .pf-marquee:hover .pf-marquee__image img {
        transform: none;
    }
}
