/* mod_fwf_cup / cup.css v1.10 -- 28 Sep 2026
 *
 * The cup page gets its table, section title bars, Full/Short/Form toggle, filter buttons and
 * match rows from the SAME sheet as the league and team pages
 * (media/templates/site/cassiopeia/css/fwf_team_page.css, loaded by the module). This file holds
 * only what that sheet doesn't cover: the cup switcher / lozenges, the knockout bracket, the
 * round schedule, and the clickable-row affordance the league page keeps inline in its module.
 * Brand: --fwf-green #2e6a32, --fwf-charcoal #2F3336.
 */

.fwf-cup { font-family: Arial, Helvetica, sans-serif; color: #2F3336; max-width: 100%; }

/* ── Lozenges: the cup switcher (in-page sub-menu) and the "official site" link ── */
.fwf-cup-switcher { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.fwf-cup-lozenge { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px; font-size: .82rem; font-weight: 700; line-height: 1.2; color: #2e6a32; background: #eaf3e9; border: 1px solid #2e6a32; border-radius: 999px; text-decoration: none; white-space: nowrap; }
a.fwf-cup-lozenge:hover { background: #2e6a32; color: #fff; }
.fwf-cup-lozenge.is-on { background: #2e6a32; color: #fff; cursor: default; }
.fwf-cup-official { margin: 10px 0 0 !important; }

.fwf-cup-note { font-size: .8rem; color: #6b756b; margin: 10px 16px; line-height: 1.45; }

/* ── Knockout bracket ── */
.fwf-cup-bracket { padding: 12px 16px 4px; }
.fwf-cup-bracket .fwf-cup-note { margin-left: 0; margin-right: 0; }
.fwf-cup-round { margin-bottom: 18px; }
.fwf-cup-round-title { font-size: 13px; font-weight: 700; color: #2F3336; margin-bottom: 8px; }
.fwf-cup-round-date { font-weight: 400; color: #6b756b; }
.fwf-cup-tiegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fwf-cup-tiegrid.is-final { grid-template-columns: minmax(220px, 320px); }
.fwf-cup-tie { display: block; background: #fff; border: 1px solid #e0e4dd; border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; transition: border-color .15s; }
a.fwf-cup-tie:hover { border-color: #2e6a32; }
.fwf-cup-tie-code { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b756b; margin-bottom: 6px; }
.fwf-cup-tie-neutral { text-transform: none; font-weight: 400; }
.fwf-cup-tieside { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.fwf-cup-tieteam { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fwf-cup-tiecrest { width: 18px; height: 18px; object-fit: contain; flex: none; }
.fwf-cup-tiename { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fwf-cup-tiescore { font-weight: 700; flex: none; margin-left: 8px; }
.fwf-cup-tiescore small { font-weight: 400; color: #6b756b; }
.fwf-cup-tieside.is-winner .fwf-cup-tiename { font-weight: 700; color: #2e6a32; }

/* ── Round schedule (a knockout cup before any draw exists) ── */
.fwf-cup-sched { list-style: none; margin: 0; padding: 0 16px 12px; }
.fwf-cup-sched li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e7e9e5; font-size: .9rem; }
.fwf-cup-sched li:last-child { border-bottom: none; }
.fwf-cup-sched-name { font-weight: 700; }
.fwf-cup-sched-date { color: #6b756b; text-align: right; }

/* ── Match rows: the clickable-row affordance + postponed styling, as on the league page.
      (The league page keeps these inline in its module, not in fwf_team_page.css.) ── */
.fwf-match-row { position: relative; }
a.fwf-match-row.fwf-match-row-link { display: grid; position: relative; text-decoration: none; color: inherit; cursor: pointer; overflow: hidden; }
a.fwf-match-row-link:hover { border-color: #2e6a32; box-shadow: 0 2px 8px rgba(46,106,50,.15); }
a.fwf-match-row-link .fwf-match-fade { position: absolute; top: 0; right: 0; bottom: 0; width: 64px; pointer-events: none; background: linear-gradient(to right, rgba(46,106,50,0) 0%, rgba(46,106,50,.14) 60%, rgba(46,106,50,.22) 100%); transition: width .15s ease; }
a.fwf-match-row-link:hover .fwf-match-fade { width: 88px; background: linear-gradient(to right, rgba(46,106,50,0) 0%, rgba(46,106,50,.20) 60%, rgba(46,106,50,.32) 100%); }
a.fwf-match-row-link .fwf-match-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #2e6a32; font-weight: 800; font-size: 1.25rem; line-height: 1; pointer-events: none; z-index: 1; }
a.fwf-match-row-link:hover .fwf-match-chevron { transform: translateY(-50%) translateX(3px); }
.fwf-match-pens { font-size: 11px; font-weight: 400; color: #6b756b; margin-left: 2px; }
.fwf-match-postponed { opacity: .62; background: #e2e2e2; }
.fwf-match-postponed .fwf-match-home img,
.fwf-match-postponed .fwf-match-away img { filter: grayscale(100%) opacity(70%); }
.fwf-match-pp { color: #f59e0b; font-weight: 800; letter-spacing: .03em; font-size: .9rem; }

/* ── v1.11: round headings inside the fixture / result lists of a straight-knockout cup ── */
.fwf-cup-roundhead { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6b756b; margin: 14px 16px 6px; padding: 0; }
.fwf-cup-roundhead:first-child { margin-top: 8px; }

/* ── v1.11: the Cups landing page (cup_slug = all) ── */
.fwf-cups-links { margin: 14px 16px 0; }
.fwf-cups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; padding: 14px 16px 18px; }
.fwf-cups-card { background: #fff; border: 1px solid #e0e4dd; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.fwf-cups-name { margin: 0; font-size: 1.1rem; line-height: 1.25; color: #2F3336; }
.fwf-cups-name a { color: inherit; text-decoration: none; }
.fwf-cups-name a:hover { color: #2e6a32; }
.fwf-cups-format { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #2e6a32; }
.fwf-cups-desc { margin: 0; font-size: .9rem; line-height: 1.5; color: #2F3336; }
.fwf-cups-stats { margin: 0; font-size: .8rem; line-height: 1.5; color: #6b756b; }
.fwf-cups-card .fwf-cup-lozenge { align-self: flex-start; margin-top: auto; }
.fwf-cups-soon { align-self: flex-start; margin-top: auto; font-size: .78rem; font-style: italic; color: #8a928a; }

/* ── v1.13: favourite-team highlight, matching the calendar's amber row (fwf-fav-row).
      I don't have a copy of the calendar's own stylesheet to lift the exact shade from, so this
      is a close approximation in the same amber family -- nudge the two values below if you want
      an exact match to the calendar. ── */
.fwf-match-row.fwf-fav-row { background: #fff8e6; border-left: 3px solid #d97706; }
.fwf-match-row.fwf-fav-row.fwf-match-postponed { background: #f0ece0; }

/* ── v1.14: League Cup group tables -- 22 small cards, 4 rows each, since there's no single
      table for a group-stage cup. Deliberately its own compact style, not the big standings
      table's markup (which assumes one table for the whole competition). ── */
.fwf-cup-groupgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 14px 16px; }
.fwf-cup-groupcard { background: #fff; border: 1px solid #e0e4dd; border-radius: 8px; padding: 10px 12px 4px; }
.fwf-cup-groupname { margin: 0 0 6px; font-size: .84rem; font-weight: 700; color: #2F3336; }
.fwf-cup-grouptable { width: 100%; border-collapse: collapse; font-size: .78rem; }
.fwf-cup-grouptable th { text-align: center; font-weight: 700; color: #6b756b; padding: 3px 2px; border-bottom: 1px solid #e7e9e5; }
.fwf-cup-grouptable th:nth-child(2) { text-align: left; }
.fwf-cup-grouptable td { padding: 4px 2px; border-bottom: 1px solid #f2f3f0; }
.fwf-cup-grouptable tr:last-child td { border-bottom: none; }
.fwf-cup-grouprank { text-align: center; color: #6b756b; font-weight: 700; width: 16px; }
.fwf-cup-groupteam { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
.fwf-cup-groupteam a { color: inherit; text-decoration: none; }
.fwf-cup-groupteam a:hover { color: #2e6a32; }
