/* ── Main scrollable area ── */
.app-main {
  position: relative;
  z-index: 2;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ── Tab sections ── */
.tab-section {
  display: none;
  padding: 12px 16px 24px;
  min-height: 100%;
  animation: fadeIn 0.2s ease;
}
.tab-section.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Bottom tab bar ── */
.tab-bar {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  display: flex;
  background: var(--theme-surface);
  border-top: 1px solid var(--theme-border);
  padding-bottom: 0;                          /* fallback */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.35s, border-color 0.35s;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity 0.15s;
  min-height: 54px;
  position: relative;
}
.tab-btn::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--theme-accent);
  border-radius: 0 0 2px 2px;
  transition: width 0.2s, background 0.35s;
}
.tab-btn.active::before { width: 24px; }

.tab-ico { font-size: 20px; line-height: 1; }
.tab-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--theme-muted);
  transition: color 0.2s, 0.35s;
  font-family: "Outfit", sans-serif;
}
.tab-btn.active .tab-lbl { color: var(--theme-accent); }

/* ── Section heading ── */
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--theme-border);
  transition: color 0.35s, border-color 0.35s;
}

/* ── Cards used in sections ── */
.section-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  transition: background 0.35s, border-color 0.35s;
}

/* ── Info banner (pinned coach note) ── */
.info-banner {
  background: rgba(92,207,221,0.08);
  border: 1px solid rgba(92,207,221,0.25);
  border-left: 3px solid var(--theme-accent);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--theme-text);
  transition: all 0.35s;
}
.info-banner-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--theme-accent);
  margin-bottom: 6px;
  font-family: "Space Grotesk", sans-serif;
}
.info-banner.hidden { display: none; }

/* ── Pull-to-refresh bar ── */
.ptr-bar {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  color: var(--theme-muted);
  font-family: "Space Grotesk", monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  transition: color 0.35s;
}
.ptr-icon { display: inline-block; font-size: 16px; }
.ptr-lbl { transition: none; }

/* ── Day tabs (Leikir / Dagskrá) ── */
.day-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.day-tab {
  flex: 1;
  padding: 8px 4px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--theme-border);
  font-size: 12px;
  font-weight: 600;
  font-family: "Outfit", sans-serif;
  cursor: pointer;
  color: var(--theme-muted);
  background: transparent;
  transition: all 0.15s;
}
.day-tab.active {
  background: var(--gold-dim);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}
