/* ==========================================================================
   Events calendar: listing (filter form, results, pagination) and event
   detail page. Ported by hand from TAL.Web Accelerator SCSS, 2026-11-23.
   Class names kept from the original so markup mirrors legion.org.

   Source root: C:\repos\TAL.Web\Accelerator\wwwroot\assets\src\scss\
     components/modules/_filters.scss         -> section 1
     components/modules/_resource-listing.scss -> section 2
     components/tools/_pagination.scss        -> already in site.css (section 3 notes)
     globals/layout/_interior.scss            -> already in site.css (section 4 adds
                                                 only what the source never styled)

   Source markup: Components/Widgets/Events/_EventsListingWidget.cshtml,
   _EventsListingResultsPartial.cshtml, Components/ViewComponents/Pagination/
   _Pagination.cshtml, Views/Event/Index.cshtml and _Tournament.cshtml.

   Load after site.css. Uses the custom properties defined there (--color-*,
   --font-*). Same conventions as site.css: breakpoints inlined as px
   (bp-m 768px, bp-mw 960px, bp-l 1140px), x-rem()/pxtorem() written as rem.

   Content security policy is 'self' only: no url(), no remote fonts, no
   images in CSS. Pictures are <img> elements.

   Changes from legion.org (fixes, not redesigns):
   - The filter bar is a real <form method="get">; the button submits it.
   - Visible keyboard focus on fields, the submit button and every link
     (legion.org relies on the browser default, which the button's dark
     background hides).
   - The select arrow ignores pointer events so clicking it opens the list.
   - Placeholder text has an explicit AA color.
   - The "Address:" lines each sit on their own line (on legion.org they are
     unstyled inline spans that run together on one line).
   ========================================================================== */


/* ==========================================================================
   1. components/modules/_filters.scss
   Markup: <form class="filters" method="get" role="search">
             <div class="filters__inner"> <div class="filter"> ... </div> ...
   ========================================================================== */

.filters {
    /* $color-form-border was local to _filters.scss */
    --color-form-border: #637697; /* 4.6:1 on white: passes the 3:1 non-text rule */
    margin: 0 0 40px;
    padding: 14px;
    background: var(--color-gray-lightest);
    border-radius: 6px 6px 0 0;
    border-bottom: 4px solid var(--color-blue);
}
@media (min-width: 960px) {
    .filters {
        padding: 30px;
    }
}

@media (min-width: 1140px) {
    .filters__inner {
        display: flex;
        gap: 15px;
        align-items: flex-end;
    }
}

.filters__heading {
    text-transform: none;
    font-size: 1.25rem;
    font-variation-settings: 'wdth' 100;
    margin-bottom: 16px;
}

.filter {
    margin: 0 0 15px;
}
@media (min-width: 1140px) {
    .filter {
        flex: auto;
        padding: 0 10px;
        margin: 0;
    }
    .filter:first-child {
        padding-left: 0;
    }
    .filter:last-child {
        padding-right: 0;
    }
}

/* The source targets .button only; legion.org's events button is .btn, so
   this rule does not reach it there either. Kept as written. */
.filter .button {
    width: 100%;
    white-space: nowrap;
}

.filter:last-child {
    margin: 0;
}

.filter.filter--nolabel {
    text-transform: uppercase;
    font-family: var(--font-secondary);
    font-weight: 800;
    margin-top: 20px;
    flex: none;
}
@media (min-width: 1140px) {
    .filter.filter--nolabel {
        margin-top: 0;
    }
}

.filter__label {
    display: block;
    margin: 0 0 5px;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.875rem;
}
.filter__label--date {
    font-size: .875em;
    padding: 0 5px 0 0;
}

.filter__select-wrapper {
    width: 100%;
    position: relative;
}
.filter__select-wrapper:after {
    border-style: solid;
    border-width: 2px 2px 0 0;
    border-radius: 2px 0 2px 0;
    content: "";
    display: inline-block;
    height: 10px;
    width: 10px;
    right: 12px;
    position: absolute;
    top: -1px;
    bottom: 0;
    margin: auto;
    transform: rotate(135deg);
    vertical-align: top;
    border-color: var(--color-blue);
    /* New: let a click on the arrow reach the <select> underneath. */
    pointer-events: none;
}

.filter__select {
    appearance: none;
    cursor: pointer;
}

.filter__select,
.filter__input {
    width: 100%;
    border: 1px solid var(--color-form-border);
    border-radius: 2px;
    padding: 8px;
    height: 44px;
    font-weight: 500;
    font-size: 1rem;
    background-color: var(--color-invert);
    color: var(--color-base);
}
/* After the shared padding above, so the arrow gap wins. */
.filter__select {
    padding-right: 36px;
}

/* New: placeholder color (#454C57 on white is 8.9:1). */
.filter__input::placeholder {
    color: var(--color-gray-darkest);
    opacity: 1;
}

/* New: visible focus. Red ring as elsewhere in site.css (5:1 on white and on
   #F7F8FB). */
.filter__input:focus-visible,
.filter__select:focus-visible,
.filters .btn:focus-visible {
    outline: 3px solid #D72131;
    outline-offset: 2px;
}
/* Fields show focus from a mouse click too, so people see where they type. */
.filter__input:focus,
.filter__select:focus {
    outline: 3px solid #D72131;
    outline-offset: 2px;
    border-color: var(--color-primary);
}

/* New: in Windows high contrast mode the arrow follows the text color. */
@media (forced-colors: active) {
    .filter__select-wrapper:after {
        border-color: CanvasText;
    }
}


/* ==========================================================================
   2. components/modules/_resource-listing.scss
   Markup: <ul class="resource-listing"> <li class="resource-listing__item">
   ========================================================================== */

