/* 1TTD Trainer publish22 (PRIVATE PREVIEW): simpler Free Play. Presentation only. Created by Sporran. */
html.p22 .p22-top{background:#13261b;border:1px solid #3d6a4b;border-radius:10px;padding:10px 12px;margin:0 0 10px;color:#eef5e6}
html.p22 .p22-note{margin:0 0 8px;font-size:13px;line-height:1.4;background:#1d3526;border-left:3px solid #c4a263;padding:6px 8px;border-radius:4px}
html.p22 .p22-note a{color:#f3d48a;font-weight:700}
html.p22 .p22-h{margin:4px 0 6px;font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:#f3d48a}
html.p22 .p22-load{display:grid;grid-template-columns:1fr 1.4fr;gap:6px 8px;align-items:end}
html.p22 .p22-load label{display:flex;flex-direction:column;font-size:12px;gap:2px;min-width:0}
html.p22 .p22-load .p22-wide{grid-column:1/-1}
html.p22 .p22-load select,html.p22 #p22SeqSel,html.p22 #p22SkillMore{min-height:38px;width:100%;background:#0f1f16;color:#f2f7ec;border:1px solid #6f9274;border-radius:6px;padding:2px 6px;font:inherit;font-size:13px}
html.p22 .p22-load #p22LoadGo{grid-column:1/-1}
html.p22 .p22-fine{font-size:12px;color:#c8d6c2;margin:6px 0 0;line-height:1.35}
html.p22 .p22-btn{min-height:40px;padding:4px 10px;border-radius:8px;border:1px solid #6f9274;background:#1a2d21;color:#f2f7ec;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
html.p22 .p22-btn:disabled{opacity:.5;cursor:default}
html.p22 .p22-btn.p22-primary{background:#c4a263;border-color:#c4a263;color:#1a1408}
html.p22 .p22-btn.p22-warn{border-color:#b56b5c;color:#ffd8cf}
html.p22 .p22-btn.active,html.p22 .p22-btn[aria-pressed="true"]{background:#b6f0a1;color:#122219;border-color:#b6f0a1}
html.p22 .p22-big{width:100%;min-height:46px;font-size:15px}
html.p22 .p22-sec{margin:10px 0;padding:8px 10px;border:1px solid #2f5a3d;border-radius:10px;background:#112118}
html.p22 details.p22-sec>summary{cursor:pointer;font-weight:700;min-height:36px;display:flex;align-items:center;color:#f3d48a}
html.p22 .p22-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
/* main bar: Move, Block, Blitz, Pass / Hand-off, Give Ball, Reposition Player, Undo, Redo (+ End Action) */
html.p22.p22-bar .r4-actions #primaryBar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
html.p22.p22-bar .r4-actions #primaryBar>button{min-height:44px;padding:4px 4px;font-size:12.5px;line-height:1.15;white-space:normal}
html.p22.p22-bar .r4-actions #primaryBar #transfer.r61-hidden,html.p22.p22-bar .r4-actions #primaryBar #r61GiveBall.r61-hidden{display:block!important}
html.p22.p22-bar .r4-actions #primaryBar #move{order:1}html.p22.p22-bar .r4-actions #primaryBar #block{order:2}
html.p22.p22-bar .r4-actions #primaryBar #blitz{order:3}html.p22.p22-bar .r4-actions #primaryBar #transfer{order:4}
html.p22.p22-bar .r4-actions #primaryBar #r61GiveBall{order:5}html.p22.p22-bar .r4-actions #primaryBar #p22Reposition{order:6}
html.p22.p22-bar .r4-actions #primaryBar #undo{order:7}html.p22.p22-bar .r4-actions #primaryBar #redo{order:8}
html.p22.p22-bar .r4-actions #primaryBar #end{order:9;grid-column:1/-1;min-height:36px}
html.p22.p22-bar .r4-actions #primaryBar>:not(button){order:10;grid-column:1/-1}
/* Beginner: one place for each control */
html.p22.r54-beginner #r4tab-practice{display:none!important}
html.p22.r54-beginner #teamBuilderPanel,html.p22.r54-beginner #rosterPresetPanel{display:none!important}
html.p22.r54-beginner #r4panel-replay #replayDock .playbar{display:none!important}
html.p22.r54-beginner #r4panel-save .recordingAccess{display:none!important}
html.p22:not(.r54-beginner) .p22-beg{display:none!important}
html.p22 #p22Teams .r6-lineups{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0}
html.p22 #p22Teams .r6-lineup{min-width:0}
html.p22 #p22Teams .r6-lineup h3{margin:0 0 4px;font-size:13px}
html.p22 #p22Teams .r6-lineup select{max-width:100%}
html.p22 #p22Teams .r6-lineup button{width:100%;min-height:40px;margin-top:6px}
@media (max-width:420px){html.p22 #p22Teams .r6-lineups{grid-template-columns:1fr}}
/* skills */
html.p22 .p22-skillrow{display:flex;flex-wrap:wrap;gap:5px;margin:6px 0}
html.p22 .p22-skill{min-height:34px;padding:3px 9px;font-size:12.5px;border-radius:16px}
html.p22 .p22-more-skill{display:flex;align-items:center;gap:8px;font-size:12px}
html.p22 .p22-more-skill select{flex:1}
/* replay */
html.p22 .p22-replay{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:6px 0}
html.p22 .p22-replay .p22-reset{grid-column:1/-1}
html.p22 .p22-replay2{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:4px 0 8px}
html.p22 .p22-chk{display:flex;align-items:center;gap:6px;font-size:13px;min-height:36px}
/* save */
html.p22 #p22Save .p22-seqlab{display:block;margin:10px 0 4px;font-size:12px;font-weight:700}
html.p22 .p22-seqacts{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
html.p22 .p22-seqacts .p22-btn{flex:1 1 40%}
html.p22 .p22-more>summary{color:#cfe0c8!important}
/* practise against a defence: custom dropdowns with pictures */
html.p22 .p22-ddrow{margin:8px 0}
html.p22 .p22-ddlab{display:block;font-size:12px;font-weight:700;margin:0 0 3px}
html.p22 .p22-dd{position:relative}
html.p22 .p22-dd-btn{width:100%;min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 10px;background:#0f1f16;color:#f2f7ec;border:1px solid #6f9274;border-radius:8px;font:inherit;font-size:13px;cursor:pointer;text-align:left}
html.p22 .p22-dd-cur{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
html.p22 .p22-dd-list{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 2px);max-height:320px;overflow:auto;margin:0;padding:4px;list-style:none;background:#0f1f16;border:1px solid #6f9274;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.5)}
html.p22 .p22-dd-list:focus{outline:2px solid #f7cf84}
html.p22 .p22-dd-opt{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px;border-radius:6px;cursor:pointer;font-size:13px;min-height:36px}
html.p22 .p22-dd-opt:hover,html.p22 .p22-dd-opt.is-active{background:#24402e}
html.p22 .p22-dd-opt[aria-selected="true"]{outline:1px solid #c4a263}
html.p22 .p22-dd-id{font-variant-numeric:tabular-nums;color:#f3d48a;font-weight:700;font-size:12px}
html.p22 .p22-dd-note{flex-basis:100%;color:#c8d6c2;font-size:11.5px}
html.p22 .p22-mini{flex:0 0 auto}
html.p22 .p22-mini rect.off{fill:#2d4b37;stroke:#6f9274;stroke-width:.6}
html.p22 .p22-mini rect.on{fill:#a77bd8;stroke:#e6d4ff;stroke-width:.6}
html.p22 .p22-mini-back rect.bg{fill:#1d3b28;stroke:#6f9274;stroke-width:.6}
html.p22 .p22-mini-back line.wz{stroke:#b8c9b0;stroke-dasharray:2 2;stroke-width:.5}
/* the selected player's card: compact and sticky at the bottom while the pitch scrolls (Beginner) */
html.p22.r54-beginner .boardPanel>#playerDock{position:sticky!important;bottom:var(--p22-bub,0px)!important;z-index:35;padding:5px 8px!important;margin:4px 0 0!important;font-size:12px;line-height:1.3;background:#0f1f16f2;border:1px solid #6f9274;border-radius:8px;box-shadow:0 -4px 14px rgba(0,0,0,.45)}
html.p22.r54-beginner .boardPanel>#playerDock .playerDockInfo{display:flex;flex-wrap:wrap;gap:2px 10px;align-items:baseline}
html.p22.r54-beginner .boardPanel>#playerDock strong{font-size:13px}
html.p22.r54-beginner .boardPanel>#playerDock #playerDockSkills{flex-basis:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* odds bubble under the pitch, sticky at the bottom */
html.p22 .p22-bubble{position:sticky;bottom:0;z-index:36;margin:4px auto 0;max-width:520px;background:#3a2a17f5;border:1px solid #b98a4a;border-radius:18px;padding:4px 10px;color:#f6ead2;box-shadow:0 -4px 14px rgba(0,0,0,.45)}
html.p22 .p22-bubble.is-open{border-radius:12px}
html.p22 .p22-bubble-t{all:unset;cursor:pointer;display:flex;align-items:center;gap:6px;width:100%;min-height:30px;font-size:13px;font-variant-numeric:tabular-nums}
html.p22 .p22-bubble-t b{color:#ffd99a;font-size:12px;text-transform:uppercase;letter-spacing:.03em}
html.p22 .p22-bubble-t:focus-visible{outline:2px solid #f7cf84}
html.p22 .p22-bubble-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:4px 0}
html.p22 .p22-bubble-grid div{background:#24180c;border-radius:7px;padding:4px 6px}
html.p22 .p22-bubble-grid small{display:block;font-size:10.5px;color:#e5cfa6;line-height:1.2}
html.p22 .p22-bubble-grid strong{font-size:16px;color:#ffe3ad}
html.p22 .p22-bubble .p22-fine{color:#d9c39b;font-size:11px}
@media (max-width:600px){html.p22.p22-bar .r4-actions #primaryBar>button{font-size:11.5px;min-height:42px}html.p22 .p22-replay{grid-template-columns:1fr 1fr}}
html.p22 #p22Say{font-size:12px;color:#ffd99a;margin:4px 0 0}html.p22 #p22Say:empty{display:none}
html.p22.r54-beginner.p22-nosel .boardPanel>#playerDock{display:none!important}
html.p22 .p22-top.p22-flash{outline:3px solid #f7cf84;outline-offset:2px}
html.p22 .p22-dd-group{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#c4a263;padding:6px 6px 2px;border-top:1px solid #2f5a3d}html.p22 .p22-dd-group:first-child{border-top:0}
/* the compact card floats over the pitch bottom: let taps fall through to the squares underneath */
html.p22.r54-beginner .boardPanel>#playerDock{pointer-events:none;opacity:.94}
html.p22.r54-beginner .boardPanel>#playerDock :is(a,button,select,input,summary,label){pointer-events:auto}
/* ---------- publish23 ---------- */
html.p22.r54-beginner .r4-actions #primaryBar #end{display:none!important}
html.p22 .p23-endhint{margin:4px 2px 0;font-size:11.5px}
/* Teams: one column in the rail (no squeezed columns, the Team label sits above its select) */
html.p22 #p22Teams .r6-lineups{grid-template-columns:1fr!important}
html.p22 #p22Teams .r6-lineup>label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;margin:0 0 6px}
html.p22 #p22Teams .r6-lineup>label select{width:100%;margin:0}
html.p22 .p23-addrow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:end;margin:0 0 8px;padding:6px;border:1px dashed rgba(196,162,99,.45);border-radius:7px}
html.p22 .p23-addrow .p23-poslab{display:grid;gap:2px;font-size:12px;min-width:0}
html.p22 .p23-addrow select{width:100%;min-height:36px;margin:0}
html.p22 #p22Teams .p23-addrow button{width:auto;margin:0;min-height:36px;padding:4px 12px;font-weight:700}
html.p22 #p22Teams .r6-lineup [id$="RosterCounts"] label,html.p22 #p22Teams .r6-lineup [id$="RosterCounts"]>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}
html.p22 .p23-addmoved .r61-addrow,html.p22 .p23-addmoved .r61-hint{display:none!important}
html.p22 .p23-del{width:100%;min-height:40px}
html.p22 .p23-del.active{outline:2px solid #f3a49a}
/* skill colours: outline when off, filled when the player has it */
html.p22 .p22-skill[data-skc]{border:2px solid var(--skc-bg)!important;border-left-width:6px!important}
html.p22 .p22-skill[data-skc][aria-pressed="true"]{background:var(--skc-bg)!important;color:var(--skc-fg)!important;font-weight:800}
html.p22 .p22-skill[data-skc][aria-pressed="true"]::before{content:'✓ '}
html.p22 .p23-chips{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:6px}
html.p22 .p23-chip{display:inline-block;border:1px solid;border-radius:10px;padding:0 8px;font-size:12px;line-height:20px;cursor:pointer;font-weight:700}
/* Chance of success bubble: on by default, both figures side by side */
html.p22 .p22-bubble{max-width:none;margin:6px 0 0;border-radius:12px;padding:4px 8px}
html.p22 .p22-bubble-t{flex-wrap:wrap;gap:4px 12px}
html.p22 .p22-bubble-t>b{flex:0 0 auto}
html.p22 .p23-pair{display:inline-flex;align-items:baseline;gap:5px;background:#24180c;border-radius:8px;padding:1px 8px}
html.p22 .p23-pair small{font-size:10.5px;color:#e5cfa6;text-transform:uppercase;letter-spacing:.02em}
html.p22 .p23-pair strong{font-size:16px;color:#ffe3ad;font-variant-numeric:tabular-nums}
html.p22 .p22-pm{margin-left:auto;min-height:26px;padding:1px 9px;border-radius:12px;border:1px solid #b98a4a;background:#24180c;color:#ffe3ad;font-size:12px;font-weight:700;line-height:24px}
html.p22 .p23-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
html.p22 .p23-rr{display:inline-flex;gap:6px;align-items:center;font-size:12px;margin:2px 0}
html.p22 .p22-bubble.is-empty .p23-pair strong{font-size:13px;opacity:.8}

/* publish23: Chance of success bubble in the side rail on wide screens */
html.p22 .p22-bubble.p23-inrail{position:static;max-width:none;margin:0 0 10px;border-radius:12px;box-shadow:none}
html.p22.p22-bubble-on{scroll-padding-bottom:calc(var(--p22-bub,0px) + 12px)}
