/* Kite.Deals — Forecast Page Styles */

/* ─── Hero ───────────────────────────────────────────────────── */

.fc-hero {
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
}

.fc-hero__inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 32px;
}

.fc-hero__left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}

.fc-hero__map {
  width: 320px;
  flex-shrink: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

#fc-map {
  height: 100%;
  min-height: 280px;
  width: 100%;
  background: var(--navy-800);
}

.leaflet-control-attribution {
  background: rgba(7, 16, 31, 0.8) !important;
  color: #5a7099 !important;
  font-size: 0.7rem !important;
}
.leaflet-control-attribution a { color: #94a3b8 !important; }

.fc-hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.fc-hero__sub {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 480px;
}

/* ─── Search ─────────────────────────────────────────────────── */

.fc-search {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin-top: 8px;
  position: relative;
}

.fc-search__input-wrap {
  flex: 1;
  position: relative;
}

.fc-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.fc-search__input {
  width: 100%;
  height: 44px;
  background: var(--navy-800);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0 36px 0 42px;
  outline: none;
  transition: border-color 0.15s;
}

.fc-search__input:focus { border-color: var(--teal); }
.fc-search__input::placeholder { color: var(--text-muted); }

.fc-search__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 6px;
  line-height: 1;
  transition: color 0.1s;
}
.fc-search__clear:hover { color: var(--text); }
.fc-search__clear[hidden] { display: none; }

.fc-search__btn-short { display: none; }

.fc-search__btn {
  height: 44px;
  padding: 0 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.fc-geo-btn {
  width: 44px;
  height: 44px;
  background: var(--navy-800);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.fc-geo-btn:hover { color: var(--teal); border-color: var(--teal); }
.fc-geo-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Suggestions ────────────────────────────────────────────── */

.fc-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--navy-800);
  border: 1.5px solid var(--border-2);
  border-radius: var(--r-md);
  overflow: hidden;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.fc-suggestion {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.fc-suggestion:last-child { border-bottom: none; }
.fc-suggestion:hover { background: rgba(255,255,255,0.05); }

/* ─── Main content ───────────────────────────────────────────── */

.fc-main {
  padding: 32px 0 64px;
}

/* ─── Spot header ────────────────────────────────────────────── */

.fc-spot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.fc-spot-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.fc-spot-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.fc-models-note {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.fc-models-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fc-model-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(34,211,238,0.2);
}

.fc-calibrated {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.3);
  opacity: 0;
  transition: opacity 0.8s ease;
}

.fc-calibrated:not([hidden]) {
  opacity: 1;
}

.fc-dev-toggle {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.4);
  background: transparent;
  cursor: pointer;
}

/* ─── Now card ───────────────────────────────────────────────── */

.fc-now[hidden] { display: none; }

.fc-now {
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 24px 16px;
  margin-bottom: 20px;
}

.fc-now__heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.fc-now__panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
}

.fc-now__panels::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.fc-now__panel {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 24px;
}

.fc-now__panel:last-child {
  padding-right: 0;
  padding-left: 24px;
}

.fc-now__panel[hidden] { display: none; }

.fc-now__panel-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.fc-now__wind {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.fc-now__speed {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.fc-now__unit {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.fc-now__arrow {
  display: inline-block;
  font-size: 1.1rem;
  color: var(--teal);
}

.fc-now__dir {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}

.fc-now__score {
  font-size: 1rem;
  font-weight: 700;
}

.fc-now__gusts {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.fc-now__sublabel {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── Day picker ─────────────────────────────────────────────── */

.fc-days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.fc-days::-webkit-scrollbar { display: none; }

.fc-day-btn {
  flex-shrink: 0;
  background: var(--navy-800);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  transition: border-color 0.15s, background 0.15s;
}

.fc-day-btn:hover { border-color: var(--border-2); background: var(--navy-700); }

.fc-day-btn--active {
  border-color: var(--teal) !important;
  background: var(--teal-dim) !important;
}

.fc-day-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fc-day-score {
  font-size: 1.3rem;
  font-weight: 800;
}

.fc-day-score-max {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.fc-day-wind {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── Chart ──────────────────────────────────────────────────── */

.fc-chart-wrap {
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.fc-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.fc-chart-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.fc-legend {
  display: flex;
  gap: 16px;
}

.fc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.fc-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.fc-legend-dot--blend { background: #22d3ee; }
.fc-legend-dot--gust  { background: #fb923c; }

.fc-legend-swatch {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: rgba(34,211,238,0.2);
  border: 1px solid rgba(34,211,238,0.3);
}

.fc-canvas-wrap {
  position: relative;
  height: 220px;
}

.fc-now-line {
  position: absolute;
  width: 2px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.35) 0px,
    rgba(255,255,255,0.35) 4px,
    transparent 4px,
    transparent 8px
  );
}

.fc-now-line::before {
  content: 'Now';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

/* ─── Wind directions ────────────────────────────────────────── */

.fc-directions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
}

.fc-directions::-webkit-scrollbar { display: none; }

.fc-dir-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 36px;
}

.fc-dir-arrow {
  display: inline-block;
  font-size: 1.2rem;
  color: var(--teal);
  line-height: 1;
}

.fc-dir-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
}

.fc-dir-time {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ─── Session cards ──────────────────────────────────────────── */

.fc-sessions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.fc-session-card {
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}

.fc-session-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.fc-session-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.fc-session-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.fc-session-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 12px;
}

.fc-session-score-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.fc-session-score-denom {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.fc-session-score-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-left: 4px;
}

.fc-session-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fc-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fc-stat-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.fc-stat-unit {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ─── Confidence note ────────────────────────────────────────── */

.fc-confidence-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Loading / error states ─────────────────────────────────── */

.fc-status[hidden] { display: none; }

.fc-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.fc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .fc-hero__inner { flex-direction: column; }
  .fc-hero__map { width: 100%; border-radius: var(--r-md); }
  #fc-map { min-height: 220px; }
}

@media (max-width: 640px) {
  .fc-sessions { grid-template-columns: 1fr; }
  .fc-spot-header { flex-direction: column; }
  .fc-models-note { display: none; }
  .fc-search { flex-wrap: nowrap; }
  .fc-search__btn-full { display: none; }
  .fc-search__btn-short { display: inline; }
  .fc-canvas-wrap { height: 180px; }
  #fc-map { min-height: 200px; }
  .fc-now__panels { grid-template-columns: 1fr; gap: 16px; }
  .fc-now__panels::before { display: none; }
  .fc-now__panel { padding: 0 !important; }
  .fc-now__panel:first-child { padding-bottom: 16px !important; border-bottom: 1px solid var(--border); }
}

@media (max-width: 480px) {
  .fc-hero { padding: 28px 0; }
  .fc-legend { display: none; }
}