.resource-listing {
    list-style: none;
    margin: 0 0 3rem 0;
    padding: 0;
}
@media (min-width: 768px) {
    .resource-listing {
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}
@media (min-width: 1140px) {
    .resource-listing {
        gap: 2.25rem;
    }
}

.resource-listing__item {
    margin: 0 0 1rem;
}
@media (min-width: 768px) {
    .resource-listing__item {
        margin: 0;
        width: calc(50% - .75rem);
    }
}
@media (min-width: 1140px) {
    .resource-listing__item {
        width: calc(100% * (1/3) - 1.5rem);
    }
}

.resource-listing__content-wrapper {
    border: 1px solid var(--color-gray);
    border-top: 0;
    border-radius: 0 0 6px 6px;
}

.resource-listing__content {
    padding: 12px 16px;
    background: var(--color-invert);
}

.resource-listing__category {
    padding: 15px 0 10px;
    display: block;
    font-weight: 400;
    font-size: 1rem;
}
.resource-listing__category a {
    color: var(--color-blue);
    font-weight: 500;
}

/* White on #1B3D6D is 11:1. */
.resource-listing__dateTime {
    padding: 10px 16px;
    border-radius: 6px 6px 0 0;
    background: var(--color-primary);
    color: var(--color-invert);
    font-weight: 800;
}
.resource-listing__dateTime span,
.resource-listing__dateTime time {
    display: inline-block;
}
.resource-listing__dateTime span + span,
.resource-listing__dateTime time + span {
    margin-left: 12px;
    padding-left: 12px;
    position: relative;
}
.resource-listing__dateTime span + span:after,
.resource-listing__dateTime time + span:after {
    content: "";
    height: 80%;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    background: var(--color-invert);
    position: absolute;
    left: -1px;
}

/* #1F6CAA on white is 5.5:1. */
.resource-listing__heading {
    font-size: 1.25rem;
    margin: 0 0 15px;
    font-family: var(--font-secondary);
    color: var(--color-blue);
    font-weight: 800;
    text-transform: capitalize;
    font-variation-settings: "wdth" 100;
}

.resource-listing__location {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.resource-listing__address {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 16px;
}
.resource-listing__address strong {
    display: block;
}

/* Summary is rich text; site.css already underlines links, so they are not
   told apart by color alone. */
.resource-listing__summary a {
    color: var(--color-blue);
}

/* #1F6CAA on #F7F8FB is 5.2:1. */
.resource-listing__footer {
    padding: 0 16px;
    background: var(--color-gray-lightest);
    width: 100%;
    border-radius: 0 0 6px 6px;
}

/* New: visible focus for links in a result. */
.resource-listing__footer .btn--link:focus-visible,
.resource-listing__summary a:focus-visible {
    outline: 3px solid #D72131;
    outline-offset: 2px;
}

/* New: "No Results" had no class or style on legion.org; give it the
   count line's spacing so the page does not jump. */
.resource-listing__empty {
    font-size: 1rem;
    padding: 1rem 0;
}


/* ==========================================================================
   3. components/tools/_pagination.scss
   Already ported in site.css ("News listing ... pagination"), including
   .pagination__results (the "Displaying 1 - 12 of 13" line), the active
   state and a :focus-visible ring. Nothing is repeated here.
   .pagination__link--black is used by the Kentico partial (the "..." group
   links) but has no rule in the SCSS, so it has none here either.
   ========================================================================== */

/* New: the listing has no left-hand count beside the page list, so center
   the page list under the results, as .pagination-centered does. Use either
   class; this one saves adding a second class in the events markup. */
.events-listing .pagination__list {
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   4. globals/layout/_interior.scss (event detail page)
   The banner (.interior-top--details, .page-banner__meta with its divider),
   the two columns (.interior-content-wrapper 58% / .interior-rail-wrapper
   42% from 960px, rail first on phones), .interior-figure, .interior-img,
   .interior-details__ctas and the h2/h3/h4 rules are already in site.css.
   Below are only the pieces the source used in markup but never styled.
   ========================================================================== */

/* .interior-address had no rule. Its <h2>Address:</h2> picks up the
   .interior-main--details h2 rule from site.css. Each address line was an
   inline <span>, so "189 Wolf Road Albany, New York 12205" ran together;
   one line each reads as an address. */
.interior-address p {
    margin: 0 0 16px;
}
.interior-address span {
    display: block;
}

/* .btn--blue ("View Directions") had no rule anywhere in the SCSS, so it is
   the plain blue .btn. Spelled out so the class is not mistaken for unused. */
.btn--blue {
    background-color: var(--color-blue);
    color: var(--color-invert);
}
.btn--blue:hover,
.btn--blue:active,
.btn--blue:focus {
    background-color: var(--color-primary);
}

/* New: visible focus on the rail buttons and the rich text links. The red
   ring sits on the white page, never on the button's own fill. */
.interior-details__ctas a:focus-visible,
.event-details .interior-content a:focus-visible,
.interior-main--details .interior-details__phone a:focus-visible,
.interior-main--details .interior-details__email a:focus-visible {
    outline: 3px solid #D72131;
    outline-offset: 2px;
}

/* New: the rail picture is a real <img> with width/height attributes; keep
   its ratio when the width is forced to 100% on phones. */
.interior-main--details .interior-img {
    max-width: 100%;
    height: auto;
}

/* Tournament facts (_Tournament.cshtml): heading + value pairs in the left
   column. The headings use the site.css .interior-main--details h2 rule;
   the values need no style of their own on legion.org. The contact phone
   and email use .interior-details__phone / __email (styled in site.css). */
.event-facts__value {
    margin: 0;
}

/* Legion.CMS additions: the note on a past event's page. */
.event-ended {
    border-left: 4px solid var(--color-blue);
    padding-left: 16px;
}
