/* MSA Athletes — directory filter bar, card polish and the profile pop-up. Theme tokens (--msa-*) with fallbacks. */

.msa-athletes__bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.msa-athletes__search { display: flex; align-items: center; gap: .5rem; flex: 1 1 260px; max-width: 420px; padding: 0 1rem; min-height: 46px; border-radius: 999px; background: var(--msa-surface, #fff); border: 1px solid var(--msa-border, #e2e8f0); color: var(--msa-muted, #5b6b80); transition: border-color .2s, box-shadow .2s; }
.msa-athletes__search:focus-within { border-color: var(--msa-teal, #007f83); box-shadow: 0 0 0 4px color-mix(in oklab, var(--msa-teal, #007f83) 14%, transparent); }
.msa-athletes__search input { flex: 1; min-width: 0; border: 0; background: none; font: 500 .95rem/1.4 var(--msa-font-body, inherit); color: var(--msa-text, #101b2b); padding: .6rem 0; }
.msa-athletes__search input:focus { outline: none; }
.msa-athletes__count { margin: 0 0 0 auto; color: var(--msa-muted, #5b6b80); font-size: .88rem; font-weight: 600; }
.msa-athletes__empty { padding: 2rem 0; text-align: center; color: var(--msa-muted, #5b6b80); }
.msa-athlete-card[hidden] { display: none; }

/* Athlete names linked from the national records tables. */
.msa-record-holder { color: inherit; font-weight: inherit; text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--msa-teal, #007f83) 35%, transparent); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.msa-record-holder:hover, .msa-record-holder:focus-visible { color: var(--msa-teal, #007f83); text-decoration-color: currentColor; }

.msa-athletes__pages { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem; }
.msa-athletes__pages[hidden] { display: none; }
.msa-athletes__pages--top { margin-bottom: clamp(1rem, 2.5vw, 1.5rem); }
.msa-athletes__pages--bottom { margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.msa-athletes__pages button { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .75rem; border: 1px solid var(--msa-border, #e2e8f0); border-radius: 999px; background: var(--msa-surface, #fff); color: var(--msa-heading, #031225); font: 700 .9rem var(--msa-font-heading, inherit); cursor: pointer; transition: background .2s, color .2s, border-color .2s, box-shadow .2s; }
.msa-athletes__pages button:hover:not(:disabled):not([aria-current]) { border-color: var(--msa-teal, #007f83); color: var(--msa-teal, #007f83); }
.msa-athletes__pages button[aria-current="page"] { background: var(--msa-teal, #007f83); border-color: var(--msa-teal, #007f83); color: #fff; box-shadow: 0 8px 18px -10px var(--msa-teal, #007f83); }
.msa-athletes__pages button:disabled { opacity: .4; cursor: default; }
.msa-athletes__pages button:focus-visible { outline: 3px solid var(--msa-aqua, #22d3d8); outline-offset: 2px; }
.msa-athletes__gap { min-width: 24px; text-align: center; color: var(--msa-muted, #5b6b80); }

.msa-athletes .msa-athlete-card__photo { overflow: hidden; }
.msa-athletes .msa-athlete-card__photo img { object-position: 50% 22%; transition: transform .6s var(--msa-ease, ease); }
.msa-athletes .msa-athlete-card:hover .msa-athlete-card__photo img { transform: scale(1.04); }
.msa-athletes .msa-athlete-card:focus-within { outline: 3px solid var(--msa-teal, #007f83); outline-offset: 3px; }
.msa-athletes .msa-athlete-card h3 a:focus { outline: none; }

/* Pop-up */
html.msa-athlete-modal-open { overflow: hidden; }
.msa-athlete-modal { width: min(1080px, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: var(--msa-radius-lg, 26px); background: var(--msa-pearl, #f8fafd); color: var(--msa-text, #101b2b); box-shadow: 0 40px 120px -30px rgba(3, 18, 37, .55); overflow: hidden; }
.msa-athlete-modal[open] { display: flex; flex-direction: column; animation: msa-athlete-in .35s var(--msa-ease, ease) both; }
.msa-athlete-modal::backdrop { background: color-mix(in oklab, var(--msa-navy-900, #031225) 62%, transparent); backdrop-filter: blur(6px); animation: msa-athlete-fade .3s ease both; }
@keyframes msa-athlete-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes msa-athlete-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .msa-athlete-modal[open], .msa-athlete-modal::backdrop { animation: none; } }

.msa-athlete-modal__close { position: absolute; top: .9rem; right: .9rem; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; backdrop-filter: blur(8px); transition: background .2s, transform .2s; }
.msa-athlete-modal__close:hover { background: rgba(255, 255, 255, .26); transform: rotate(90deg); }
.msa-athlete-modal__close:focus-visible { outline: 3px solid var(--msa-aqua, #22d3d8); outline-offset: 2px; }
.msa-athlete-modal__content { overflow-y: auto; overscroll-behavior: contain; }
/* Flat, track-less scrollbar that blends into the pop-up (overrides the theme's brand scrollbar).
   Standard properties only where ::-webkit-scrollbar is unsupported, as Chromium drops webkit styles once they are set. */
@supports not selector(::-webkit-scrollbar) {
	.msa-athlete-modal__content { scrollbar-width: thin; scrollbar-color: var(--msa-aqua, #22d3d8) transparent; }
}
.msa-athlete-modal__content::-webkit-scrollbar { width: 8px; background: transparent; }
.msa-athlete-modal__content::-webkit-scrollbar-track { background: transparent; border: 0; box-shadow: none; }
.msa-athlete-modal__content::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--msa-aqua, #22d3d8), var(--msa-teal, #007f83)); border: 2px solid transparent; border-radius: 999px; background-clip: padding-box; box-shadow: none; }
.msa-athlete-modal__content::-webkit-scrollbar-thumb:hover { background: var(--msa-teal, #007f83); background-clip: padding-box; }

.msa-athlete-modal__head { display: grid; gap: 1.25rem 2rem; align-items: center; padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.75rem); padding-right: 4.5rem; background: radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--msa-teal, #007f83) 55%, var(--msa-navy-900, #031225)) 0%, var(--msa-navy-900, #031225) 60%); color: #fff; }
@media (min-width: 640px) { .msa-athlete-modal__head { grid-template-columns: 168px minmax(0, 1fr); } }
.msa-athlete-modal__head .msa-athlete-hero__photo { width: 168px; border-width: 5px; }
.msa-athlete-modal__head .msa-eyebrow { color: var(--msa-aqua, #22d3d8); }
.msa-athlete-modal__head h2 { margin: .35rem 0 .5rem; color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.035em; line-height: 1.05; }
.msa-athlete-modal__lead { margin: 0; max-width: 60ch; color: rgba(255, 255, 255, .78); }
.msa-athlete-modal__head .msa-muted { margin: .6rem 0 0; display: inline-flex; align-items: center; gap: .4rem; color: rgba(255, 255, 255, .7); }

.msa-athlete-modal__body { padding: clamp(1.25rem, 4vw, 2.5rem); }
@media (min-width: 900px) { .msa-athlete-modal__body.msa-split { grid-template-columns: minmax(0, 1fr) 300px; } }
.msa-athlete-modal__more { margin-top: 1.5rem; width: 100%; justify-content: center; }
.msa-athlete-modal__error { padding: 3rem 2rem; text-align: center; }

.msa-athlete-modal__loading { display: flex; justify-content: center; gap: .5rem; padding: 6rem 0; }
.msa-athlete-modal__loading span { width: 12px; height: 12px; border-radius: 50%; background: var(--msa-teal, #007f83); animation: msa-athlete-dot 1s infinite ease-in-out; }
.msa-athlete-modal__loading span:nth-child(2) { animation-delay: .15s; }
.msa-athlete-modal__loading span:nth-child(3) { animation-delay: .3s; }
@keyframes msa-athlete-dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* Word values ("Individual Medley") need a smaller size than numbers to fit their tile. */
.msa-stat-tile.msa-stat-tile--text strong { font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.2; letter-spacing: -.01em; min-height: 2.4em; display: flex; align-items: center; }
.msa-split .msa-time, .msa-split .msa-dark-table td:nth-last-child(2) { white-space: nowrap; }

/* Profile sections use h3/h4 (pop-up and page share markup): match the theme's h2/h3 styling. */
.msa-dark-table__head h3 { color: #fff; font-size: 1.35rem; }
/* Table sits flush under the dark heading: square top corners, a hairline divider between them. */
.msa-dark-table .msa-dark-table__head { padding-bottom: 1.75rem; }
.msa-dark-table .msa-table-wrap { border-radius: 0 0 var(--msa-radius, 18px) var(--msa-radius, 18px); border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 0; }
.msa-dark-table .msa-table thead th { padding-top: 1.1rem; }
.msa-dark-table .msa-table-wrap .msa-table { border-radius: 0; }
.msa-dark-table .msa-table thead th:first-child, .msa-dark-table .msa-table thead th:last-child { border-radius: 0; }
.msa-bio-card h3, .msa-split__side > h3 { font-size: 1.35rem; }
.msa-achievement h4 { font-size: 1.1rem; }
.msa-athlete-modal .msa-table-wrap { overflow-x: auto; }
