/*
  FASE 1 – UX Prototype styling (mobile-first)
  Scoped under .sccwp-proto to avoid theme collisions inside WordPress.
*/

/*
  IMPORTANT:
  - Keep CSS variables scoped to the prototype container to avoid bleeding into WP themes.
*/

.sccwp-proto{
  --bg:#f4efe6;
  --card:#f8f3ea;
  --ink:#1d1d1d;
  --muted:rgba(29,29,29,.65);
  --stroke:rgba(29,29,29,.10);
  --shadow:0 8px 20px rgba(0,0,0,.045);
  /* palette (referentie – overgenomen uit sample) */
  --excellent:#00d2ff;
  --good:#9de5c5;
  --moderate:#e9e78e;
  --poor:#f793bb;

  --swell1:#015ca9;
  --swell2:#0aadd1;
  --swell3:#0ed1c2;
  --wind:#e53195;
  --windScoreLight:#fdebf4;
  --windScoreStrong:#c50b63;

  /* legacy vars still used in some svg */
  --turq1:var(--swell1);
  --turq2:var(--swell2);
  --turq3:var(--swell3);
  --pink:var(--wind);
  --ring:rgba(29,29,29,.22);
}

.sccwp-proto *{box-sizing:border-box}

body.sccwp-proto{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:var(--bg);
  color:var(--ink);
}

@media (prefers-reduced-motion: reduce){
  .sccwp-proto *{ scroll-behavior:auto !important; }
  .sccwp-proto .iconbtn:active{ transform:none; }
}

.sccwp-proto button,
.sccwp-proto input{
  font:inherit;
}

.sccwp-proto .app{
  max-width:420px;
  margin:0 auto;
  padding:16px 16px 28px;
}

.sccwp-proto .topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 2px 14px;
}
.sccwp-proto .topbar__spot{font-weight:680; font-size:22px; letter-spacing:.1px}
.sccwp-proto .topbar__sub{display:none}
.sccwp-proto .iconbtn{
  width:42px; height:42px;
  border-radius:999px;
  border:0;
  background:rgba(255,255,255,.55);
  box-shadow:0 6px 14px rgba(0,0,0,.04);
  font-size:22px;
  line-height:1;
  color:var(--ink);
  cursor:pointer;
}

.sccwp-proto .iconbtn--small{
  width:34px; height:34px;
  font-size:18px;
  background:rgba(255,255,255,.45);
}

.sccwp-proto .iconbtn:active{transform:scale(.98)}

.sccwp-proto .card{
  background:var(--card);
  border:0;
  border-radius:20px;
  box-shadow:var(--shadow);
  overflow:hidden;
  margin:0 0 14px;
}

.sccwp-proto .stickybar{
  position:sticky;
  top:0;
  z-index:30;
  background:linear-gradient(180deg, rgba(244,239,230,.92), rgba(244,239,230,.72));
  backdrop-filter: blur(6px);
  padding:0 0 12px;
  margin:-6px 0 10px;
}

.sccwp-proto .mapcard{position:relative; margin-bottom:12px}
.sccwp-proto .map{
  height:268px;
  background:linear-gradient(180deg, rgba(0,188,212,.06), rgba(0,0,0,0));
}
.sccwp-proto .map img{width:100%; height:100%; object-fit:cover; object-position:center; display:block}
.sccwp-proto .map__overlay{
  position:absolute; inset:0;
  padding:14px;
  pointer-events:none;
}

.sccwp-proto .rose{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:285px;
  height:275px;
  border-radius:999px;
  background:transparent;
}


.sccwp-proto .readoutcard{
  margin-bottom:12px;
  padding:10px 12px;
}

.sccwp-proto .readout__line{ padding:7px 10px; }

.sccwp-proto .readout{
  display:grid;
  gap:0;
}

.sccwp-proto .readout__line{
  display:grid;
  /* icon | label | value (tab stops) */
  grid-template-columns: 22px 104px 1fr;
  align-items:center;
  column-gap:10px;
  font-size:13px;
  padding:6px 6px;
  border-radius:12px;
}

.sccwp-proto .readout__icon{
  width:22px;height:22px;border-radius:7px;
  display:grid;place-items:center;
  flex:0 0 22px;
  color:#fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.10) inset;
}
.readout__icon svg{ display:block; }

