/* surfarea-weather-chart.css
 * 天気図ページ専用スタイル。
 * 既存の surfarea-forecast.css・surfarea-tide.css のデザイン言語に揃えています。
 * カラー定数（#1b4a3c/#355f52/#d9e5df）は既存コンポーネントと共通です。
 */

/* ─── ベース ──────────────────────────────────────── */

.surfarea-weather-chart-page {
  margin: 16px 0;
  max-width: 100%;
  width: 100%;
}

.surfarea-weather-chart-page,
.surfarea-weather-chart-page * {
  box-sizing: border-box;
}

/* ─── ページ見出し（hero） ─────────────────────────── */

.surfarea-weather-chart-hero {
  border: 1px solid #d9e5df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(18, 47, 37, 0.05);
  padding: 14px;
  margin-bottom: 12px;
}

.surfarea-weather-chart-hero__title {
  margin: 0;
  color: #1b4a3c;
  font-size: 30px !important;
  line-height: 1.35;
}

.surfarea-weather-chart-hero__sub {
  margin: 8px 0 0;
  color: #355f52;
  font-size: 14px;
  line-height: 1.7;
}

/* ─── セクション見出し ─────────────────────────────── */

.surfarea-weather-chart-section {
  margin-bottom: 20px;
}

.surfarea-weather-chart-section__title {
  margin: 0 0 10px;
  color: #1b4a3c;
  font-size: 20px;
  line-height: 1.4;
  padding-bottom: 6px;
  border-bottom: 2px solid #d9e5df;
}

/* ─── グリッド ────────────────────────────────────── */

.surfarea-weather-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

/* ─── カード ──────────────────────────────────────── */

.surfarea-weather-chart-card {
  margin: 0;
  border: 1px solid #d9e5df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(18, 47, 37, 0.05);
  overflow: hidden;
}

/* 画像をカード幅いっぱいに表示し、スマホではみ出さないようにする */
.surfarea-weather-chart-card__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* 画像が取得できなかった場合のプレースホルダー */
.surfarea-weather-chart-card__no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: #f5f8f6;
  color: #7a9a8e;
  font-size: 13px;
  padding: 16px;
}

.surfarea-weather-chart-card__caption {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.surfarea-weather-chart-card__label {
  color: #1b4a3c;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.4;
}

.surfarea-weather-chart-card__time {
  color: #355f52;
  font-size: 12px;
  line-height: 1.5;
}

/* ─── 取得時刻表示 ────────────────────────────────── */

.surfarea-weather-chart-fetched-at {
  margin: 8px 0 12px;
  color: #7a9a8e;
  font-size: 12px;
  text-align: right;
}

/* ─── 出典・免責 ──────────────────────────────────── */

.surfarea-weather-chart-source-notice {
  border: 1px solid #d9e5df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(18, 47, 37, 0.05);
  padding: 14px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
}

.surfarea-weather-chart-source-notice__title {
  margin: 0 0 8px;
  color: #1b4a3c;
  font-size: 16px;
  line-height: 1.35;
}

.surfarea-weather-chart-source-notice__source {
  margin: 0 0 8px;
  color: #355f52;
}

.surfarea-weather-chart-source-notice p {
  margin: 8px 0 0;
  color: #355f52;
}

.surfarea-weather-chart-source-notice a {
  color: #1b4a3c;
  text-decoration: underline;
}

/* ─── エラーフォールバック ───────────────────────── */

.surfarea-weather-chart-unavailable {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  color: #664d03;
  font-size: 14px;
  line-height: 1.7;
}

.surfarea-weather-chart-unavailable p {
  margin: 0;
}

/* ─── レスポンシブ（スマホ 480px 以下） ──────────── */

@media (max-width: 480px) {
  .surfarea-weather-chart-grid {
    grid-template-columns: 1fr;
  }

  .surfarea-weather-chart-hero__title {
    font-size: 22px !important;
  }

  .surfarea-weather-chart-section__title {
    font-size: 17px;
  }
}

.surfarea-weather-chart-card__no-image[hidden] {
  display: none !important;
}
