/* ============================================================
   forecast.css — SurfTrip.ph v2
   Forecast page specific styles
   ============================================================ */

/* --- Guide strip (Option C) ------------------------------- */
.guide-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  text-decoration: none;
  max-width: 340px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.guide-strip:hover {
  border-color: rgba(93,202,165,0.3);
  background: rgba(93,202,165,0.05);
}

.guide-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-strip-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(93,202,165,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-strip-title {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-primary);
}

.guide-strip-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.guide-strip-arrow {
  font-size: 1rem;
  color: rgba(255,255,255,0.3);
  margin-left: 8px;
}

/* --- Hourly chart ----------------------------------------- */
.hourly-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: 4px;
}

.hourly-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Column headers — desktop only */
.hourly-col-headers {
  display: none;
}

@media (min-width: 768px) {
  .hourly-col-headers {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 1fr 64px;
    gap: 1rem;
    padding: 0 14px;
    margin-bottom: 4px;
  }

  .hourly-col-hdr {
    font-size: 0.55rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
  }

  .hourly-col-hdr.center { text-align: center; }
}

/* ---- Mobile: horizontal scroll-snap cards ---------------- */
.time-slots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: var(--space-sm);
}

.time-slots::-webkit-scrollbar { display: none; }

/* ---- Desktop: vertical stack of rows --------------------- */
@media (min-width: 768px) {
  .time-slots {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-x: visible;
    scroll-snap-type: none;
  }
}

/* ---- Mobile card (vertical stacked) ---------------------- */
.time-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 0.5px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  /* Mobile: fixed width cards that snap */
  flex-shrink: 0;
  min-width: 150px;
  scroll-snap-align: start;
}

.time-slot:hover {
  border-color: rgba(93,202,165,0.25);
  background: rgba(93,202,165,0.04);
}

.time-slot.best {
  border-color: rgba(93,202,165,0.4);
  background: rgba(93,202,165,0.08);
}

/* ---- Desktop: horizontal row layout ---------------------- */
@media (min-width: 768px) {
  .time-slot {
    display: grid;
    grid-template-columns: 72px 1fr 1fr 1fr 64px;
    align-items: center;
    gap: 1rem;
    flex-direction: unset;
    padding: 10px 14px;
    min-width: unset;
    scroll-snap-align: unset;
    border-radius: 9px;
  }
}

/* Time label */
.slot-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

.time-slot.best .slot-time { color: var(--color-teal); }

