/* ============================================================
   TIMER — timer view, yin-mode overrides, active timer cards
   ============================================================ */

#timer-view.active { flex: 1; }

body.yin-timer-view #tagline-text,
body.yin-timer-view #app-subtitle { display: none; }

body.yin-timer-view #timer-view.active {
  justify-content: center;
  padding-top: 0;
}

body.yin-timer-view #timer-view .timer-screen-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-actions-block {
  width: 100%;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
}

body.yin-timer-view .timer-actions-block { margin-top: 4px; }

.timer-actions-block #timer-details-wrap,
.timer-actions-block #timer-home-btn,
.timer-actions-block #cancel-btn {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.timer-actions-block #cancel-btn {
  width: auto;
  align-self: center;
  margin-top: 2px;
}

.timer-yin-task-row {
  max-width: min(100%, 380px);
  margin: 0 auto 20px;
  flex-wrap: wrap;
}

.timer-yin-task-row #current-task-name {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

/* --- Active timer cards --- */
.active-timers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.active-timer-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
}

.active-timer-actions {
  display: flex;
  gap: 8px;
}

.active-timer-actions button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

/* --- Responsive: small screens --- */
@media (max-height: 760px), (max-width: 420px) {
  body.yin-timer-view #timer-view.active   { padding-bottom: 10px; }

  body.yin-timer-view #timer-view .timer-screen-inner {
    justify-content: flex-start;
    padding-top: 2px;
  }

  body.yin-timer-view #timer-working-line {
    margin-bottom: 6px !important;
    font-size: 0.74rem;
    line-height: 1.25;
  }

  body.yin-timer-view .timer-yin-task-row  { margin-bottom: 12px; gap: 6px; }

  body.yin-timer-view #current-category {
    padding: 4px 10px !important;
    font-size: 0.68rem;
  }

  body.yin-timer-view #current-task-name {
    font-size: 1.05rem !important;
    line-height: 1.2;
  }

  body.yin-timer-view #timer-circle {
    margin-bottom: 10px !important;
  }

  body.yin-timer-view .timer-actions-block {
    gap: 8px;
    max-width: min(100%, 340px);
  }

  body.yin-timer-view #timer-details-label {
    margin-bottom: 6px !important;
    font-size: 0.68rem;
  }

  body.yin-timer-view #timer-details-input {
    min-height: 64px;
    max-height: 72px;
    padding: 10px 12px !important;
    font-size: 0.82rem;
  }

  body.yin-timer-view #timer-home-btn {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

/* --- Timer content scales with CSS vars set by applyTimerButtonSize() --- */
#timer-display {
  font-size: var(--timer-display-font, 3rem);
}

#timer-started {
  font-size: var(--timer-started-font, 0.75rem);
  margin-top: calc(0.5rem * var(--timer-scale, 1));
}

@media (max-height: 680px), (max-width: 380px) {
  body.yin-timer-view #timer-view.active {
    padding-left: 18px;
    padding-right: 18px;
  }

  body.yin-timer-view #timer-circle {
    margin-bottom: 8px !important;
  }

  body.yin-timer-view #timer-details-input {
    min-height: 54px;
    max-height: 60px;
  }
}
