/* v34: TKG green controls; Live Scoring only */
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-pilot-stepper button,
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole .tkg21-primary{background:#005e32!important;color:#fff!important}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-pilot-progress>div{background:#005e32!important}

/* v35: logo alongside language picker, center title and disclaimer */
body.tkg26-live-scoring-page .tkg35-brand-language{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{margin:0!important;min-width:0;flex:1;max-width:215px;background:#fff;border-radius:9px;padding:5px 7px;line-height:0}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{display:block;width:100%;height:auto;max-height:65px;object-fit:contain;object-position:left center}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg25-language{margin:0!important;flex:0 0 auto}
body.tkg26-live-scoring-page .tkg21-pilot h1{text-align:center!important}
body.tkg26-live-scoring-page .tkg27-inline-note{text-align:center!important}
body.tkg26-live-scoring-page .tkg27-inline-note strong,body.tkg26-live-scoring-page .tkg27-inline-note p{text-align:center!important}
@media(max-width:390px){body.tkg26-live-scoring-page .tkg35-brand-language{gap:7px}body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{max-width:155px;padding:4px}body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{max-height:52px}}

/* v36: compact transparent brand with subtle white outline (no white tile) */
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{
  flex:0 1 160px!important;max-width:160px!important;
  background:transparent!important;border-radius:0!important;
  padding:0!important;overflow:visible!important;
}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{
  width:100%!important;height:auto!important;max-height:none!important;
  filter:drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff);
}
@media(max-width:390px){
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{flex-basis:116px!important;max-width:116px!important}
}

/* v37: match the height of the TKG letters to the language selector (~48px).
   The supplied logo includes a small THE BEST JOIN line above the TKG letters. */
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{
  flex:0 0 132px!important;max-width:132px!important;width:132px!important;
}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{
  width:132px!important;max-width:100%!important;height:auto!important;
}
@media(max-width:350px){
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{flex-basis:118px!important;max-width:118px!important;width:118px!important}
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{width:118px!important}
}

/* v38: slightly smaller logo (~9%) while preserving white stroke and alignment */
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{
  flex:0 0 120px!important;max-width:120px!important;width:120px!important;
}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{width:120px!important}
@media(max-width:350px){
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{flex-basis:108px!important;max-width:108px!important;width:108px!important}
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{width:108px!important}
}

/* v39: Hole / PAR / HCP / YARDS in one compact header row */
body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-info{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:nowrap}
body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-label{font-size:19px;white-space:nowrap;font-weight:750}
body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-stats{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:10px;letter-spacing:0}
body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-stats>span{display:inline-flex;align-items:baseline;gap:3px;color:#527565}
body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-stats b{font-size:13px;color:#005e32}
@media(max-width:390px){body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-info{gap:5px}body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-label{font-size:17px}body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-stats{gap:5px;font-size:9px}body.tkg26-live-scoring-page .tkg21-hole summary .tkg39-hole-stats b{font-size:11px}}

/* v40: accessible two-line hole heading with three evenly spaced metadata cells. */
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-info{
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 gap:10px!important;width:100%!important;min-width:0!important;flex:0 0 100%!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-label{
 display:block!important;flex:none!important;font-size:25px!important;line-height:1.2!important;
 color:#005e32!important;white-space:normal!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-stats{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:8px!important;width:100%!important;white-space:normal!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-stats>span{
 display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
 flex:none!important;min-width:0!important;gap:4px!important;
 padding:9px 3px!important;background:#e7f0ea!important;border-radius:10px!important;
 font-size:12px!important;line-height:1.2!important;font-weight:700!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-stats b{
 display:block!important;font-size:21px!important;line-height:1.2!important;font-weight:800!important;
}
@media(max-width:390px){
 body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-stats{gap:6px!important}
 body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-stats>span{font-size:11px!important;padding:8px 2px!important}
 body.tkg26-live-scoring-page .tkg21-pilot .tkg21-hole summary .tkg39-hole-stats b{font-size:19px!important}
}

/* v44: Live Scoring visual identity matches Tournament Center. Scoped to Live Scoring. */
body.tkg26-live-scoring-page .tkg21-pilot,
body.tkg26-live-scoring-page .tkg21 {
 background:linear-gradient(105deg,#003c28 0%,#005e32 67%,#16784d 100%)!important;
}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand {
 flex:0 0 90px!important;width:90px!important;max-width:90px!important;
 padding:0!important;background:transparent!important;border:0!important;
}
body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img {
 display:block!important;width:90px!important;max-width:90px!important;
 height:auto!important;max-height:75px!important;object-fit:contain!important;
 object-position:left center!important;filter:none!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-pilot-tab:not(.active) {
 background:rgba(255,255,255,.075)!important;border-color:#b5d6c3!important;color:#fff!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-pilot-tab.active {
 background:#e6f4ed!important;color:#0b4737!important;
}
body.tkg26-live-scoring-page .tkg21-pilot .tkg21-round {background:#f8fbfa!important}
@media(max-width:350px){
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand{flex-basis:80px!important;width:80px!important;max-width:80px!important}
 body.tkg26-live-scoring-page .tkg35-brand-language .tkg21-brand img{width:80px!important;max-width:80px!important}
}

/* v45: Mobile-only edge gutters. Break out of the WordPress content column;
   leave desktop layout, scoring cards, brand, and functionality untouched. */
@media (max-width: 782px) {
  body.tkg26-live-scoring-page .tkg21 {
    box-sizing: border-box!important;
    width: calc(100vw - 16px)!important;
    max-width: none!important;
    margin-left: calc(50% - 50vw + 8px)!important;
    margin-right: 0!important;
    padding-left: 8px!important;
    padding-right: 8px!important;
  }
  body.tkg26-live-scoring-page .tkg21 .tkg21-shell {
    width: 100%!important;
    max-width: none!important;
    box-sizing: border-box!important;
  }
}

/* v46: full-bleed app-like mobile presentation, Live Scoring page only. */
@media (max-width: 782px) {
  html:has(body.tkg26-live-scoring-page),
  body.tkg26-live-scoring-page {
    background:#003c28!important;
    margin:0!important;
    padding:0!important;
    overflow-x:clip!important;
  }
  body.tkg26-live-scoring-page .wp-site-blocks,
  body.tkg26-live-scoring-page .wp-site-blocks > main,
  body.tkg26-live-scoring-page .wp-block-post-content,
  body.tkg26-live-scoring-page .entry-content {
    background:transparent!important;
    padding:0!important;
    margin:0!important;
    max-width:none!important;
    width:100%!important;
  }
  /* Hide only the theme masthead on the dedicated Live Scoring screen. */
  body.tkg26-live-scoring-page .wp-site-blocks > header,
  body.tkg26-live-scoring-page header.wp-block-template-part,
  body.tkg26-live-scoring-page #masthead {display:none!important}
  body.tkg26-live-scoring-page .tkg21 {
    width:100vw!important;
    max-width:100vw!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
    position:relative!important;
    left:50%!important;
    transform:translateX(-50%)!important;
  }
  body.tkg26-live-scoring-page .tkg21 .tkg21-shell,
  body.tkg26-live-scoring-page .tkg21-pilot {
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    margin:0!important;
  }
  body.tkg26-live-scoring-page .tkg21-pilot {
    border-radius:0!important;
    min-height:100dvh!important;
    padding-top:max(18px,env(safe-area-inset-top,0px))!important;
    padding-left:max(12px,env(safe-area-inset-left,0px))!important;
    padding-right:max(12px,env(safe-area-inset-right,0px))!important;
    padding-bottom:max(16px,env(safe-area-inset-bottom,0px))!important;
  }
}
