/* GymDiet Master — Interval & Tabata Timer Modal Styles */
.interval-timer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10065;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.interval-timer-overlay.is-active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.interval-timer-card {
  width: 100%;
  max-width: 420px;
  background: #0d1110;
  border: 1px solid rgba(0, 240, 118, 0.2);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 240, 118, 0.08);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.interval-timer-overlay.is-active .interval-timer-card {
  transform: scale(1);
}

.interval-timer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.interval-timer-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
}

.interval-timer-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.interval-timer-close:hover {
  color: #00f076;
}

/* Mode selector tabs */
.interval-mode-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.interval-mode-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(218, 225, 248, 0.65);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.interval-mode-tab.is-active {
  background: #00f076;
  color: #041208;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 240, 118, 0.25);
}

/* Circular ring box */
.interval-display-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.interval-ring-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.interval-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.interval-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}

.interval-ring-progress {
  fill: none;
  stroke: #00f076;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 527.78;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s linear, stroke 0.3s ease;
}

.interval-center-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.interval-phase-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 4px;
}

.interval-phase-badge.work {
  background: rgba(0, 240, 118, 0.15);
  color: #00f076;
  border: 1px solid rgba(0, 240, 118, 0.3);
}

.interval-phase-badge.rest {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.interval-time-num {
  font-size: 44px;
  font-weight: 900;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 4px 0 6px;
}

.interval-round-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(218, 225, 248, 0.7);
}

/* Controls */
.interval-controls {
  display: flex;
  gap: 12px;
}

.interval-ctrl-btn {
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 50px;
}

.interval-ctrl-btn.reset {
  flex: 0 0 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 14px;
}

.interval-ctrl-btn.reset:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.interval-ctrl-btn.play {
  flex: 1;
  font-size: 16px;
  border: none;
}

.interval-ctrl-btn.play.is-play {
  background: #00f076;
  color: #041208;
  box-shadow: 0 6px 20px rgba(0, 240, 118, 0.35);
}

.interval-ctrl-btn.play.is-play:hover {
  background: #17c987;
  transform: translateY(-1px);
}

.interval-ctrl-btn.play.is-pause {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Light theme overrides */
html[data-theme="light"] .interval-timer-card,
body.light-theme .interval-timer-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15) !important;
}

html[data-theme="light"] .interval-timer-title,
body.light-theme .interval-timer-title {
  color: #0f172a !important;
}

html[data-theme="light"] .interval-timer-close,
body.light-theme .interval-timer-close {
  color: #64748b !important;
}

html[data-theme="light"] .interval-mode-tabs,
body.light-theme .interval-mode-tabs {
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
}

html[data-theme="light"] .interval-mode-tab,
body.light-theme .interval-mode-tab {
  color: #64748b !important;
}

html[data-theme="light"] .interval-mode-tab.is-active,
body.light-theme .interval-mode-tab.is-active {
  background: #00f076 !important;
  color: #000000 !important;
}

html[data-theme="light"] .interval-time-num,
body.light-theme .interval-time-num {
  color: #0f172a !important;
}

html[data-theme="light"] .interval-ring-bg,
body.light-theme .interval-ring-bg {
  stroke: #e2e8f0 !important;
}
