/*
 * PWS Watch
 * Consistent spacing for the active dashboard without changing its composition.
 * Author: Carlos Enrique Ortiz (CEO)
 * HyperKode (c) 2026 · www.HyperKode.com
 * License: Project license designation pending confirmation.
 */
body.review-dashboard {
  --dashboard-space-small:var(--pws-space-2);
  --dashboard-space-content:var(--pws-space-3);
  --dashboard-space-section:var(--pws-space-4);
  --dashboard-space-inset:var(--pws-space-5);
}

/* Equal breathing room above and below the time labels and conditions narrative. */
body.review-dashboard .now-temperature-times {
  padding-block:var(--dashboard-space-content);
}
body.review-dashboard #currentPanel .atlas-conditions .weather-brief {
  margin-block:0;
  padding-block:var(--dashboard-space-content);
}
body.review-dashboard .now-temperature-feels {
  margin-top:var(--dashboard-space-content);
}
body.review-dashboard .review-observed { margin-block:var(--dashboard-space-content) 0; }
body.review-dashboard .review-scale { margin-top:var(--dashboard-space-section); }
body.review-dashboard .review-scale small,
body.review-dashboard .review-trace small { margin-top:var(--dashboard-space-small); }

/* Shared section rhythm and balanced card/disclosure insets. */
body.review-dashboard .review-map-guide {
  padding:var(--dashboard-space-content) var(--dashboard-space-inset);
}
body.review-dashboard .forecast-section { padding-block:var(--dashboard-space-section); }
body.review-dashboard .atlas-forecast-heading { margin-bottom:var(--dashboard-space-content); }
body.review-dashboard #forecastAttribution { margin-block:0; }
body.review-dashboard #forecastMore > summary { padding-block:var(--dashboard-space-small); }
body.review-dashboard .atlas-instruments { margin-bottom:var(--dashboard-space-section); }
body.review-dashboard .atlas-instruments .metric { padding-block:var(--dashboard-space-content); }
body.review-dashboard .review-details {
  margin-block:var(--dashboard-space-section);
  padding:var(--dashboard-space-content) var(--dashboard-space-section);
}
body.review-dashboard .review-details > summary { padding-block:var(--dashboard-space-content); }
body.review-dashboard .review-source-summary { margin-block:var(--dashboard-space-section); }
body.review-dashboard .lower-grid > .panel,
body.review-dashboard .history-panel { padding-block:var(--dashboard-space-section); }
body.review-dashboard #historyMeta { padding:var(--dashboard-space-section); }
body.review-dashboard .history-strip { padding:var(--dashboard-space-section); }
body.review-dashboard .mini-title { margin-block:0 var(--dashboard-space-small); }
body.review-dashboard .calibration-copy,
body.review-dashboard .calibration-summary { margin-block:var(--dashboard-space-small); }
body.review-dashboard .page-footer {
  margin-top:var(--dashboard-space-section);
  padding-block:var(--dashboard-space-content);
}

@media(min-width:361px) and (max-width:600px) {
  /* Preserve room for the 44px bottom compass, its 8px inset, and an 8px content gap. */
  body.review-dashboard .atlas-instruments .wip-wind-card {
    padding-bottom:calc(44px + 2 * var(--dashboard-space-small));
  }
}

@media(max-width:760px) {
  body.review-dashboard { --dashboard-space-inset:var(--pws-space-4); }
  /* Mobile keeps Now below the map viewport; desktop retains its existing overlay. */
  body.review-dashboard #currentPanel .wip-weather-header {
    height:auto;
    min-height:0;
  }
  body.review-dashboard #currentPanel .wip-weather-header .map-panel {
    position:relative;
    inset:auto;
    height:auto;
  }
  body.review-dashboard #currentPanel .atlas-conditions {
    position:relative;
    inset:auto;
    transform:none;
    width:100%;
    max-width:none;
    margin:0;
    box-sizing:border-box;
  }
  /* The embedded surface already owns a gutter; do not add a second width reduction. */
  body.review-dashboard.surface-app .shell {
    width:100%;
    padding-inline:var(--dashboard-space-inset);
  }
  /* Override legacy WebView negative margins and the review header's zero side padding. */
  body.review-dashboard .shell > header {
    margin-inline:0;
    padding:var(--dashboard-space-section) var(--dashboard-space-inset);
  }
  body.review-dashboard .header-astronomy,
  body.review-dashboard .wip-navigation,
  body.review-dashboard .atlas-station-header {
    min-width:0;
    max-width:100%;
  }
  body.review-dashboard .review-map-disclosure {
    margin-inline:0;
    padding-inline:var(--dashboard-space-inset);
  }
  body.review-dashboard .wip-weather-header .map-head {
    inset-inline:var(--dashboard-space-inset);
  }
  body.review-dashboard .atlas-conditions,
  body.review-dashboard #currentPanel .review-map-collapsed .atlas-conditions {
    padding-block:var(--dashboard-space-section);
  }
  body.review-dashboard .review-map-disclosure { padding-block:var(--dashboard-space-content); }
}


