/* ============================================================
   7-dages vejrudsigt — 7-imeron.css
   vejretodense.com
   ============================================================ */

.wk-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.wk-page .page-breadcrumb { max-width: none; margin: 0; }

/* ── LOADING ── */
.wk-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--subtle);
}

.wk-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--greek-foam);
  border-top-color: var(--greek-blue);
  border-radius: 50%;
  animation: wk-spin 0.8s linear infinite;
}

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

/* ── PAGE HEADER ── */
.wk-header { margin-bottom: 16px; }

.wk-header h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.wk-subtitle {
  font-size: 0.9rem;
  color: var(--subtle);
}

/* ── WEEK SUMMARY ── */
.wk-summary {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, #FDF0F0 0%, #ffffff 100%);
  border: 1px solid var(--greek-foam);
  border-left: 4px solid var(--greek-blue);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.wk-summary-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.wk-summary-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}

/* ── TEMP OVERVIEW ── */
.wk-temp-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.wk-temp-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.wk-temp-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  font-weight: 600;
  margin-bottom: 6px;
}

.wk-temp-val {
  font-size: 1.5rem;
  font-weight: 700;
}

.wk-temp-hi .wk-temp-val { color: #d84315; }
.wk-temp-lo .wk-temp-val { color: #1565c0; }
.wk-temp-rain .wk-temp-val { color: #D4213A; }

/* ── DAILY CARDS ── */
.wk-days {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wk-day {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.wk-day:hover {
  box-shadow: var(--shadow-lg);
}

.wk-day.wk-day--today {
  border-left: 4px solid var(--greek-blue);
}

/* Main row */
.wk-day-main {
  display: grid;
  grid-template-columns: 90px 50px 1fr 70px 60px 50px 36px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.wk-day-main:hover {
  background: #F5F7FA;
}

.wk-day-main:focus-visible {
  outline: 2px solid var(--greek-blue);
  outline-offset: -2px;
}

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

.wk-day--today .wk-day-name {
  color: var(--greek-blue);
}

.wk-day-date {
  display: block;
  font-size: 0.72rem;
  color: var(--subtle);
  font-weight: 400;
  margin-top: 1px;
}

.wk-day-icon {
  font-size: 1.6rem;
  text-align: center;
}
.wk-day-icon svg { width: 36px; height: 36px; }

.wk-day-rain { display: flex; align-items: center; gap: 3px; }
.wk-day-rain svg { width: 14px; height: 14px; flex-shrink: 0; }

.wk-summary-icon svg { width: 40px; height: 40px; }

.wk-day-desc {
  font-size: 0.85rem;
  color: var(--subtle);
}

.wk-day-temps {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.wk-day-hi {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.wk-day-lo {
  font-size: 0.9rem;
  color: var(--subtle);
}

.wk-day-rain {
  font-size: 0.82rem;
  color: #D4213A;
  text-align: right;
  font-weight: 500;
}

.wk-day-chevron {
  text-align: center;
  color: var(--subtle);
  font-size: 0.8rem;
  transition: transform 0.25s ease;
}

.wk-day.expanded .wk-day-chevron {
  transform: rotate(180deg);
}

/* Temperature bar */
.wk-temp-bar-wrap {
  grid-column: 1 / -1;
  padding: 0 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wk-temp-bar-lo, .wk-temp-bar-hi {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 28px;
}
.wk-temp-bar-lo { color: #6fb3f7; text-align: right; }
.wk-temp-bar-hi { color: #e08b1a; }

.wk-temp-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #c8e6ff 0%, #a8d4f0 20%, #e8d88a 50%, #f5b74d 80%, #ef6350 100%);
  position: relative;
  opacity: 0.2;
}

.wk-temp-range {
  position: absolute;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #6fb3f7, #a8d4f0, #f5d57a, #e08b1a);
  opacity: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Detail panel */
.wk-day-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: linear-gradient(135deg, #FDF0F0 0%, #F5F7FA 100%);
  border-top: 1px solid #D5DFE9;
}

.wk-day.expanded .wk-day-detail {
  max-height: 300px;
  padding: 18px 20px 22px;
}

.wk-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 24px;
}

.wk-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #D5DFE9;
}

.wk-detail-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
  font-weight: 700;
}

.wk-detail-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 600;
}
.wk-detail-value svg { width: 20px; height: 20px; vertical-align: middle; margin-right: 4px; }

/* ── UPDATE BADGE ── */
.wk-update {
  text-align: center;
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--subtle);
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .wk-page { padding: 0 10px 32px; }
  .wk-header h1 { font-size: 1.3rem; }

  .wk-day-main {
    grid-template-columns: 75px 42px 1fr 60px 36px;
  }

  .wk-day-desc,
  .wk-day-rain {
    display: none;
  }

  .wk-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wk-temp-overview {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .wk-temp-val { font-size: 1.2rem; }
}

@media (max-width: 420px) {
  .wk-summary { flex-direction: column; gap: 10px; }
  .wk-temp-card { padding: 12px 8px; }
}

/* ── Summary row (inline → class) ── */
.ip-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}
.ip-summary-label {
  font-size: 12px;
  color: var(--subtle);
}
.ip-summary-val {
  font-size: 14px;
  font-weight: 700;
}
