/* =========================================================
   tab-tiempo.css
   ========================================================= */

.tiempo-wrap { max-width: 520px; margin: 0 auto; }

/* ── Sub-tabs ────────────────────────────────────────────── */
.tiempo-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px;
  justify-content: center;
}
.ttime-btn {
  padding: 5px 13px;
  border-radius: 8px;
  border: 1px solid rgba(124,255,178,0.2);
  background: transparent;
  color: #7a8e87; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.ttime-btn:hover     { border-color: rgba(124,255,178,0.5); color: #b5ffe0; background: rgba(124,255,178,0.06); }
.ttime-btn.active    { border-color: rgba(124,255,178,0.7); background: rgba(124,255,178,0.12); color: #7CFFB2; box-shadow: 0 0 10px rgba(124,255,178,0.2); }

/* ── Panel ───────────────────────────────────────────────── */
.ttime-panel { display: none; animation: fadeIn 0.2s ease; }
.ttime-panel.active { display: block; }

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

/* ── Display (big clock) ─────────────────────────────────── */
.tiempo-display {
  font-size: 56px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -2px;
  color: #7CFFB2;
  text-shadow: 0 0 24px rgba(124,255,178,0.5);
  text-align: center;
  margin-bottom: 4px;
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  transition: color 0.3s;
}

.tiempo-label {
  text-align: center;
  color: #9aa4ad;
  font-size: 13px;
  margin: 0 0 20px;
}

/* ── Form ────────────────────────────────────────────────── */
.tiempo-form { display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 400px; margin: 0 auto; width: 100%; }
.tiempo-form label { width: 100%; }
.tiempo-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: #9aa4ad; font-weight: 600;
}
.tiempo-form label input {
  padding: 9px 12px;
  background: #07090c;
  border: 1px solid rgba(124,255,178,0.2);
  border-radius: 8px;
  color: #e6e6e6;
  font-size: 14px;
}
.tiempo-form label input:focus { outline: none; border-color: rgba(124,255,178,0.55); }

.timer-inputs {
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.timer-input-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.timer-input-wrap input {
  width: 72px; padding: 10px;
  font-size: 24px; text-align: center;
  background: #07090c;
  border: 1px solid rgba(124,255,178,0.2);
  border-radius: 8px; color: #e6e6e6;
  font-variant-numeric: tabular-nums;
}
.timer-input-wrap input:focus { outline: none; border-color: rgba(124,255,178,0.55); }
.timer-input-wrap span { font-size: 11px; color: #9aa4ad; }
.timer-sep { font-size: 28px; color: #7CFFB2; margin-bottom: 16px; }

/* ── Action buttons ──────────────────────────────────────── */
.tiempo-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.ttime-action-btn {
  padding: 9px 20px;
  border-radius: 9px;
  border: 1px solid rgba(124,255,178,0.4);
  background: rgba(124,255,178,0.08);
  color: #7CFFB2; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.ttime-action-btn:hover { background: rgba(124,255,178,0.16); box-shadow: 0 0 12px rgba(124,255,178,0.2); }
.ttime-danger {
  border-color: rgba(248,113,113,0.4);
  background: rgba(248,113,113,0.06);
  color: #f87171;
}
.ttime-danger:hover { background: rgba(248,113,113,0.14); box-shadow: 0 0 12px rgba(248,113,113,0.2); }

/* ── Status ──────────────────────────────────────────────── */
.tiempo-status {
  text-align: center; font-size: 13px; color: #7cffb2;
  min-height: 20px; margin-top: 4px;
}

/* ── Cronómetro laps ─────────────────────────────────────── */
.chrono-laps {
  margin-top: 16px; max-height: 150px; overflow-y: auto;
}
.chrono-lap {
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px; color: #9aa4ad;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
}

/* ── Classic theme ───────────────────────────────────────── */
.theme-classic .ttime-btn           { border-color: #dcdfe4; background: #f5f7fa; color: #6b7280; }
.theme-classic .ttime-btn:hover     { border-color: #0e72ed; color: #0e72ed; background: #eef2ff; }
.theme-classic .ttime-btn.active    { border-color: #0e72ed; background: #eef2ff; color: #0e72ed; box-shadow: none; }
.theme-classic .tiempo-display      { color: #0e72ed; text-shadow: none; }
.theme-classic .tiempo-label        { color: #6b7280; }
.theme-classic .ttime-action-btn    { border-color: #dcdfe4; background: #f5f7fa; color: #0e72ed; }
.theme-classic .ttime-action-btn:hover { background: #eef2ff; border-color: #0e72ed; box-shadow: none; }
.theme-classic .ttime-danger        { border-color: rgba(220,53,69,0.4); background: rgba(220,53,69,0.05); color: #dc3545; }
.theme-classic .tiempo-form label input { background: #fff; border-color: #dcdfe4; color: #1f2937; }
.theme-classic .timer-input-wrap input  { background: #fff; border-color: #dcdfe4; color: #1f2937; }
.theme-classic .tiempo-status { color: #0e72ed; }
.theme-classic .chrono-lap { color: #6b7280; border-color: #eef0f3; }

/* ── Banner de alerta visual ─────────────────────────────── */
#tiempoBanner {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2147483647;
  align-items: center;
  justify-content: center;
  animation: bannerFadeIn 0.25s ease;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

#tiempoBannerInner {
  background: #07090c;
  border: 2px solid rgba(124,255,178,0.5);
  border-radius: 20px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 0 60px rgba(124,255,178,0.3), 0 0 120px rgba(0,0,0,0.8);
  max-width: 420px;
  width: 92%;
  animation: bannerPulse 1s ease-in-out infinite alternate;
}

@keyframes bannerPulse {
  from { box-shadow: 0 0 40px rgba(124,255,178,0.2); }
  to   { box-shadow: 0 0 80px rgba(124,255,178,0.5), 0 0 40px rgba(124,255,178,0.2); }
}

#tiempoBannerIcon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bannerIconBounce 0.6s ease-in-out infinite alternate;
}

@keyframes bannerIconBounce {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}

#tiempoBannerMsg {
  font-size: 22px;
  font-weight: 700;
  color: #7CFFB2;
  margin-bottom: 28px;
  line-height: 1.4;
  font-family: system-ui, sans-serif;
}

#tiempoBannerClose {
  padding: 12px 32px;
  border-radius: 10px;
  border: 1px solid rgba(124,255,178,0.5);
  background: rgba(124,255,178,0.12);
  color: #7CFFB2;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
#tiempoBannerClose:hover {
  background: rgba(124,255,178,0.22);
  box-shadow: 0 0 16px rgba(124,255,178,0.3);
}

/* Classic theme */
.theme-classic #tiempoBannerInner {
  background: #fff;
  border-color: #0e72ed;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.theme-classic #tiempoBannerMsg  { color: #0e72ed; }
.theme-classic #tiempoBannerClose {
  border-color: #0e72ed;
  background: #eef2ff;
  color: #0e72ed;
}

/* ── Selector visual de hora ─────────────────────────────── */
/* Centrar el picker y los botones dentro del form */
.tiempo-form .alarm-time-picker,
.tiempo-form .tiempo-actions { align-self: center; }
.tiempo-form label { width: 100%; }
.alarm-time-picker {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
}
.alarm-time-unit {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  position: relative;
}
.alarm-unit-btn {
  background: none; border: none; cursor: pointer;
  color: #7cffb2; font-size: 11px; line-height: 1;
  padding: 2px 8px; border-radius: 4px;
  transition: background 0.12s;
}
.alarm-unit-btn:hover { background: rgba(124,255,178,0.12); }
.alarm-unit-display {
  font-size: 36px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, monospace;
  color: #7CFFB2;
  text-shadow: 0 0 16px rgba(124,255,178,0.4);
  cursor: pointer; padding: 2px 8px;
  border-radius: 6px; transition: background 0.12s;
  min-width: 60px; text-align: center;
  display: block;
}
.alarm-unit-display:hover { background: rgba(124,255,178,0.08); }
.alarm-unit-label {
  font-size: 11px; color: #9aa4ad;
}
.alarm-unit-input {
  font-size: 32px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, monospace;
  color: #7CFFB2; background: rgba(124,255,178,0.08);
  border: 1px solid rgba(124,255,178,0.4);
  border-radius: 6px; width: 68px; text-align: center;
  padding: 2px 4px;
}
.alarm-unit-input:focus { outline: none; border-color: #7cffb2; }
.alarm-time-sep {
  font-size: 36px; font-weight: 700; color: #7CFFB2;
  margin-bottom: 20px; /* compensar la label de abajo */
}

/* Classic theme */
.theme-classic .alarm-unit-btn     { color: #0e72ed; }
.theme-classic .alarm-unit-btn:hover { background: #eef2ff; }
.theme-classic .alarm-unit-display { color: #0e72ed; text-shadow: none; cursor: pointer; }
.theme-classic .alarm-unit-display:hover { background: #eef2ff; }
.theme-classic .alarm-unit-label   { color: #6b7280; }
.theme-classic .alarm-time-sep     { color: #0e72ed; }
.theme-classic .alarm-unit-input   { color: #0e72ed; background: #eef2ff; border-color: #0e72ed; }

/* ── Hora en 12h bajo el display principal ───────────────── */
.alarm-time-12h {
  text-align: center;
  font-size: 16px;
  color: #9aa4ad;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono", ui-monospace, monospace;
  margin-top: -16px; /* acercar al display grande */
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}
.theme-classic .alarm-time-12h { color: #6b7280; }