/* ── iOS Timer CSS v8 ── */

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

.ios-safe-top { flex: 1; min-height: calc(env(safe-area-inset-top) + 8px); max-height: 120px; }

/* Slots */
.ios-slots-container {
  display: flex; align-items: stretch; height: 132px;
  margin: 0 0 4px; position: relative; flex-shrink: 0;
}
.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;
}
.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; }
.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; }
.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 !important; font-size: 24px; font-weight: 400; }

.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; }

/* ── Liquid Glass Tab Bar ─────────────────────────────────
   Replicates iOS 18 Clock app style from reference image  */
.ios-tab-bar {
  display: flex;
  position: relative;
  margin: 0 12px 12px;
  margin-bottom: calc(12px + env(safe-area-inset-bottom));
  border-radius: 28px;
  overflow: hidden;
  flex-shrink: 0;
  /* Liquid glass background */
  background: rgba(40,40,42,0.72);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 0.5px solid rgba(255,255,255,0.18);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.5),
    inset 0 0.5px 0 rgba(255,255,255,0.15),
    inset 0 -0.5px 0 rgba(0,0,0,0.2);
}

.ios-tab {
  flex: 1; background: none; border: none;
  color: rgba(255,255,255,0.55);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 10px 4px 10px;
  font-family: -apple-system, 'SF Pro Text', sans-serif;
  position: relative; transition: color 0.18s;
}
.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; }

/* Active tab: bright white with subtle pill glow */
.ios-tab.active {
  color: #fff;
}
.ios-tab.active::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 36px;
  background: rgba(255,255,255,0.12);
  border-radius: 18px;
  backdrop-filter: blur(4px);
}