.sccwp-proto .readout__icon--swell1{ background:var(--swell1); }
.sccwp-proto .readout__icon--swell2{ background:var(--swell2); }
.sccwp-proto .readout__icon--swell3{ background:var(--swell3); }
.sccwp-proto .readout__icon--wind{ background:var(--wind); }

.sccwp-proto .readout__k{color:rgba(29,29,29,.55); font-weight:500}
.sccwp-proto .readout__v{font-weight:500; text-align:left; white-space:nowrap}

/* tabbed columns in the value part: 0.6 m | 7.1 s | NW | 320° */
.sccwp-proto .readout__cols{
  display:grid;
  grid-template-columns: 40px 40px 42px 46px;
  gap:0;
  align-items:center;
  justify-items:start;
  border-left:none;
}
.readout__cols > span{ white-space:nowrap; }
.readout__cols > span.is-empty{ opacity:0; }
.sccwp-proto .readout__cols > span.is-deg{ display:none; }

/* show degrees when we have room */
@media (min-width: 390px){
  .sccwp-proto .readout__cols > span.is-deg{ display:inline; }
}


.sccwp-proto .scorecard{padding:12px 12px 14px; margin-bottom:12px}

.sccwp-proto .dayrow{
  display:grid;
  /* Pull prev/next closer to the middle like the reference */
  grid-template-columns: auto 1fr auto 1fr auto;
  gap:10px;
  align-items:center;
  font-weight:600;
  font-size:16px;
  padding:0 2px;
}
.sccwp-proto #prevDay{justify-self:end;}
.sccwp-proto #nextDay{justify-self:start;}
.sccwp-proto .dayrow__date{justify-self:start}
.sccwp-proto .dayrow__day{justify-self:center; color:rgba(29,29,29,.75)}
.sccwp-proto .dayrow__time{justify-self:end}

.sccwp-proto .scorehead{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:25px;
  background:transparent;
  position:relative;
  padding-bottom:18px;
}

.sccwp-proto .label{
  font-size:18px;
  font-weight:600;
  color:#1d1d1d;
  opacity:.85;
  margin-bottom:18px;
}

.sccwp-proto .rating{

  position:absolute;
  left:0;
  bottom:-12px;
  font-size:18px;
  font-weight:400;
  letter-spacing:.01em;
  transform:translateX(-50%);
  pointer-events:none;
  color:var(--ink);
  opacity:.92;
  white-space:nowrap;
}
.sccwp-proto .hour{font-size:13px; font-weight:500; color:rgba(29,29,29,.55)}

.sccwp-proto .scorebar{
  /* Always fit 24 hours in view (no overflow outside the card) */
  display:grid;
  grid-template-columns:repeat(var(--cols, 24), minmax(0, 1fr));
  gap:2px;
  align-items:stretch;
  position:relative;
  padding:6px 0;
  border-radius:18px;
  background:transparent;
  width:100%;
  overflow: visible;
  padding: 0 2px;

}
.sccwp-proto .scorecell{
  width:auto;
  height:38px;
  border-radius:10px;
  background:rgba(0,0,0,.08);
  border:3px solid rgba(0,0,0,.12);
  box-sizing:border-box;
  position:relative; /* required for now/active pseudo-elements */
}

/* current-time marker (light outline + dot) */
.sccwp-proto .scorecell--now{
  outline:2px solid rgba(29,29,29,.25);
  outline-offset:2px;
}
.sccwp-proto .scorecell--now::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:6px;
  height:6px;
  border-radius:999px;
  background:rgba(29,29,29,.55);
  transform:translate(-50%,-50%);
}

/* selected marker (black outline + small ticks) */
.sccwp-proto .scorecell{ transition: transform 120ms ease, outline-color 120ms ease; }
.sccwp-proto .scorecell--active{
  outline:3px solid rgba(0,0,0,.85);
  outline-offset:2px;
  transform: scale(1.08);
  z-index:3;
}
.sccwp-proto .scorecell--active::before,
.sccwp-proto .scorecell--active::after{
  content:"";
  position:absolute;
  left:50%;
  width:6px;
  height:10px;
  background:rgba(0,0,0,.85);
  transform:translateX(-50%);
  border-radius:2px;
}
.sccwp-proto .scorecell--active::before{ top:-14px; }
.sccwp-proto .scorecell--active::after{ bottom:-14px; }

.sccwp-proto .scorehandle{ display:none; }

