/* wwwroot/css/partner.css — the /partner portal and the public /partners/{slug} page
   (PARTNERS_AND_CELEBRITY_LEAGUES.md, Phase 2). Brand tokens (--brand-*) come from master.cshtml
   so the pages read correctly under Survivor and Big Brother; fixed grays are the ones already
   used across the site (COLORS.md). Text colors pass WCAG AA on white. */

.pt-shell { width: 90%; max-width: 1236px; margin: 24px auto 48px; }
.pt-page { font-family: Inter, sans-serif; color: #1f2937; }

.pt-head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.pt-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 18px; background: #fff; border: 1px solid #e5e7eb; flex: 0 0 auto; }
.pt-logo--placeholder { display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 700; color: #fff; background: var(--brand-primary); border: none; }
.pt-eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-accessible, var(--brand-primary)); }
.pt-title { margin: 2px 0 0; font-family: "Inter Tight", Inter, sans-serif; font-size: 34px; font-weight: 700; line-height: 1.15; color: #111827; }
.pt-sub { margin: 6px 0 0; color: #4b5563; font-size: 15px; }
.pt-sub a { color: var(--brand-accessible, var(--brand-primary)); }
.pt-blurb { margin: 10px 0 0; max-width: 70ch; color: #374151; font-size: 16px; line-height: 1.55; }

.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pt-card { background: #fff; border: 1.5px solid var(--brand-primary); border-radius: 18px; padding: 20px 22px; box-shadow: 0 0 14px rgba(0, 0, 0, 0.08); }
.pt-card--wide { grid-column: 1 / -1; }
.pt-card h2 { margin: 0 0 6px; font-family: "Inter Tight", Inter, sans-serif; font-size: 22px; font-weight: 600; color: var(--brand-primary); }
.pt-subtitle { margin: 18px 0 8px; font-size: 16px; font-weight: 700; color: #111827; }
.pt-muted { color: #4b5563; font-size: 14px; }
.pt-chip { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .03em; padding: 2px 10px; border-radius: 999px; border: 1px solid #d1d5db; color: #374151; background: #f9fafb; }
.pt-chip--on { color: #fff; background: var(--brand-accessible, var(--brand-primary)); border-color: var(--brand-accessible, var(--brand-primary)); }

.pt-field { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; color: #374151; margin-top: 12px; }
.pt-field input, .pt-field textarea, .pt-field select { font: inherit; font-weight: 400; color: #111827; background: #fff; border: 1px solid #d1d5db; border-radius: 10px; padding: 9px 12px; }
.pt-field input:focus-visible, .pt-field textarea:focus-visible, .pt-field select:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); border-color: var(--brand-primary); }
.pt-field textarea { resize: vertical; }
.pt-field--wide { grid-column: 1 / -1; }
.pt-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: #374151; }
.pt-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pt-socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }

.pt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pt-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 22px; font: inherit; font-size: 15px; font-weight: 600; line-height: 1; border-radius: 999px; border: 1.5px solid var(--brand-primary); cursor: pointer; text-decoration: none; white-space: nowrap; }
.pt-btn--primary { background: var(--brand-primary); color: #fff; }
.pt-btn--primary:hover { background: var(--brand-primary-dark); border-color: var(--brand-primary-dark); }
.pt-btn--secondary { background: #fff; color: var(--brand-primary); }
.pt-btn--secondary:hover { background: var(--brand-tint-bg-hover); }
.pt-btn--danger { background: #fff; color: #B3261E; border-color: #B3261E; }
.pt-btn--danger:hover { background: rgba(179, 38, 30, 0.08); } /* tint of the existing #B3261E error red, no new hex */
.pt-btn--sm { padding: 6px 14px; font-size: 13px; }
.pt-btn[disabled] { opacity: .6; cursor: default; }
.pt-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.pt-msg { margin: 8px 0 0; min-height: 18px; font-size: 13.5px; color: #495057; }
.pt-msg.is-error { color: #B3261E; }
.pt-msg.is-ok { color: var(--brand-accessible, var(--brand-primary)); }

.pt-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 8px; }
.pt-group { border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; background: var(--brand-tint-bg); }
.pt-group__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.pt-group__head strong { font-size: 16px; color: #111827; }
.pt-group .pt-field { margin-top: 10px; }

.pt-events { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pt-event { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 16px; }
.pt-event__when { font-size: 13px; font-weight: 700; color: var(--brand-accessible, var(--brand-primary)); }
.pt-event__title { font-size: 16px; font-weight: 600; color: #111827; margin-top: 2px; }
.pt-event__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }

.pt-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(17, 24, 39, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pt-modal__card { background: #fff; border-radius: 18px; max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; padding: 22px 26px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
.pt-modal__card h2 { margin: 0 0 4px; font-family: "Inter Tight", Inter, sans-serif; color: var(--brand-primary); }
.pt-agreement { font-size: 14.5px; line-height: 1.55; color: #374151; }
.pt-agreement ol { padding-left: 20px; }
.pt-agreement li { margin: 6px 0; }

/* ── Public partner page ─────────────────────────────────────────────────── */
.pt-socials-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; }
.pt-social { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--brand-primary); color: var(--brand-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.pt-social:hover { background: var(--brand-tint-bg-hover); }
.pt-section { margin-top: 26px; }
.pt-section > h2 { margin: 0 0 10px; font-family: "Inter Tight", Inter, sans-serif; font-size: 24px; font-weight: 600; color: var(--brand-primary); }
.pt-league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pt-league { background: #fff; border: 2px solid var(--brand-primary); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.pt-league__game { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-accessible, var(--brand-primary)); }
.pt-league__name { margin: 0; font-size: 19px; font-weight: 700; color: #111827; }
.pt-league__prize { margin: 0; font-size: 14.5px; color: #1f2937; }
.pt-league__prize a { margin-left: 6px; color: var(--brand-accessible, var(--brand-primary)); }
.pt-league__meta { font-size: 13.5px; color: #4b5563; }
.pt-league .pt-actions { margin-top: auto; padding-top: 8px; }
.pt-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pt-event-card { display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; }
.pt-event-card:hover { border-color: var(--brand-primary); }
.pt-event-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #f3f4f6; }
.pt-event-card__body { padding: 12px 16px 16px; }
.pt-event-card__title { margin: 2px 0 4px; font-size: 17px; font-weight: 700; color: #111827; }
.pt-event-card__blurb { margin: 0; font-size: 14px; color: #374151; }

@media (max-width: 860px) {
    .pt-shell { width: 100%; padding: 0 16px; box-sizing: border-box; }
    .pt-grid, .pt-form-grid, .pt-socials { grid-template-columns: 1fr; }
    .pt-head { align-items: flex-start; }
    .pt-title { font-size: 28px; }
    .pt-event { flex-direction: column; }
    .pt-event__side { flex-direction: row; align-items: center; }
}

/* Staff card (owners only, 2026-10-06): table + the Add-staff username typeahead. */
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.pt-table th, .pt-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; color: #111827; }
.pt-table th { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #4b5563; }
.pt-table__actions { text-align: right; }
.pt-typeahead { position: relative; }
.pt-typeahead-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: 4px 0 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #d1d5db; border-radius: 10px; box-shadow: 0 8px 24px rgba(17, 24, 39, .14); max-height: 240px; overflow-y: auto; }
.pt-typeahead-list li { padding: 8px 12px; font-size: 14px; font-weight: 400; color: #111827; cursor: pointer; }
.pt-typeahead-list li:hover, .pt-typeahead-list li.active { background: var(--brand-tint-bg, #f3f4f6); }
.pt-typeahead-list li.empty { color: #4b5563; cursor: default; }

/* ── Portal redesign (2026-10-06): sidebar dashboard + per-league / per-group pages ─────────────────
   Layout, nav, KPI tiles (ported from AdminNewsletterStats' .tiles onto white), native <dialog>s,
   the settings <iframe>, the events month list. Brand tokens from master.cshtml; AA grays as above. */
.pt-shell--portal { max-width: 1320px; }
.pt-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.pt-nav { position: sticky; top: 16px; background: #fff; border: 1.5px solid var(--brand-primary); border-radius: 18px; padding: 18px 16px; box-shadow: 0 0 14px rgba(0, 0, 0, 0.08); }
.pt-nav__identity { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid #e5e7eb; margin-bottom: 10px; }
.pt-nav__logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; flex: 0 0 auto; font-size: 22px; }
.pt-nav__name { font-family: "Inter Tight", Inter, sans-serif; font-size: 18px; font-weight: 700; color: #111827; line-height: 1.2; }
.pt-nav__public { font-size: 13px; color: var(--brand-accessible, var(--brand-primary)); }
.pt-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
/* Account-tab colour semantics (account.css .tab / .tab.active) carried onto a vertical nav. */
.pt-nav__link { display: block; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: #4b5563; text-decoration: none; border-left: 3px solid transparent; }
.pt-nav__link:hover { background: var(--brand-tint-bg-hover); color: #111827; }
.pt-nav__link.is-active { color: var(--brand-primary); background: var(--brand-tint-bg); border-left-color: var(--brand-primary); }
.pt-nav__link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); }
.pt-main { min-width: 0; }
.pt-main__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.pt-main__head .pt-eyebrow a { color: inherit; text-decoration: none; }
.pt-main__head .pt-eyebrow a:hover { text-decoration: underline; }
.pt-actions--head { margin-top: 0; }

.pt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 18px; }
.pt-tile { display: block; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; color: inherit; text-decoration: none; }
.pt-tile--link:hover { border-color: var(--brand-primary); }
.pt-tile .k { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: #4b5563; font-weight: 700; }
.pt-tile .v { font-size: 26px; font-weight: 700; margin-top: 3px; color: #111827; font-family: "Inter Tight", Inter, sans-serif; }
.pt-tile .s { font-size: 12.5px; color: #4b5563; margin-top: 2px; }

.pt-seasons { display: flex; flex-direction: column; gap: 10px; }
.pt-season { border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; }
.pt-season__name { font-weight: 700; color: #111827; }
.pt-season__chips { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }

.pt-group--link { display: block; color: inherit; text-decoration: none; }
.pt-group--link:hover { border-color: var(--brand-primary); }
.pt-group__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.pt-group__cta { font-weight: 700; color: var(--brand-accessible, var(--brand-primary)); font-size: 14px; }

.pt-links { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-links a { color: var(--brand-accessible, var(--brand-primary)); font-weight: 600; }
.pt-table-scroll { overflow-x: auto; }

/* League settings summary (2026-10-06, replaces the settings iframe): six cards, each with an Edit
   button into the real editor. Danger card = delete. Upload = the event-image / logo file pickers. */
.pt-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pt-card__head h2 { margin: 0; }
.pt-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.pt-setting { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 14px 16px; }
.pt-setting__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pt-setting__head h3 { margin: 0; font-size: 15px; font-weight: 700; color: #111827; font-family: "Inter Tight", Inter, sans-serif; }
.pt-setting dl { margin: 0; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 4px 12px; font-size: 13.5px; }
.pt-setting dt { color: #4b5563; font-weight: 600; }
.pt-setting dd { margin: 0; color: #111827; overflow-wrap: anywhere; }
.pt-setting__note { font-size: 12.5px; color: #4b5563; margin-top: auto; }
.pt-card--danger { border-color: #B3261E; }
.pt-card--danger h2 { color: #B3261E; }
.pt-upload { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 6px; }
.pt-upload__preview { display: block; max-width: 260px; max-height: 150px; border-radius: 10px; border: 1px solid #e5e7eb; background: #f3f4f6; object-fit: cover; }
.pt-upload__preview--logo { width: 96px; height: 96px; object-fit: contain; background: #fff; }
.pt-upload__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-upload__pick { cursor: pointer; }
.pt-upload .pt-msg { flex-basis: 100%; margin: 0; }
.pt-field .pt-upload__pick input[type="file"] { display: none; }

.pt-dialog { border: none; border-radius: 18px; padding: 0; max-width: 760px; width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); }
.pt-dialog::backdrop { background: rgba(17, 24, 39, 0.55); }
.pt-dialog__card { padding: 22px 26px; margin: 0; }
.pt-dialog__card h2 { margin: 0 0 4px; font-family: "Inter Tight", Inter, sans-serif; color: var(--brand-primary); font-size: 22px; }

.pt-event-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pt-month { margin: 14px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #4b5563; }
.pt-date { flex: 0 0 auto; width: 56px; text-align: center; border-radius: 10px; background: var(--brand-tint-bg); color: var(--brand-primary); padding: 6px 4px; }
.pt-date__day { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; font-family: "Inter Tight", Inter, sans-serif; }
.pt-date__time { display: block; font-size: 11.5px; font-weight: 600; }
.pt-event__body { flex: 1 1 auto; min-width: 0; }
.pt-event__btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pt-event--compact { padding: 10px 12px; align-items: center; }
.pt-past { margin-top: 18px; }
.pt-past > summary { cursor: pointer; font-weight: 700; color: #111827; padding: 8px 0; }

@media (max-width: 860px) {
    .pt-layout { grid-template-columns: 1fr; gap: 14px; }
    .pt-nav { position: sticky; top: 0; z-index: 5; border-radius: 0 0 14px 14px; padding: 10px 12px; }
    .pt-nav__identity { display: none; }
    .pt-nav__list { flex-direction: row; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
    .pt-nav__link { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; padding: 8px 10px; }
    .pt-nav__link.is-active { border-left-color: transparent; border-bottom-color: var(--brand-primary); }
    .pt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-main__head { align-items: flex-start; }
    .pt-settings { grid-template-columns: 1fr; }
    .pt-date { display: none; }
}
