/* css/screen.css
   Screen-only styles: toolbar, weather board, map overlay, loading spinner.
   NOT applied during print — see print.css for @media print rules. */

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f5f0eb;
  color: #1a1a1a;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Toolbar ────────────────────────────────────────── */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}

.toolbar-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toolbar-right {
  display: flex;
  gap: 8px;
}

.toolbar button {
  padding: 8px 16px;
  border: 2px solid #3a3a3a;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: background 0.15s;
}

.toolbar button:hover {
  background: #eee;
}

.city-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 140px;
}

.city-btn .arrow {
  font-size: 10px;
  margin-left: auto;
}

.print-btn {
  background: #3a3a3a !important;
  color: #fff !important;
}

.print-btn:hover {
  background: #000 !important;
}

.refresh-btn {
  font-size: 18px !important;
  padding: 8px 12px !important;
}

/* ── Weather Board ──────────────────────────────────── */
.weather-board {
  max-width: 960px;
  margin: 24px auto;
  background: #fff;
  border: 4px solid #1a1a1a;
  padding: 32px 24px 24px;
}

.board-title {
  text-align: center;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.board-title-main {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.board-title-sub {
  font-size: 14px;
  color: #555;
  letter-spacing: 1px;
}

/* ── Forecast Table ─────────────────────────────────── */
.forecast-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.forecast-table th,
.forecast-table td {
  text-align: center;
  padding: 10px 4px;
  vertical-align: middle;
}

/* Column separators: dashed lines between days */
.forecast-table th,
.forecast-table td {
  border-right: 1px dashed #ccc;
}
.forecast-table th:last-child,
.forecast-table td:last-child {
  border-right: none;
}

/* Weekday header */
.forecast-table thead th {
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid #999;
  padding-bottom: 12px;
}

/* Weather icon */
.icon-cell {
  font-size: 36px;
  padding-top: 14px !important;
  padding-bottom: 4px !important;
  line-height: 1.2;
}

/* Weather text */
#textRow td {
  font-size: 13px;
  color: #555;
  padding-bottom: 8px;
}

/* Temp max — big and bold */
.temp-max {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

/* Temp min — smaller, grey */
.temp-min {
  font-size: 14px;
  color: #777;
  padding-bottom: 12px !important;
}

/* Clothing tag — black box around text */
.clothing-tag span {
  display: inline-block;
  border: 2px solid #1a1a1a;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 1px;
  white-space: nowrap;
  background: #fafaf8;
}

/* Row separators */
.forecast-table tbody tr {
  border-bottom: 1px dashed #ddd;
}
.forecast-table tbody tr:last-child {
  border-bottom: none;
}

/* ── Board Footer ───────────────────────────────────── */
.board-footer {
  text-align: center;
  border-top: 1px solid #1a1a1a;
  margin-top: 20px;
  padding-top: 12px;
  font-size: 12px;
  letter-spacing: 2px;
  color: #555;
}

/* ── Loading ────────────────────────────────────────── */
.loading {
  display: none;
  text-align: center;
  padding: 40px;
  font-size: 16px;
  color: #888;
  letter-spacing: 2px;
}

.loading.visible {
  display: block;
}

/* ── Error Banner ───────────────────────────────────── */
.error-banner {
  display: none;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
  letter-spacing: 1px;
}

.error-banner.visible {
  display: block;
}

.error-banner.warning {
  background: #fff8e1;
  color: #8d6e00;
}

.error-banner.error {
  background: #ffebee;
  color: #b71c1c;
}

/* ── Map Overlay ────────────────────────────────────── */
.map-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.map-overlay.visible {
  display: flex;
}

.map-panel {
  background: #fff;
  border: 3px solid #1a1a1a;
  width: 90vw;
  max-width: 700px;
  height: 80vh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.map-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  font-size: 15px;
  font-weight: 700;
}

.map-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.map-search-bar {
  padding: 8px 16px;
  border-bottom: 1px solid #eee;
}

.map-search-bar input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ccc;
  font-size: 14px;
  font-family: inherit;
}

#mapContainer {
  flex: 1;
  min-height: 0;
}

.map-panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #ddd;
  font-size: 13px;
}

.confirm-btn {
  padding: 8px 20px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.confirm-btn:hover {
  background: #000;
}