.sccwp-proto .scorebar.is-dense{
  gap:2px;
}
.sccwp-proto .scorebar.is-dense .scorecell{
  height:28px;
  border-width:2px;
  border-radius:8px;
}


.sccwp-proto .scorelabel{
  display:none;
}

.sccwp-proto .factors{margin-top:10px; display:grid; grid-template-columns:1fr; gap:8px}
.sccwp-proto .factor{
  display:grid;
  /* fixed key column so pills + values align perfectly across rows */
  grid-template-columns: 150px 1fr;
  align-items:center;
  column-gap:10px;
  padding:4px 2px;
  background:transparent;
  border:0;
  border-radius:0;
  font-size:13px;
}

.sccwp-proto .factor__k{color:rgba(29,29,29,.58); font-weight:500}
/* pill + columns as grid so spacing is consistent */
.sccwp-proto .factor__v{
  font-weight:500;
  display:grid;
  grid-template-columns: 12px 1fr;
  align-items:center;
  column-gap:6px;
  min-width:0;
}

.sccwp-proto .factor__cols{
  display:grid;
  grid-template-columns: 88px 58px 1fr;
  gap:4px;
  align-items:center;
  min-width:0;
}
.factor__cols > span{ white-space:nowrap; }
.factor__cols > span.is-empty{ opacity:0; }
/* last value (direction) hugs the right to create clear separation */
.factor__cols > span:last-child{ justify-self:end; text-align:right; }


.sccwp-proto .pill{
  width:12px; height:12px;
  border-radius:4px;
  background:rgba(0,0,0,.12);
}





.sccwp-proto .charthead{display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:8px; padding:12px 12px 0}
.sccwp-proto .chart{padding:0 12px 12px}
.sccwp-proto .chartmeta{ display:none; }
.sccwp-proto .svgwrap{width:100%; height:156px; background:rgba(255,255,255,.18); border:0; border-radius:16px; overflow:hidden; margin-bottom:10px}

/* Wind scorebar label (matches the Conditions label behaviour) */
.sccwp-proto .windbarlabel{ position:relative; height:0; }
.sccwp-proto .windbarlabel__text{
  position:absolute;
  left:0;
  top:-18px;
  transform:translateX(-50%);
  font-size:14px;
  font-weight:500;
  color:rgba(29,29,29,.78);
  white-space:nowrap;
  pointer-events:none;
}

.sccwp-proto .chart{touch-action:none}


/* Defensive: prevent WP themes from styling SVG text weirdly */
.sccwp-proto svg text{font-family:inherit}



/* Wind scorebar under chart (match Conditions scorebar sizing) */
.windscorebar{margin-top:10px;}


/* Readout value/unit styling for scanability */
.sccwp-proto .readout__cols .val{ font-weight:650; color:rgba(29,29,29,.90); }
.sccwp-proto .readout__cols .unit{ font-size:0.90em; opacity:0.70; }


/* Rating label caret to visually link it to the active score cell */
/* (note: caret removed in this prototype; keep section header but no stray selectors) */

/* Mode toggle + nav (Bondi-style) */
.sccwp-proto .modebar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:10px 6px 2px;
  flex-wrap:nowrap; /* never drop nav arrows to a new line */
}
.sccwp-proto .seg{
  display:flex;
  border:2px solid rgba(29,29,29,.40);
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.35);
  flex:1 1 auto;   /* allow the segment to shrink on small screens */
  min-width:0;
}
.sccwp-proto .segbtn{
  appearance:none;
  border:0;
  background:transparent;
  padding:10px 14px;
  font-weight:600;
  font-size:15px;
  color:rgba(29,29,29,.80);
  min-width:0;
  flex:1 1 0;
}
.sccwp-proto .segbtn + .segbtn{
  border-left:2px solid rgba(29,29,29,.25);
}
.sccwp-proto .segbtn--active{
  background:rgba(190,196,120,.55);
}
.sccwp-proto .navbtns{
  display:flex;
  gap:10px;
  flex:0 0 auto;
  flex-shrink:0;
}

/* Extra-tight on small mobile so the mode toggle + arrows always fit */
/* Ensure the toggle + arrows always fit on one row */
@media (max-width: 420px){
  .sccwp-proto .modebar{ gap:10px; }
  .sccwp-proto .segbtn{ padding:9px 10px; font-size:14px; }
  .sccwp-proto .modebar .iconbtn{ width:48px; height:48px; font-size:24px; }
}