/* One section gap, matching disclosure rows, and a common content inset. */
body.review-dashboard .review-page-sections {
 display:grid; grid-template-columns:minmax(0,1fr); gap:var(--dashboard-space-section);
 margin-top:var(--dashboard-space-section); min-width:0;
}
body.review-dashboard .review-page-sections > :is(.hero-grid,.forecast-section,#weatherDetails,.analysis-grid,#localContext,#aboutStation) {
 margin:0; min-width:0;
}
body.review-dashboard .review-page-sections > .analysis-grid { display:block; padding:0; }
body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) {
 margin:0; padding:0; box-sizing:border-box;
}
body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) > summary {
 box-sizing:border-box; min-height:72px;
 padding:var(--dashboard-space-section) var(--dashboard-space-inset);
 gap:var(--dashboard-space-section);
}
body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) > summary .mini-title {
 margin:0; font-size:var(--pws-text-section); line-height:1.3;
}
body.review-dashboard #historySection > .atlas-analysis-content {
 padding:var(--dashboard-space-section) var(--dashboard-space-inset);
 gap:var(--dashboard-space-section);
}
body.review-dashboard #weatherDetails > .atlas-instruments {
 margin:0; padding:var(--dashboard-space-section) var(--dashboard-space-inset);
}
body.review-dashboard #weatherDetails > .wip-changes {
 margin:0; padding:0 var(--dashboard-space-inset) var(--dashboard-space-section);
}
body.review-dashboard :is(#weatherDetails,#aboutStation) .review-about-section {
 padding:var(--dashboard-space-section) var(--dashboard-space-inset);
}
body.review-dashboard #aboutStation > .provider-card {
 padding:var(--dashboard-space-section) var(--dashboard-space-inset);
}
body.review-dashboard #aboutStation .provider-popover { padding:0; }
body.review-dashboard .atlas-forecast-heading {
 margin:0 var(--dashboard-space-inset) var(--dashboard-space-content);
}
body.review-dashboard .forecast-section h2 { font-size:var(--pws-text-section); line-height:1.3; }
body.review-dashboard #forecastOutlook {
 margin:0 var(--dashboard-space-inset) var(--dashboard-space-content);
}
body.review-dashboard .page-footer { margin-top:var(--dashboard-space-section); }
/* Hide the temporary comparison banner before the active composition removes it. */
body.review-dashboard .wip-banner { display:none; }

/* One disclosure family: aligned title, short preview and trailing rotating chevron. */
body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) > summary {
 display:grid; grid-template-columns:auto minmax(0,1fr) auto;
 min-height:72px; align-items:center;
}
body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) .review-weather-preview {
 margin:0; font:var(--pws-weight-normal) var(--pws-text-meta)/1.5 var(--pws-font-ui);
}
body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) > summary > .atlas-provider-indicator {
 grid-column:3; grid-row:1; justify-self:end;
}
@media (max-width:760px) {
 body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) > summary { grid-template-columns:minmax(0,1fr) auto; gap:var(--pws-space-2) var(--pws-space-3); }
 body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) .review-weather-preview { grid-column:1; grid-row:2; }
 body.review-dashboard :is(#weatherDetails,#historySection,#localContext,#aboutStation) > summary > .atlas-provider-indicator { grid-column:2; grid-row:1 / span 2; }
}
