/* ── TIMER OVERLAY ── */
#timer-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  transition: background-color 0.8s ease-in-out;
}

#timer-overlay.mode-focus {
  background: radial-gradient(ellipse at 50% 40%, #D44030 0%, #A82218 100%);
}

#timer-overlay.mode-break {
  background: radial-gradient(ellipse at 50% 40%, #3D8B34 0%, #1F5C19 100%);
}

/* ── TIMER INNER LAYOUT ── */
.timer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
  height: 100%;
  padding: 0 20px 20px;
  position: relative;
}

/* Desktop: centered modal */
@media (min-width: 600px) {
  #timer-overlay {
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
  }

  .timer-inner {
    background: radial-gradient(ellipse at 50% 40%, #D44030 0%, #A82218 100%);
    border-radius: 28px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 32px 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  }

  #timer-overlay.mode-break .timer-inner {
    background: radial-gradient(ellipse at 50% 40%, #3D8B34 0%, #1F5C19 100%);
  }
}

/* ── SESSION DOTS (top) ── */
.timer-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  padding-bottom: 4px;
}

@media (min-width: 600px) {
  .timer-dots { padding-top: 0; }
}

.timer-dot {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s;
}

.timer-dot.done    { opacity: 1; }
.timer-dot.current { animation: pulse 1.5s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255,255,255,0.6)); }
.timer-dot.future  { opacity: 0.3; }

/* ── DRAINING TOMATO ── */
.timer-tomato-wrap {
  position: relative;
  width: 220px; height: 248px;
  flex-shrink: 0;
  margin: 8px 0;
}

.timer-tomato-svg {
  width: 100%; height: 100%;
}

/* Ripple ring */
.timer-ripple {
  position: absolute;
  top: 50%; left: 50%;
  width: 100px; height: 100px;
  margin: -50px 0 0 -50px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
  display: none;
}

.timer-ripple.active {
  display: block;
  animation: ripple 0.8s ease-out forwards;
}

/* ── TIME DISPLAY ── */
.timer-time {
  font-size: clamp(52px, 12vw, 72px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
}

.timer-session-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-bottom: 8px;
}

/* ── TASK STRIP ── */
.timer-task-strip {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 10px 16px;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  margin-top: 8px;
  word-break: break-word;
}

/* ── NOTES TAB ── */
.timer-notes-tab {
  width: 100%;
  margin-top: 12px;
}

.notes-tab-trigger {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
  display: block;
  margin: 0 auto;
}

.notes-tab-trigger:hover { background: rgba(255, 255, 255, 0.25); }

.notes-tab-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}

.notes-tab-content.open {
  max-height: 200px;
}

.timer-notes-input {
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  padding: 12px;
  resize: none;
  height: 100px;
  outline: none;
  transition: border-color 0.2s;
}

.timer-notes-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.timer-notes-input:focus { border-color: rgba(255, 255, 255, 0.7); }

/* ── TIMER CONTROLS ── */
.timer-controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  width: 100%;
  justify-content: center;
}

.timer-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.timer-btn:hover { background: rgba(255, 255, 255, 0.3); }

.timer-btn.danger {
  background: rgba(0, 0, 0, 0.25);
}

/* ── BREATHING GUIDE ── */
.breathing-guide {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.breathing-tomato {
  animation: breathe 9s ease-in-out infinite;
  transform-origin: center;
}

.breathing-text {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  min-height: 24px;
  transition: opacity 0.5s;
}

/* ── COUNTDOWN OVERLAY ── */
.timer-countdown-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

.timer-countdown-num {
  font-size: 96px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  animation: scaleIn 0.25s ease-out;
}

.timer-countdown-label {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 8px;
  text-align: center;
}

/* ── SESSION COMPLETE OVERLAY ── */
.timer-done-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
  padding: 32px;
  text-align: center;
}

.timer-done-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.timer-done-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 24px;
  line-height: 1.5;
}

.timer-done-btn {
  background: #fff;
  color: var(--red);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  cursor: pointer;
  margin-bottom: 10px;
  width: 100%;
  max-width: 280px;
}
