/* ── iOS Timer CSS v5 ──────────────────────────────────────── */

#ios-timer {
  background: #000;
  display: none; flex-direction: column; height: 100%;
}
#ios-timer.active-ui { display: flex; }

/* Safe area + some breathing room — flex so content centers */
.ios-safe-top { flex: 1; min-height: calc(env(safe-area-inset-top) + 8px); max-height: 120px; }

/* ── Slots ──────────────────────────────────────────────────── */
/* Outer wrapper to center the three columns */
.ios-slots-container {
  display: flex;
  align-items: stretch;
  /* height: 3 items × 44px = 132px */
  height: 132px;
  margin: 0 0 4px;
  position: relative;
  flex-shrink: 0;
}

/* Card behind the center row — full width, 44px tall, no separators */
.ios-center-card {
  position: absolute;
  left: 8px; right: 8px;
  top: 50%; transform: translateY(-50%);
  height: 44px;
  background: rgba(255,255,255,0.09);
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}

/* Per-slot column */
.ios-slot-wrapper {
  flex: 1; display: flex; flex-direction: column; align-items: center;
}

.ios-slot {
  flex: 1; width: 100%; overflow: hidden;
  cursor: grab; touch-action: none; position: relative;
}
.ios-slot:active { cursor: grabbing; }

/* Fade masks */
.ios-slot::before,
.ios-slot::after {
  content: ''; position: absolute; left: 0; right: 0;
  height: 44px; pointer-events: none; z-index: 3;
}
.ios-slot::before { top: 0;    background: linear-gradient(to bottom, rgba(0,0,0,0.96) 0%, transparent 100%); }
.ios-slot::after  { bottom: 0; background: linear-gradient(to top,   rgba(0,0,0,0.96) 0%, transparent 100%); }

.ios-slot-track {
  display: flex; flex-direction: column; will-change: transform;
}

/* Item height = 44px (3 items = 132px = container height) */
.ios-slot-item {
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 300;
  color: rgba(255,255,255,0.28);
  font-family: -apple-system, 'SF Pro Display', sans-serif;
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.ios-slot-item.selected {
  color: #fff; font-size: 24px; font-weight: 400;
}

/* Unit label below slot */
.ios-unit-label {
  font-size: 12px; color: rgba(255,255,255,0.4);
  font-family: -apple-system, 'SF Pro Text', sans-serif;
  height: 20px; line-height: 20px; flex-shrink: 0;
}

/* ── Actions ───────────────────────────────────────────────── */
.ios-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 28px 18px; flex-shrink: 0;
}
.ios-btn {
  width: 76px; height: 76px; border-radius: 50%; border: none;
  font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: -apple-system, 'SF Pro Text', sans-serif;
  transition: opacity 0.15s;
}
.ios-btn:active { opacity: 0.7; }
.ios-btn.cancel { background: #1c1c1e; color: #fff; }
.ios-btn.start  { background: #1d4a2e; color: #30d158; }

/* ── Fields ────────────────────────────────────────────────── */
.ios-fields {
  margin: 0 16px; background: #1c1c1e;
  border-radius: 12px; overflow: hidden; flex-shrink: 0;
}
.ios-field-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; font-family: -apple-system; font-size: 16px; color: #fff;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
}
.ios-field-row:last-child { border-bottom: none; }
.ios-field-value { color: #888; }

/* ── Recents ───────────────────────────────────────────────── */
.ios-recents-title {
  font-family: -apple-system, 'SF Pro Display', sans-serif;
  font-size: 22px; font-weight: 700; color: #fff; padding: 18px 16px 8px;
}
.ios-recents {
  padding: 0 16px; flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; min-height: 0;
}
.ios-recent-item {
  display: flex; align-items: center; justify-content: space-between; padding: 2px 0;
}
.ios-recent-time  { font-size: 32px; font-weight: 300; font-family: -apple-system; }
.ios-recent-label { font-size: 13px; color: #888; font-family: -apple-system; }
.ios-recent-play  {
  width: 38px; height: 38px; background: #1d4a2e; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  color: #30d158; font-size: 13px; cursor: pointer;
}

/* ── Tab Bar — iOS Clock app ────────────────────────────────── */
.ios-tab-bar {
  display: flex;
  background: rgba(20,20,20,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(255,255,255,0.12);
  padding: 6px 0 0;
  padding-bottom: calc(env(safe-area-inset-bottom) + 2px);
  flex-shrink: 0;
}
.ios-tab {
  flex: 1; background: none; border: none; color: #636366;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 4px 0 6px;
  font-family: -apple-system, 'SF Pro Text', sans-serif;
}
.ios-tab .tab-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.ios-tab .tab-icon svg { width: 24px; height: 24px; fill: currentColor; }
.ios-tab span { font-size: 10px; font-weight: 500; color: inherit; }
.ios-tab.active { color: #ff9f0a; }
