/* ==========================================================================
   PWA Match Play — Eagles Golf
   File: /assets/css/pwa-matchplay.css
   ========================================================================== */

.pwa-mp-match {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}
.pwa-mp-player {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    text-align: center;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pwa-mp-player--winner { color: #fff; font-weight: 800; }
.pwa-mp-score { flex-shrink: 0; text-align: center; min-width: 44px; }
.pwa-mp-vs { font-size: 10px; font-weight: 900; color: rgba(255,255,255,0.2); letter-spacing: 0.1em; }
.pwa-mp-result { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 900; color: #C10206; }
.pwa-mp-group { margin-bottom: 16px; }
.pwa-mp-group-head {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: rgba(255,255,255,0.3);
    margin-bottom: 8px; padding-left: 4px;
}
.pwa-mp-window { font-size: 10px; color: rgba(255,255,255,0.25); text-align: center; margin-top: 12px; }

/* --- Calculator ---------------------------------------------------------- */
.pwa-mp-calc { display: flex; flex-direction: column; gap: 16px; }
.pwa-mp-calc-player {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.pwa-mp-calc-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.35); }
.pwa-mp-calc-field { position: relative; }
.pwa-mp-calc-field input {
    width: 100%; padding: 10px 12px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.06);
    color: #fff; font-size: 13px; outline: none;
}
.pwa-mp-calc-field input:focus { border-color: #C10206; }
.pwa-mp-calc-suggest {
    position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px;
    background: #0D1117; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; max-height: 180px; overflow-y: auto; z-index: 20;
}
.pwa-mp-calc-suggest.hidden { display: none; }
.pwa-mp-calc-suggest div { padding: 10px 12px; font-size: 12px; color: rgba(255,255,255,0.7); cursor: pointer; }
.pwa-mp-calc-suggest div:active { background: rgba(255,255,255,0.06); }
.pwa-mp-calc-row { display: flex; align-items: center; gap: 8px; }
.pwa-mp-calc-row label { font-size: 10px; font-weight: 800; text-transform: uppercase; color: rgba(255,255,255,0.35); min-width: 32px; }
.pwa-mp-calc-row input {
    flex: 1; padding: 8px 12px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.06);
    color: #fff; font-family: 'Montserrat', sans-serif;
    font-size: 18px; font-weight: 900; text-align: center; outline: none;
}
.pwa-mp-calc-tees { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mc-tee {
    padding: 6px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.1);
    background: none; color: rgba(255,255,255,0.4);
    font-size: 10px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: all 0.15s;
}
.mc-tee[data-tee="yellow"] { border-color: rgba(212,160,23,0.4); color: rgba(212,160,23,0.6); }
.mc-tee[data-tee="green"] { border-color: rgba(46,125,50,0.4); color: rgba(46,125,50,0.6); }
.mc-tee.active[data-tee="yellow"] { border-color: #d4a017; color: #11161c; background: #d4a017; }
.mc-tee.active[data-tee="green"] { border-color: #2e7d32; color: #fff; background: #2e7d32; }
.pwa-mp-calc-vs { text-align: center; font-size: 10px; font-weight: 900; color: rgba(255,255,255,0.15); letter-spacing: 0.2em; }
.pwa-mp-calc-btn {
    width: 100%; padding: 14px; border-radius: 12px; border: none;
    background: #C10206; color: #fff; font-family: 'Inter', sans-serif;
    font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer;
}
.pwa-mp-calc-btn:active { background: #a50205; }
.pwa-mp-calc-result {
    text-align: center; padding: 24px 16px;
    background: rgba(193,2,6,0.15); border: 1px solid rgba(193,2,6,0.3); border-radius: 14px;
}
.pwa-mp-calc-result.hidden { display: none; }
.pwa-mp-calc-result-shots { font-family: 'Montserrat', sans-serif; font-size: 48px; font-weight: 900; color: #fff; }
.pwa-mp-calc-result-label { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 6px; }

/* --- Standings table (PWA dark) ----------------------------------------- */
.pwa-standings-board {
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 20px;
}
.pwa-standings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.pwa-standings-head h2 {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
}
.pwa-standings-head .accent-red { color: #d82b2b; }
.pwa-standings-head .accent-white { color: #fff6e8; }
.pwa-standings-head span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}
.pwa-standings-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.pwa-standings-table col.col-rank { width: 40px; }
.pwa-standings-table col.col-player { width: auto; }
.pwa-standings-table col.col-stat { width: 28px; }
.pwa-standings-table col.col-diff { width: 34px; }
.pwa-standings-table col.col-points { width: 42px; }
.pwa-standings-table thead th {
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    text-align: center;
}
.pwa-standings-table thead th.col-player {
    text-align: left;
    padding-left: 8px;
}
.pwa-standings-table tbody tr + tr td {
    border-top: 1px solid rgba(255,255,255,0.04);
}
.pwa-standings-table tbody tr.is-qualified {
    background: rgba(193,2,6,0.08);
}
.pwa-standings-table td {
    padding: 10px 4px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 700;
    vertical-align: middle;
}
.pwa-standings-table td.col-player {
    text-align: left;
    padding-left: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pwa-standings-rank {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    color: rgba(255,255,255,0.5);
}
.pwa-standings-rank.is-qualified {
    background: #b11d26;
    color: #fff;
}
.pwa-standings-metric {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    color: rgba(255,255,255,0.6);
}
.pwa-standings-metric--positive { color: #5ba3d9; }
.pwa-standings-points {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #b11d26;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

/* --- Match card calendario (card bianche con freccia vincitore) ---------- */
.pwa-mp-cal-group {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}
.pwa-mp-cal-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.pwa-mp-cal-group-head strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    text-transform: uppercase;
}
.pwa-mp-cal-group-head span {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}
.pwa-mp-cal-list {
    display: flex;
    flex-direction: column;
}
.pwa-mp-cal-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    min-height: 56px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
}
.pwa-mp-cal-card:last-child { border-bottom: 0; }

/* Player side */
.pwa-mp-cal-side {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    min-width: 0;
}
.pwa-mp-cal-side.is-home { justify-content: flex-end; text-align: right; }
.pwa-mp-cal-side.is-away { justify-content: flex-start; text-align: left; }

/* Winner — red + arrow */
.pwa-mp-cal-side.is-winner {
    background: #b11d26;
    position: relative;
}
.pwa-mp-cal-side.is-winner.is-home {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    padding-right: 22px;
}
.pwa-mp-cal-side.is-winner.is-away {
    clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%);
    padding-left: 22px;
}

/* Loser — muted */
.pwa-mp-cal-side.is-loser { background: #f9f9f9; }

/* Player text */
.pwa-mp-cal-player {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pwa-mp-cal-side.is-home .pwa-mp-cal-player { align-items: flex-end; }
.pwa-mp-cal-side.is-away .pwa-mp-cal-player { align-items: flex-start; }
.pwa-mp-cal-player strong {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    color: #11161c;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.pwa-mp-cal-player small {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(17,22,28,0.4);
    margin-top: 0;
}
.pwa-mp-cal-side.is-winner .pwa-mp-cal-player strong { color: #fff; }
.pwa-mp-cal-side.is-winner .pwa-mp-cal-player small { color: rgba(255,255,255,0.7); }
.pwa-mp-cal-side.is-loser .pwa-mp-cal-player strong { color: rgba(17,22,28,0.55); }
.pwa-mp-cal-side.is-loser .pwa-mp-cal-player small { color: rgba(17,22,28,0.35); }

/* Center result */
.pwa-mp-cal-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 4px 2px;
    background: #ffffff;
    position: relative;
    z-index: 2;
    gap: 0;
}
.pwa-mp-cal-result { text-align: center; }
.pwa-mp-cal-result-score {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    color: #b11d26;
}
.pwa-mp-cal-result.is-all-square .pwa-mp-cal-result-score { color: #3a3a3a; }
.pwa-mp-cal-result-meta {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(17,22,28,0.5);
}
.pwa-mp-cal-vs {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 900;
    color: rgba(17,22,28,0.12);
}
.pwa-mp-cal-vs-label {
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(17,22,28,0.2);
    margin-top: 1px;
}

/* Status badge */
.pwa-mp-cal-status {
    font-size: 6px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    margin-top: 3px;
    white-space: nowrap;
}
.pwa-mp-cal-status.is-played { color: #0d6847; border: 1px solid rgba(13,104,71,0.3); }
.pwa-mp-cal-status.is-scheduled { color: #d87a10; border: 1px solid rgba(216,122,16,0.3); }
.pwa-mp-cal-status.is-conceded { color: #11161c; border: 1px solid rgba(17,22,28,0.25); }
.pwa-mp-cal-status.is-ritiro { color: #3a3a3a; border: 1px solid rgba(58,58,58,0.3); }
.pwa-mp-cal-status.is-walkover { color: #5a5a5a; border: 1px solid rgba(90,90,90,0.3); }
.pwa-mp-cal-status.is-undisputed { color: rgba(17,22,28,0.35); border: 1px solid rgba(17,22,28,0.12); padding: 2px 4px; letter-spacing: 0.04em; }

/* Group footer */
.pwa-mp-cal-footer {
    padding: 8px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}
