/*
 * Sea-conditions UI (time windows, verdict pills, "Today" strip).
 * Uses the theme's palette: purple #311664, teal #6dc0c4, greys #a7a7a7 / #e0e0e0.
 */

:root {
  --wb-purple: #311664;
  --wb-teal: #6dc0c4;
  --wb-grey: #a7a7a7;
  --wb-line: #e0e0e0;
  --wb-calm: #2fa98c;
  --wb-choppy: #d9a21b;
  --wb-rough: #e07a2f;
  --wb-avoid: #d64545;
}

/* Time track on the home card: one connected control, grouped by day */
.time-track {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  gap: 4px;
  margin: 0 0 22px;
  overflow-x: auto;
  padding: 6px;
  scrollbar-width: none;
}

.time-track::-webkit-scrollbar { display: none; }

.time-track__group {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-width: 0;
}

.time-track__group + .time-track__group {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 4px;
}

.time-track__day {
  color: var(--wb-grey);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 10px 4px;
  text-transform: uppercase;
}

.time-track__slots {
  display: flex;
  gap: 2px;
}

.time-slot {
  align-items: flex-start;
  background: none;
  border: 0;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  font-family: inherit;
  padding: 8px 10px;
  text-align: left;
  transition: background-color 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.time-slot:hover { background: rgba(255, 255, 255, 0.08); }

.time-slot:focus-visible {
  outline: 2px solid var(--wb-teal);
  outline-offset: 1px;
}

.time-slot__name {
  font-size: 13px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

.time-slot__time {
  color: var(--wb-grey);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 14px;
  white-space: nowrap;
}

.time-slot.active { background: var(--wb-teal); }
.time-slot.active .time-slot__time { color: rgba(255, 255, 255, 0.85); }

/* Verdict pill + reasons */
.condition-summary {
  margin: 4px 0 20px;
}

.condition-pill {
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 16px;
  margin: 0 0 10px;
  padding: 5px 12px;
}

.condition-pill--calm { background-color: var(--wb-calm); }
.condition-pill--choppy { background-color: var(--wb-choppy); }
.condition-pill--rough { background-color: var(--wb-rough); }
.condition-pill--avoid { background-color: var(--wb-avoid); }

.condition-reasons {
  margin: 0;
}

.condition-reasons li {
  font-size: 13px;
  line-height: 19px;
  padding-left: 14px;
  position: relative;
}

.condition-reasons li::before {
  background-color: var(--wb-teal);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 7px;
  width: 5px;
}

.condition-summary--dark .condition-reasons li { color: #fff; }
.condition-summary--light .condition-reasons li { color: #4a4a4a; }

/* Beach page: "Today at …" timeline */
.beach-today__head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.beach-today__head h2 { margin: 0; }

.today-legend {
  color: #828282;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 14px;
  margin: 0;
}

.legend-dot {
  border-radius: 50%;
  display: inline-block;
  height: 8px;
  margin-right: 6px;
  width: 8px;
}

.legend-dot--calm { background: var(--wb-calm); }
.legend-dot--choppy { background: var(--wb-choppy); }
.legend-dot--rough { background: var(--wb-rough); }
.legend-dot--avoid { background: var(--wb-avoid); }

.today-timeline {
  border: 1px solid var(--wb-line);
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0;
  overflow: hidden;
}

.today-tile {
  border-top: 5px solid var(--wb-line);
  padding: 16px 18px 18px;
}

.today-tile + .today-tile { border-left: 1px solid var(--wb-line); }

.today-tile--calm { border-top-color: var(--wb-calm); }
.today-tile--choppy { border-top-color: var(--wb-choppy); }
.today-tile--rough { border-top-color: var(--wb-rough); }
.today-tile--avoid { border-top-color: var(--wb-avoid); }

.today-tile__when {
  color: var(--wb-purple);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.today-tile__time {
  color: #828282;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 12px;
}

.today-tile__verdict {
  font-size: 18px;
  font-weight: 800;
  line-height: 22px;
  margin: 0 0 10px;
}

.today-tile--calm .today-tile__verdict { color: var(--wb-calm); }
.today-tile--choppy .today-tile__verdict { color: var(--wb-choppy); }
.today-tile--rough .today-tile__verdict { color: var(--wb-rough); }
.today-tile--avoid .today-tile__verdict { color: var(--wb-avoid); }

.today-tile__facts {
  color: #4a4a4a;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 4px;
}

.today-tile__fact {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.wind-arrow, .wave-icon { color: var(--wb-teal); flex: none; }

@media (max-width: 59.99em) {
  .today-timeline {
    grid-auto-columns: minmax(150px, 46%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .today-tile { scroll-snap-align: start; }
}

.beach-today { margin-bottom: 40px; }

/* Beach page: guide (practical info + FAQ) with a sidebar */
.beach-guide {
  display: grid;
  gap: 40px;
  margin-bottom: 48px;
}

@media (min-width: 60em) {
  .beach-guide--split {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
  }

}

/* On phones the reasoning and compass come first. */
@media (max-width: 59.99em) {
  .beach-guide__side { order: -1; }
}

.beach-guide__main {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.guide-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.guide-card {
  background: #f7f9fb;
  border-radius: 14px;
  padding: 22px 24px;
}

.guide-card__title,
.side-card__title {
  color: var(--wb-purple);
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
  margin: 0 0 10px;
}

.guide-card p,
.guide-section p {
  color: #4a4a4a;
  font-size: 15px;
  line-height: 25px;
  margin: 0 0 10px;
}

.guide-section > h2 { margin: 0 0 14px; }

.faq-list {
  border-top: 1px solid var(--wb-line);
}

.faq-item {
  border-bottom: 1px solid var(--wb-line);
}

.faq-item summary {
  color: var(--wb-purple);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  list-style: none;
  padding: 16px 36px 16px 0;
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  color: var(--wb-teal);
  content: "+";
  font-size: 22px;
  font-weight: 400;
  position: absolute;
  right: 4px;
  top: 13px;
  transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item summary:focus-visible {
  outline: 2px solid var(--wb-teal);
  outline-offset: 2px;
}

.faq-item p {
  color: #4a4a4a;
  font-size: 15px;
  line-height: 25px;
  margin: 0 0 18px;
}

.side-card {
  border: 1px solid var(--wb-line);
  border-radius: 16px;
  padding: 22px 24px;
}

.side-card + .side-card { margin-top: 16px; }

.side-card--calm { border-top: 5px solid var(--wb-calm); }
.side-card--choppy { border-top: 5px solid var(--wb-choppy); }
.side-card--rough { border-top: 5px solid var(--wb-rough); }
.side-card--avoid { border-top: 5px solid var(--wb-avoid); }

.side-card .condition-reasons li { color: #4a4a4a; font-size: 14px; line-height: 22px; }

.side-card__text {
  color: #4a4a4a;
  font-size: 14px;
  line-height: 22px;
  margin: 12px 0 0;
}

/* Wind-exposure compass */
.exposure-compass { margin: 0; }

.exposure-compass svg {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 240px;
  width: 100%;
}

.compass-sector--sheltered { fill: var(--wb-calm); fill-opacity: 0.85; }
.compass-sector--partly { fill: var(--wb-choppy); fill-opacity: 0.85; }
.compass-sector--exposed { fill: var(--wb-avoid); fill-opacity: 0.85; }

.compass-label {
  fill: #828282;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
}

.compass-beach { fill: var(--wb-purple); }

.compass-wind {
  stroke: var(--wb-purple);
  stroke-linecap: round;
  stroke-width: 4;
  paint-order: stroke;
}

.compass-wind-head { fill: var(--wb-purple); }

.compass-legend {
  color: #828282;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px 14px;
  justify-content: center;
  margin-top: 12px;
}

.compass-legend .legend-dot { font-style: normal; }
.compass-legend__wind { color: var(--wb-purple); font-weight: 700; }

/* Beach page: sea panel that replaced the jellyfish meter */
.sea-panel .sea-temp {
  color: var(--wb-purple);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin: 10px 0;
}

.sea-panel .sea-facts {
  color: #4a4a4a;
  font-size: 14px;
  line-height: 22px;
}

.water-quality-source {
  color: var(--wb-grey);
  font-size: 12px;
}

/* "Nearby": compact beach and dive-site cards */
.nearby > h2, .nearby-heading { margin: 0 0 20px; }

.nearby__group + .nearby__group { margin-top: 28px; }

.nearby__heading {
  color: #828282;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.nearby__cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

@media (max-width: 59.99em) {
  .nearby__cards {
    grid-auto-columns: minmax(220px, 70%);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .nearby__cards > li { scroll-snap-align: start; }
}

.nearby-card {
  border: 1px solid var(--wb-line);
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  transition: border-color 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), box-shadow 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.nearby-card:hover,
.nearby-card:focus-visible {
  border-color: var(--wb-teal);
  box-shadow: 0 6px 18px rgba(49, 22, 100, 0.08);
  outline: none;
}

.nearby-card__media {
  aspect-ratio: 4 / 3;
  background: #eef4f5;
  overflow: hidden;
  position: relative;
}

.nearby-card__media picture,
.nearby-card__media img {
  display: block;
  height: 100%;
  width: 100%;
}

.nearby-card__media img { object-fit: cover; }

.nearby-card__verdict {
  left: 10px;
  margin: 0;
  position: absolute;
  top: 10px;
}

.nearby-card__body { padding: 12px 14px 14px; }

.nearby-card__title {
  color: var(--wb-purple);
  font-size: 15px;
  font-weight: 800;
  line-height: 20px;
  margin: 0 0 4px;
}

.nearby-card__meta {
  color: #4a4a4a;
  font-size: 13px;
  line-height: 18px;
  margin: 0 0 6px;
}

.nearby-card__distance {
  color: #828282;
  font-size: 12px;
  margin: 0;
}

.nearby-card__distance--here {
  color: var(--wb-teal);
  font-weight: 700;
}

.nearby { margin-bottom: 56px; }

.nearby-card__media--icon {
  align-items: center;
  background: linear-gradient(160deg, #3f2080 0%, var(--wb-purple) 60%, #22104a 100%);
  display: flex;
  justify-content: center;
}

.nearby-card__icon {
  color: #fff;
  display: block;
  height: 64px;
  opacity: 0.9;
  width: 64px;
}

.nearby-card__icon svg {
  height: 100%;
  width: 100%;
}

.nearby-card__icon svg * {
  fill: #fff;
  stroke: #fff;
}

/*
 * The card reuses the theme's .beach-card class so the explorer map JS
 * still finds it; undo the theme's full-bleed image-card styling.
 */
.nearby-card.beach-card {
  border-radius: 0;
  overflow: visible;
  padding-bottom: 0;
}

.nearby-card.beach-card::before { display: none; }

.nearby-card .featured-image {
  border-radius: 0;
  position: static;
  transform: none;
  transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.nearby-card.beach-card:hover .featured-image { transform: scale(1.04); }

/* The popup-only image (often wrapped in <picture> by the WebP rewriter)
   must not take space beside the dive-type icon. */
.nearby-card .featured-image.dn,
.nearby-card__media--icon picture { display: none; }

/* Explorer grid: denser gutters for the compact cards */
.append-cards-here .beach-card-wrapper { padding: 8px; }

@media (max-width: 29.99em) {
  .append-cards-here .nearby-card__body { padding: 10px 10px 12px; }
  .append-cards-here .nearby-card__title { font-size: 14px; line-height: 18px; }
  .append-cards-here .nearby-card__meta { font-size: 12px; }
  .append-cards-here .nearby-card__verdict { font-size: 11px; left: 8px; padding: 4px 9px; top: 8px; }
}

/*
 * Section headings were h3 before the SEO pass (October 2026) and are now
 * h2; keep the size the theme gave them as h3.
 */
h2.section-title { font-size: 1.17em; }
.nearby__heading { margin-top: 0; }