.slot-best-label {
  display: block;
  font-size: 0.55rem;
  color: var(--color-teal);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Wave bar — vertical on mobile, horizontal on desktop */
.slot-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.slot-bar-track {
  width: 100%;
  height: 44px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.slot-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

@media (min-width: 768px) {
  .slot-bar-wrap {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .slot-bar-track {
    flex: 1;
    height: 7px;
    align-items: stretch;
  }

  .slot-bar-fill {
    width: var(--bar-pct, 50%);
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
  }
}

.slot-bar-fill.firing { background: linear-gradient(to right, #0F6E56, #5DCAA5); }
.slot-bar-fill.good   { background: linear-gradient(to right, #0F6E56, #5DCAA5); opacity: 0.85; }
.slot-bar-fill.fair   { background: linear-gradient(to right, #8B6914, #EF9F27); }
.slot-bar-fill.weak   { background: linear-gradient(to right, #6B4F14, #EF9F27); opacity: 0.7; }
.slot-bar-fill.flat   { background: rgba(255,255,255,0.1); }

/* On mobile vertical bars use top gradient */
@media (max-width: 767px) {
  .slot-bar-fill.firing { background: linear-gradient(to top, #0F6E56, #5DCAA5); }
  .slot-bar-fill.good   { background: linear-gradient(to top, #0F6E56, #5DCAA5); opacity: 0.85; }
  .slot-bar-fill.fair   { background: linear-gradient(to top, #8B6914, #EF9F27); }
  .slot-bar-fill.weak   { background: linear-gradient(to top, #6B4F14, #EF9F27); opacity: 0.7; }
}

.slot-ht {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-teal);
  white-space: nowrap;
}

.slot-ht.med  { color: var(--color-amber); }
.slot-ht.flat { color: var(--text-muted); }

/* Data rows — wind / swell direction */
.slot-data-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-data-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.slot-data-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.slot-data-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.slot-data-val {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-data-val.choppy { color: var(--color-amber); }

.slot-data-lbl {
  font-size: 0.575rem;
  color: rgba(255,255,255,0.35);
  line-height: 1;
}

.slot-data-sub {
  font-size: 0.575rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.2;
}

/* Period column */
.slot-period-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.slot-period-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  padding: 2px 6px;
  align-self: flex-start;
}

.slot-period-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.slot-period-lbl {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
}

/* Best session badge */
.best-badge {
  font-size: 0.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-teal);
  font-weight: 700;
}

/* Condition bar */
.condition-bar {
  display: flex;
  gap: 3px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.cond-seg { border-radius: 2px; }

.condition-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: var(--text-muted);
}

/* --- Spot header ------------------------------------------ */
.spot-header {
  background: linear-gradient(160deg, #062040 0%, #0a3060 50%, #0d5c4a 100%);
  padding: 1.2rem 0 0;
  position: relative;
  overflow: hidden;
}

.spot-header-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 40%, rgba(29,158,117,0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* --- Breadcrumb ------------------------------------------- */
.breadcrumb {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.breadcrumb a {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-teal); }

.breadcrumb-sep { font-size: 0.7rem; color: rgba(255,255,255,0.2); }
.breadcrumb-current { font-size: 0.7rem; color: rgba(255,255,255,0.6); }

/* --- Spot pills ------------------------------------------- */
.spot-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-md);
  flex-wrap: nowrap;
}

.spot-pills::-webkit-scrollbar { display: none; }

.spot-pill {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.spot-pill.active {
  background: rgba(29,158,117,0.2);
  border: 0.5px solid var(--color-teal-mid);
  color: var(--color-teal);
}

.spot-pill.inactive {
  background: rgba(255,255,255,0.06);
  border: 0.5px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
}

.spot-pill.inactive:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.25);
}

/* --- Spot title block ------------------------------------- */
.spot-title {
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-sm);
}

.spot-title h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
}

.spot-title p {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}

.spot-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--color-teal);
  margin-top: 6px;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.spot-guide-link:hover { opacity: 0.75; }

/* Rating + unit toggle row */
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-sm);
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rdot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-teal);
}

.rdot.med   { background: var(--color-amber); }
.rdot.empty { background: rgba(255,255,255,0.15); }
.rlabel     { font-size: 0.7rem; color: var(--color-teal); margin-left: 5px; font-weight: 600; }

/* Unit toggle */
.unit-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ulabel { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.ulabel.on { color: var(--color-teal); }

.unit-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.unit-switch input { opacity:0; width:0; height:0; position:absolute; }

.unit-switch-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  border: 0.5px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.unit-switch input:checked + .unit-switch-track {
  background: var(--color-teal-mid);
  border-color: var(--color-teal-mid);
}

.unit-switch-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  pointer-events: none;
}

.unit-switch input:checked ~ .unit-switch-thumb {
  transform: translateX(16px);
}

/* --- Day strip -------------------------------------------- */
.day-strip {
  display: flex;
  border-top: 0.5px solid rgba(255,255,255,0.07);
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  z-index: 2;
}

.day-strip::-webkit-scrollbar { display: none; }

.day-tab {
  flex: 1;
  min-width: 70px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.day-tab.active {
  border-bottom-color: var(--color-teal);
  background: rgba(93,202,165,0.07);
}

.day-tab:hover { background: rgba(255,255,255,0.03); }

.dname {
  font-size: 0.55rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.day-tab.active .dname { color: var(--color-teal); }

.dht {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-teal);
  line-height: 1;
}

.dht.med  { color: var(--color-amber); }
.dht.flat { color: rgba(255,255,255,0.25); }
.dcond    { font-size: 0.55rem; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* --- Main data grid --------------------------------------- */
.forecast-main {
  padding: var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .forecast-main {
    padding: var(--space-lg) var(--space-xl);
  }
}

.fc-full { grid-column: span 2; }

.fc-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-md);
}

.fc-card-label {
  font-size: 0.575rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

/* --- Swell card ------------------------------------------- */
.swell-main {
  display: flex;
  align-items: flex-end;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.swell-big {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-teal);
  line-height: 1;
}

.swell-big span { font-size: 1rem; color: rgba(93,202,165,0.6); }

.swell-meta div {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 3px;
}

.swell-meta strong { color: var(--text-primary); font-weight: 600; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.bar-label { font-size: 0.65rem; color: var(--text-muted); width: 76px; flex-shrink: 0; }
.bar-track { flex: 1; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 2px; background: var(--color-teal); }
.bar-fill.amber { background: var(--color-amber); }
.bar-val   { font-size: 0.65rem; color: var(--color-teal); font-weight: 600; min-width: 32px; text-align: right; }
.bar-val.amber { color: var(--color-amber); }

/* --- Wind card -------------------------------------------- */
.wind-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.wind-dial-wrap {
  flex-shrink: 0;
  position: relative;
  padding-bottom: 22px;
}

.wind-dial {
  position: relative;
  width: 76px;
  height: 76px;
}

.wind-dial-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.1);
  position: relative;
}

.wind-cardinal {
  position: absolute;
  font-size: 0.5rem;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

.wc-n { top:3px;    left:50%; transform:translateX(-50%); }
.wc-s { bottom:3px; left:50%; transform:translateX(-50%); }
.wc-e { right:3px;  top:50%;  transform:translateY(-50%); }
.wc-w { left:3px;   top:50%;  transform:translateY(-50%); }

.wind-arrow-wrap {
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 26px;
  transform-origin: bottom center;
  /* rotation set inline by template from DB degrees */
}

.wind-arrow-shaft {
  position: absolute;
  bottom: 0; left: 0;
  width: 2px; height: 20px;
  background: linear-gradient(to top, var(--color-teal), rgba(93,202,165,0.25));
  border-radius: 1px;
}

.wind-arrow-head {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid var(--color-teal);
}

.wind-center-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  background: var(--color-teal);
  border-radius: 50%;
  transform: translate(-50%,-50%);
}

.wind-dir-badge {
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-teal);
  white-space: nowrap;
}

.wind-stats { flex: 1; }

.wstat {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.05);
  font-size: 0.72rem;
}

.wstat:last-child { border-bottom: none; }
.wstat-l { color: var(--text-muted); }
.wstat-v { color: var(--text-primary); font-weight: 600; }

/* --- Sponsor slot ----------------------------------------- */
.sponsor-slot {
  grid-column: span 2;
  border: 1px dashed rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.18);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* --- Tide now marker -------------------------------------- */
.tide-graph-container {
  position: relative;
  margin: 8px 0 var(--space-sm);
  padding-bottom: 20px; /* room for the "Now" label below the SVG */
}

.tide-graph-wrap {
  width: 100%;
  height: 56px;
}

.tide-graph-wrap svg {
  display: block;
}

.tide-now-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.tide-now-line {
  width: 1px;
  flex: 1;
  background: rgba(255,255,255,0.4);
  border-left: 1px dashed rgba(255,255,255,0.35);
}

.tide-now-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid rgba(93,202,165,0.8);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 6px rgba(93,202,165,0.4);
}

.tide-now-label {
  position: absolute;
  bottom: -18px;
  white-space: nowrap;
  font-size: 0.575rem;
  color: rgba(255,255,255,0.5);
  transform: translateX(-50%);
  left: 50%;
}

/* --- Tide card -------------------------------------------- */
.tide-times {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.ttime { text-align: center; }
.ttime-lbl { font-size: 0.575rem; color: var(--text-muted); }
.ttime-val { font-size: 0.72rem; font-weight: 600; color: var(--text-primary); }
.ttime-ht  { font-size: 0.575rem; color: var(--color-teal); }
.ttime-ht.low { color: var(--text-muted); }

/* --- Weather card ----------------------------------------- */
.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wi {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 8px 10px;
}

.wi-lbl {
  font-size: 0.575rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.wi-val { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.wi-sub { font-size: 0.575rem; color: var(--text-muted); margin-top: 2px; }