/* ahv3 — Analysis Header v3 — prefixo isolado para não conflitar com CSS existente */

/* ── Container principal: padding lateral para não grudar na borda ── */
.spot-analysis-more > .ahv3-topbar,
.spot-analysis-more > .ahv3-identity,
.spot-analysis-more > .ahv3-conditions-section,
.spot-analysis-more > .ahv3-sobre-section,
.spot-analysis-more > .ahv3-forecast-header {
  padding-left: 24px;
  padding-right: 24px;
}

/* ahv3-about uses internal padding but needs horizontal margin to align with siblings */
.spot-analysis-more > .ahv3-about {
  margin-left: 24px;
  margin-right: 24px;
}

/* Breadcrumb + share */
.ahv3-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  padding-bottom: 14px;
}
.ahv3-breadcrumb {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ahv3-breadcrumb a { color: inherit; text-decoration: none; }
.ahv3-breadcrumb a:hover { text-decoration: underline; }
.ahv3-breadcrumb-sep { margin: 0 6px; opacity: .5; }
.ahv3-share-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ahv3-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 20px; height: 36px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1.5px solid transparent !important; text-decoration: none;
  transition: opacity .15s; white-space: nowrap;
  text-transform: none !important; /* override global button { text-transform: uppercase } from app.css */
  letter-spacing: 0 !important;
  box-shadow: none !important; /* override global button box-shadow from app.css */
  background: transparent; /* will be overridden by variant classes */
}
.ahv3-share-btn:hover { opacity: .82; }
/* WhatsApp: preenchido verde, ícone + texto maiores */
.ahv3-share-btn-wa {
  background: #25D366 !important; color: #fff !important; border-color: #25D366 !important;
  padding: 8px 18px; font-size: 13px;
}
.ahv3-share-btn-copy, .ahv3-share-btn-share {
  background: transparent !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

/* Separador sutil antes das condições */
.ahv3-identity-separator {
  border: none;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  margin: 0 0 16px;
}

/* Identity block */
.ahv3-identity {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}
.ahv3-identity-left { flex: 1 1 0; min-width: 0; }
.ahv3-spot-name {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: var(--color-heading, #0a3640);
  line-height: 1.05;
  margin: 0 0 12px;
}
.ahv3-badges {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.ahv3-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--color-surface-2, #f1f5f9);
  color: var(--color-body, #334155);
}
.ahv3-badge-sport {
  background: #0f7c82; color: #fff;
}
/* Badge de stance/nível (REGULAR, INTERMEDIÁRIO, AVANÇADO etc.) — âmbar */
.ahv3-badge-stance {
  background: #fef3c7;
  color: #92400e;
}
.ahv3-badge-location {
  background: transparent;
  color: var(--color-muted, #475569);
  font-weight: 600;
  padding: 4px 0;  /* sem pill para localização */
  text-transform: none !important;
  letter-spacing: 0;
}

/* Grade + score ring */
.ahv3-score-block {
  display: flex; align-items: flex-start; gap: 10px; flex-shrink: 0;
}
/* grade-badge-obj: usa o mesmo SVG animado do resto do projeto (grade-badge) */
.ahv3-score-block .grade-badge-obj {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ahv3-score-block .grade-badge-obj svg {
  width: 66px; height: 31px;
}
/* Fallback: círculo simples (não SVG) */
.ahv3-grade-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: #0ea5e9;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px; font-weight: 700;
  flex-shrink: 0;
}
.ahv3-score-ring {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0;
}
.ahv3-score-ring svg { display: block; }
.ahv3-score-ring-num {
  font-size: 24px; font-weight: 700;
  fill: var(--color-heading, #0a3640);
}
.ahv3-score-ring-sub {
  font-size: 11px; fill: var(--color-muted, #94a3b8);
}
.ahv3-score-ring-bg { fill: none; stroke: var(--color-border, #e2e8f0); stroke-width: 6; }
.ahv3-score-ring-arc { fill: none; stroke: #0f7c82; stroke-width: 6; stroke-linecap: round; }

/* Conditions label — com badge de data/hora */
.ahv3-conditions-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #94a3b8;
  margin-bottom: 10px;
}
.ahv3-conditions-label svg { width: 14px; height: 14px; opacity: .7; }
/* Badge/pill para data+hora */
.ahv3-conditions-ts-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 500;
  color: var(--color-body, #475569);
  text-transform: none; letter-spacing: 0;
}
.ahv3-conditions-ts-badge svg { width: 12px; height: 12px; opacity: .7; }
/* Compatibilidade com o atributo existente no template */
.ahv3-conditions-ts { font-weight: 500; opacity: .75; }

/* Seção de condições: dois traços (acima e abaixo) */
.ahv3-conditions-section {
  border-top: 1px solid var(--color-border, #e2e8f0);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  padding: 16px 0;
  margin: 8px 0;
}

.ahv3-conditions-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px; overflow: hidden;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .ahv3-conditions-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .ahv3-conditions-grid { grid-template-columns: repeat(2, 1fr); }
}
.ahv3-cond-cell {
  padding: 14px 12px;
  border-right: 1px solid var(--color-border, #e2e8f0);
  display: flex; flex-direction: column; gap: 4px;
}
.ahv3-cond-cell:last-child { border-right: none; }
.ahv3-cond-cell-window { background: #eff6ff; }
.ahv3-cond-label {
  font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: #94a3b8;
  margin-bottom: 2px;
}
.ahv3-cond-main {
  font-size: 16px; font-weight: 700;
  color: #0f172a;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.ahv3-cond-main svg { width: 15px; height: 15px; opacity: .7; flex-shrink: 0; }
.ahv3-cond-sub {
  font-size: 11px; color: #64748b;
}

/* Compass mini */
.ahv3-compass-wrap {
  display: flex; flex-direction: row; align-items: center; gap: 8px;
}
.ahv3-compass-wrap svg {
  flex-shrink: 0;
  overflow: visible;
}
.ahv3-compass-legend {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 10px; color: #64748b;
}
.ahv3-compass-legend-item {
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.ahv3-compass-legend-dir {
  font-weight: 700;
  color: var(--color-heading, #0a3640);
}
.ahv3-compass-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ahv3-compass-dot-wind { background: #0f7c82 !important; }
.ahv3-compass-dot-swell { background: #3b82f6 !important; }

/* Header "Previsão por hora" — inline com legenda */
.ahv3-forecast-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  margin-top: 24px;
}
.ahv3-forecast-header-labels {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.ahv3-forecast-header-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #94a3b8;
  line-height: 1;
}
.ahv3-forecast-header-title {
  font-size: 16px; font-weight: 700;
  color: var(--color-heading, #0a3640);
  line-height: 1.3;
}
.ahv3-forecast-header-divider {
  flex: 1;
  height: 1px;
  background: var(--color-border, #e2e8f0);
  min-width: 16px;
}
.ahv3-forecast-header-legend {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 11px; color: #64748b;
  flex-shrink: 0;
}
.ahv3-forecast-header-legend-item {
  display: inline-flex; align-items: center; gap: 4px;
}
.ahv3-forecast-header-legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ahv3-forecast-header-legend-dot.is-in  { background: #0f7c82; }
.ahv3-forecast-header-legend-dot.is-limit { background: #f59e0b; }
.ahv3-forecast-header-legend-dot.is-out { background: #94a3b8; }

/* Sobre o pico */
.ahv3-sobre-section,
.ahv3-about {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 20px 0;
}

/* ahv3-about has its own internal padding; add horizontal margin to match siblings */
.spot-analysis-more > .ahv3-about {
  margin-left: 24px;
  margin-right: 24px;
}

.ahv3-sobre-label,
.ahv3-about-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 10px;
}

.ahv3-sobre-text,
.ahv3-about-text {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 8px;
}

/* Estado colapsado: máximo 3 linhas */
.ahv3-sobre-text,
.ahv3-about-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Estado expandido */
.ahv3-sobre-text.is-expanded,
.ahv3-about-text:not(.collapsed) {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.ahv3-sobre-toggle,
.ahv3-about-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0f7c82;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.ahv3-sobre-toggle:hover,
.ahv3-about-toggle:hover {
  color: #0a5c61;
}

/* Hide the duplicate "Previsão por hora" h3 heading inside live-forecast-panel
   when inside spot-analysis-more — ahv3-forecast-header already handles this */
.spot-analysis-more .live-forecast-panel .section-header {
  display: none;
}
