/* ── iOS Timer CSS v10 ── */

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

/* Safe area top — flex to push content down */
.ios-safe-top {
  min-height: calc(env(safe-area-inset-top) + 8px);
  height: 6vh;
  max-height: 6vh;
  flex-shrink: 0;
}

/* "Tiempos" top-left label */
.ios-top-bar {
  padding: 0 20px 10px;
  flex-shrink: 0;
}
.ios-tiempos {
  font-family: -apple-system, 'SF Pro Display', sans-serif;
  font-size: 25px;
  font-weight: 700;
  color: #fff;
}

/* ── Slots ────────────────────────────────────────────────── */
/* Reference: number + unit label on same row, label to the RIGHT */
.ios-slots-container {
  display: flex;
  align-items: center;      /* vertically center all slot rows */
  height: 132px;
  width: min(314px, calc(100vw - 44px));
  margin: clamp(34px, 10vh, 88px) auto 4px;
  justify-content: center;
  gap: 1px;
  position: relative;
  flex-shrink: 0;
}

/* Center card — more rounded */
.ios-center-card {
  position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%);
  height: 44px;
  background: rgba(255,255,255,0.07);
  border-radius: 22px;
  pointer-events: none; z-index: 2;
}

/* Per-slot column — now ROW layout: number | unit */
.ios-slot-wrapper {
  flex: 0 1 auto;
  display: flex;
  flex-direction: row;      /* horizontal: slot + label side by side */
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
}

.ios-slot {
  flex: none;
  width: clamp(52px, 16vw, 62px);
  height: 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; }

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

/* Unit label: to the RIGHT of the slot, white, compact */
.ios-unit-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  font-family: -apple-system, 'SF Pro Text', sans-serif;
  white-space: nowrap;
  padding: 0 2px 0 0;
  margin-left: -1px;
  flex-shrink: 0;
  line-height: 44px;
  align-self: center;
}

/* ── Actions ───────────────────────────────────────────────── */
.ios-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 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: 17px;
  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 ──────────────────────────────────── */
.ios-tab-bar {
  display: flex;
  position: relative;
  margin: 0 12px 12px;
  margin-bottom: calc(12px + env(safe-area-inset-bottom));
  border-radius: 28px;
  overflow: visible;    /* allow pill pseudo-elements to be seen */
  flex-shrink: 0;
  background: rgba(40,40,42,0.68);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 0.5px solid rgba(255,255,255,0.16);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 0.5px 0 rgba(255,255,255,0.12);
  clip-path: inset(0 round 28px);   /* clip children without overflow:hidden */
}

.ios-tab {
  flex: 1; background: none; border: none;
  color: rgba(255,255,255,0.5);
  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;
  overflow: hidden;
}
.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; position: relative; z-index: 1; }
.ios-tab .tab-icon { position: relative; z-index: 1; }

/* Active tab — orange, pill covers icon + text */
.ios-tab.active { color: #ff9f0a; }
.ios-tab.active::before {
  content: '';
  position: absolute;
  /* Wide enough to cover "Temporizador" text (~80px) */
  left: 50%; top: 5px;
  transform: translateX(-50%);
  width: calc(100% - 4px);   /* full width of the tab cell minus small margin */
  height: 48px;              /* covers icon (28px) + gap (2px) + label (10px) + padding */
  background: rgba(255,159,10,0.16);
  border-radius: 22px;
  z-index: 0;
}