@media (max-width: 360px){
  .sccwp-proto .modebar{ gap:10px; }
  .sccwp-proto .segbtn{ padding:9px 10px; font-size:14px; }
  .sccwp-proto .modebar .iconbtn{ width:44px; height:44px; font-size:22px; }
}

/* Modebar nav buttons (scoped so it doesn't override other iconbtn uses) */
.sccwp-proto .modebar .iconbtn{
  width:52px;
  height:52px;
  border-radius:999px;
  border:0;
  background:rgba(190,196,120,.55);
  font-size:26px;
  line-height:1;
  display:grid;
  place-items:center;
  color:rgba(29,29,29,.80);
}

/* Wind scorebar cells */
.sccwp-proto .windscorebar{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:1fr;
  gap:2px;
  padding:10px 2px 6px;
}
.sccwp-proto .windscorecell{
  height:28px;
  border-radius:9px;
  opacity:0.95;
  border:2px solid rgba(29,29,29,.08);
  box-sizing:border-box;
  position:relative; /* required for now/active pseudo-elements */
}

/* current-time marker (wind bar) */
.sccwp-proto .windscorecell--now{
  outline:2px solid rgba(29,29,29,.25);
  outline-offset:2px;
}
.sccwp-proto .windscorecell--now::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:6px;
  height:6px;
  border-radius:999px;
  background:rgba(29,29,29,.55);
  transform:translate(-50%,-50%);
}

/* selected marker (wind bar) – match Conditions UX */
.sccwp-proto .windscorecell{ transition: transform 120ms ease, outline-color 120ms ease; }
.sccwp-proto .windscorecell--active{
  outline:3px solid rgba(0,0,0,.85);
  outline-offset:2px;
  transform: scale(1.08);
  z-index:3;
}
.sccwp-proto .windscorecell--active::before,
.sccwp-proto .windscorecell--active::after{
  content:"";
  position:absolute;
  left:50%;
  width:6px;
  height:10px;
  background:rgba(0,0,0,.85);
  transform:translateX(-50%);
  border-radius:2px;
}
.sccwp-proto .windscorecell--active::before{ top:-14px; }
.sccwp-proto .windscorecell--active::after{ bottom:-14px; }

.sccwp-proto .windscore__label{
  font-size:18px;
  font-weight:650;
  color:rgba(29,29,29,.82);
  position:absolute;
  top:2px;
  left:0;
  transform:translateX(-50%);
  display:inline-block;
  white-space:nowrap;
  pointer-events:none;
}

/* Footer zone under charts (used for wind scorebar + label)
   Adds safe padding so rounded card corners never clip content. */
.sccwp-proto .chartfoot{
  position:relative;
  padding:18px 12px 14px; /* top padding = label safe-zone */
}

.sccwp-proto .windscorebar.is-dense{ gap:2px; padding:8px 2px 4px; }
.sccwp-proto .windscorebar.is-dense .windscorecell{ height:22px; border-radius:7px; }


/* Prevent text selection while scrubbing (mobile + desktop) */
.sccwp-proto .scorebar,
.sccwp-proto .windscorebar,
.sccwp-proto .svgwrap,
.sccwp-proto #rose{
  -webkit-user-select:none;
  user-select:none;
  touch-action:none;
}

/* UX: prevent accidental text selection while scrubbing */
#app, .chart, .scorebar, .scorebar__cells, .scorecell { 
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}


/* Build 0.0.16.9.166 (Build 1 hotfix1): fix syntax error in scorebar render */
.sccwp-proto .scorebar,
.sccwp-proto .windscorebar{
  overflow:visible;
  border-radius:0;
}

.sccwp-proto .scorecell:first-child{ border-top-left-radius:10px; border-bottom-left-radius:10px; }
.sccwp-proto .scorecell:last-child{ border-top-right-radius:10px; border-bottom-right-radius:10px; }

.sccwp-proto .windscorecell:first-child{ border-top-left-radius:10px; border-bottom-left-radius:10px; }
.sccwp-proto .windscorecell:last-child{ border-top-right-radius:10px; border-bottom-right-radius:10px; }

/* Make scrub feel consistent on touch */
.sccwp-proto .scorebar,
.sccwp-proto #windScorebar{
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}

