/* Scoped referee UI. The same component and styles serve every football environment. */
.football-referee-hover{--frh-surface:var(--tooltip-surface-soft,var(--panel,var(--paper,#fff)));--frh-line:var(--line,#cbdcd7);--frh-ink:var(--text,#19323b);--frh-muted:var(--muted,#536573);--frh-accent:var(--accent-strong,#075f61);display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px;color:var(--frh-ink);font-family:inherit;font-size:calc(12px * var(--ui-font-scale,1));min-width:0}
.football-referee-hover.has-notes{grid-template-columns:minmax(430px,1fr) minmax(310px,1.05fr)!important;align-items:start}
.football-referee-hover *{box-sizing:border-box}
.football-referee-hover .frh-crew{min-width:0;display:grid;gap:10px}
.football-referee-hover .frh-official{border:1px solid var(--frh-line);border-left:3px solid var(--frh-accent);border-radius:9px;padding:8px;background:color-mix(in srgb,var(--frh-accent) 5%,transparent);min-width:0}
.football-referee-hover .frh-official[data-role=assistant]{border-left-color:#3f8fdf}
.football-referee-hover .frh-official[data-role=fourth]{border-left-color:#9d6fe7}
.football-referee-hover .frh-official[data-role=var],.football-referee-hover .frh-official[data-role=avar]{border-left-color:#d7982f}
.football-referee-hover .frh-identity{display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px;align-items:center}
.football-referee-hover .frh-identity>:first-child,.football-referee-hover .frh-identity img{width:44px!important;height:48px!important;border-radius:7px;object-fit:cover;overflow:hidden}
.football-referee-hover .frh-avatar{display:grid;place-items:center;background:color-mix(in srgb,var(--frh-accent) 14%,transparent);font-weight:900}
.football-referee-hover .frh-identity strong,.football-referee-hover .frh-identity em{display:block;white-space:normal;overflow-wrap:anywhere}
.football-referee-hover .frh-identity strong{font-size:calc(15px * var(--ui-font-scale,1));line-height:1.2;font-weight:900}
.football-referee-hover .frh-identity em{font-size:calc(11px * var(--ui-font-scale,1));color:var(--frh-muted);font-style:normal;font-weight:700}
.football-referee-hover .frh-role{display:inline-block;font-size:calc(9px * var(--ui-font-scale,1));background:color-mix(in srgb,var(--frh-accent) 13%,transparent);border-radius:3px;padding:1px 5px;text-transform:uppercase;font-weight:900}
.football-referee-hover .frh-facts{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 12px;margin:10px 0 9px;line-height:1.3}
.football-referee-hover .frh-facts>div{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px;align-items:baseline;min-width:0}
.football-referee-hover .frh-facts .is-wide{grid-column:1/-1}
.football-referee-hover .frh-facts dt{font-size:calc(10px * var(--ui-font-scale,1));font-weight:800;color:var(--frh-muted)}
.football-referee-hover .frh-facts dd{margin:0;font-size:calc(11px * var(--ui-font-scale,1));font-weight:800;overflow-wrap:anywhere}
.football-referee-hover .frh-stats{padding:7px 8px;border-radius:8px;background:color-mix(in srgb,var(--frh-accent) 10%,transparent);margin:5px 0 9px}
.football-referee-hover .frh-stats-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:5px;color:var(--frh-muted);font-size:calc(11px * var(--ui-font-scale,1))}
.football-referee-hover .frh-stats-heading span{font-size:calc(10px * var(--ui-font-scale,1));text-align:right}
.football-referee-hover .frh-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.football-referee-hover .frh-metric{text-align:center;padding:4px 2px;border-top:2px solid var(--frh-accent);border-radius:6px;background:color-mix(in srgb,var(--frh-accent) 4%,var(--frh-surface));min-width:0;color:var(--frh-ink)}
.football-referee-hover .frh-metric>span{display:block;font-size:calc(9px * var(--ui-font-scale,1));font-weight:800;color:var(--frh-muted)}
.football-referee-hover .frh-metric>strong{display:block;font-size:calc(20px * var(--ui-font-scale,1));line-height:1.1;margin:2px 0}
.football-referee-hover .frh-competition-total{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:5px;font-size:calc(10px * var(--ui-font-scale,1))}
.football-referee-hover .frh-competition-total small{font-size:calc(9px * var(--ui-font-scale,1));color:var(--frh-muted);font-weight:800}
.football-referee-hover .is-yellow.frh-metric,.football-referee-hover .is-yellow.frh-overall-metric{background:#f1dfad;color:#19323b;border-color:#dba820}
.football-referee-hover .is-second-yellow.frh-metric,.football-referee-hover .is-second-yellow.frh-overall-metric{background:linear-gradient(135deg,#f1dfad 50%,#e9c6cb 50%);color:#19323b;border-color:#dba820}
.football-referee-hover .is-red.frh-metric,.football-referee-hover .is-red.frh-overall-metric{background:#e9c6cb;color:#19323b;border-color:#cb4954}
.football-referee-hover .is-penalty.frh-metric,.football-referee-hover .is-penalty.frh-overall-metric{background:#e0e9f1;color:#19323b;border-color:#7095bc}
.football-referee-hover .frh-metric:not(.is-matches)>span,.football-referee-hover .frh-metric:not(.is-matches) small{color:#536573}
.football-referee-hover .frh-overall{display:grid;grid-template-columns:minmax(90px,1.7fr) repeat(5,minmax(0,1fr));gap:5px;align-items:center;border-top:1px solid var(--frh-line);margin-top:6px;padding-top:6px;font-size:calc(11px * var(--ui-font-scale,1))}
.football-referee-hover .frh-overall small{display:block;font-size:calc(9px * var(--ui-font-scale,1));color:var(--frh-muted);font-weight:700}
.football-referee-hover .frh-overall-metric{text-align:center;border-radius:4px;padding:3px 1px}
.football-referee-hover .frh-overall-metric:not(.is-matches) small{color:#536573}
.football-referee-hover summary{cursor:pointer;list-style:none;font-size:calc(11px * var(--ui-font-scale,1));color:var(--frh-accent);font-weight:800;display:flex;gap:6px;align-items:center;padding:6px 0}
.football-referee-hover summary::-webkit-details-marker{display:none}
.football-referee-hover summary::before{content:'▸'}
.football-referee-hover details[open]>summary::before{content:'▾'}
.football-referee-hover summary em,.football-referee-hover summary>span:last-child:not(:first-child){margin-left:auto;font-style:normal;color:var(--frh-muted);text-align:right}
.football-referee-hover .frh-secondary-stats{border-top:1px solid var(--frh-line);border-bottom:1px solid var(--frh-line);margin:6px 0}
.football-referee-hover .frh-research{margin-top:6px}
.football-referee-hover table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:calc(10px * var(--ui-font-scale,1));margin:0}
.football-referee-hover th,.football-referee-hover td{padding:4px 2px;text-align:right;border-bottom:1px solid var(--frh-line);overflow-wrap:anywhere;color:var(--frh-ink);height:auto}
.football-referee-hover th:first-child{text-align:left;font-weight:800}
.football-referee-hover h4{margin:0 0 5px;font-size:calc(11px * var(--ui-font-scale,1));color:var(--frh-accent)}
.football-referee-hover .frh-recent,.football-referee-hover .frh-team-history{margin-top:9px;padding-top:8px;border-top:1px solid var(--frh-line)}
.football-referee-hover .frh-team-history article{margin-top:7px;background:var(--frh-surface);border:1px solid var(--frh-line);border-radius:7px;overflow:hidden}
.football-referee-hover .frh-team-history header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;padding:5px 7px;background:color-mix(in srgb,var(--frh-accent) 7%,transparent);font-size:calc(10px * var(--ui-font-scale,1))}
.football-referee-hover .frh-team-record{display:flex;gap:4px;font-size:calc(9px * var(--ui-font-scale,1))}
.football-referee-hover .frh-team-record b{padding:2px 3px;border-radius:3px;color:#536573;background:#dfe4e6}
.football-referee-hover .frh-team-record .is-win{background:#d4e9de;color:#146443}
.football-referee-hover .frh-team-record .is-loss{background:#eed8db;color:#963843}
.football-referee-hover .frh-history-match{display:flex;align-items:center;gap:4px;padding:6px 5px;white-space:nowrap;border-top:1px solid var(--frh-line);font-size:calc(10px * var(--ui-font-scale,1));min-width:0}
.football-referee-hover .frh-history-match time{flex:0 0 auto;font-size:calc(9px * var(--ui-font-scale,1));color:var(--frh-muted)}
.football-referee-hover .frh-history-match abbr{max-width:35px;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;text-decoration:none;font-size:calc(9px * var(--ui-font-scale,1));color:var(--frh-muted)}
.football-referee-hover .frh-pairing{display:flex;align-items:center;gap:4px;flex:1;min-width:0;font-weight:800}
.football-referee-hover .frh-pairing>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.football-referee-hover .frh-pairing>b{flex-shrink:0}
.football-referee-hover .frh-card-pair{display:inline-flex;align-items:center;gap:2px;flex-shrink:0;font-size:calc(9px * var(--ui-font-scale,1))}
.football-referee-hover .frh-card-pair i{font-style:normal;color:#476b8d;font-weight:900}
.football-referee-hover .frh-card-symbol{width:6px;height:9px;border-radius:1px;background:#dba820;display:inline-block}
.football-referee-hover .is-second-yellow .frh-card-symbol{background:linear-gradient(135deg,#dba820 50%,#cb4954 50%)}
.football-referee-hover .is-red .frh-card-symbol{background:#cb4954}
.football-referee-hover .frh-team-history article>details>summary{padding:6px 7px}
.football-referee-hover .frh-empty{margin:0;padding:7px 5px;color:var(--frh-muted);font-size:calc(11px * var(--ui-font-scale,1))}
.football-referee-hover .frh-notes{min-width:0;border-radius:8px;background:var(--frh-surface);border:1px solid var(--frh-line);overflow:hidden;padding:9px}
.football-referee-hover .frh-notes .app-notes-component{border:0;background:transparent;padding:0;margin:0}
.football-referee-hover .frh-notes .referee-note-target-label{display:flex;align-items:center;gap:9px;font-size:calc(11px * var(--ui-font-scale,1));border:0;margin:0 0 7px;padding:0}
.football-referee-hover .frh-notes .referee-note-target-label>span{flex-shrink:0}
.football-referee-hover .frh-notes .referee-note-target-label select{min-width:0;flex:1;width:auto;height:auto;padding:7px;border:1px solid var(--frh-line);border-radius:6px}
.football-referee-hover .frh-notes .league-note-head{border:0;padding:0}
.football-referee-hover .frh-notes .league-note-head>div:first-child{width:100%}
.football-referee-hover .frh-notes textarea{height:180px;min-height:100px;width:100%;font-size:calc(12px * var(--ui-font-scale,1))}
.football-referee-hover .frh-notes .league-note-new-controls{display:flex;gap:7px;align-items:center;margin-top:7px}
.football-referee-hover .frh-notes .league-note-new-controls select{flex:0 0 45px;width:45px;min-width:0}
.football-referee-hover .frh-notes .league-note-new-controls [data-note-add]{flex:1}
.football-referee-hover .frh-notes .league-note-text-field{position:static;display:block}
@media(max-width:800px){.football-referee-hover.has-notes{grid-template-columns:minmax(0,1fr)!important}.football-referee-hover .frh-facts{grid-template-columns:minmax(0,1fr)}.football-referee-hover .frh-overall{grid-template-columns:minmax(80px,1.6fr) repeat(5,minmax(0,1fr))}}

/* Event shells supply positioning; this shared card supplies the opaque surface. */
.floating-player-tooltip:has(.football-referee-hover){border:1px solid var(--tooltip-line,var(--line,#cbdcd7));border-radius:10px;background:var(--tooltip-surface,var(--panel-strong,#fff));padding:10px;max-height:calc(100dvh - 16px);overflow:auto;box-shadow:0 18px 50px #0004}

.football-referee-hover .frh-notes .league-note-new{border-top:0;padding-top:0;margin-top:0}

.football-referee-hover .frh-recent-match{display:grid;grid-template-columns:70px minmax(0,1fr) auto;gap:6px;padding:6px 3px;border-top:1px solid var(--frh-line);font-size:calc(10px * var(--ui-font-scale,1));align-items:start}
.football-referee-hover .frh-recent-match time,.football-referee-hover .frh-recent-match small{font-size:calc(9px * var(--ui-font-scale,1));color:var(--frh-muted)}
.football-referee-hover .frh-recent-match small,.football-referee-hover .frh-recent-match strong{display:block}

.football-referee-hover .frh-source{display:inline-block;margin-top:6px;font-size:calc(10px * var(--ui-font-scale,1));color:var(--frh-accent)}
