/* ===== Timer Tool Styles ===== */

/* ===== Breadcrumb =====
   Content section is always on a white background across every theme,
   so pin breadcrumb colors to the light-mode palette. Using --text-secondary
   here would render the breadcrumb white on color themes (red/teal/blue/...). */
.breadcrumb {
  font-size: 13px;
  color: #555555;
  margin-bottom: 28px;
}

.breadcrumb a {
  color: #555555;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #000000;
}

.breadcrumb span {
  margin: 0 4px;
}

/* ===== Site Name (only used on timer page) ===== */
.site-name {
  font-size: 32px;
  color: #555555;
  text-transform: uppercase;
  letter-spacing: 3.2px;
  text-align: center;
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 400;
  transition: opacity 0.5s, transform 0.5s;
  white-space: nowrap;
}

[data-theme="light"] .site-name {
  color: #b3b3b3;
}

.site-name.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
}

.site-name.hidden {
  display: none;
}

/* ===== Timer Setup Container ===== */
.timer-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ===== Desktop Time Input ===== */
.timer-clock-desktop {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-unit-labels {
  display: flex;
  margin-bottom: 8px;
}

.timer-unit-labels span {
  min-width: 148px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
  user-select: none;
}

.timer-unit-labels span:not(:last-child) {
  margin-right: 25px;
}

[data-theme="light"] .timer-unit-labels span {
  color: #656565;
}

.timer-clock-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 556px;
  height: 156px;
  background-color: #1e1e1e;
  border-radius: 8px;
  box-shadow: inset 0px -1px 0px 0px #3b3b3b;
}

[data-theme="light"] .timer-clock-bg {
  background-color: #ebebeb;
  box-shadow: inset 0px -1px 0px 0px #d0d0d0;
}

.timer-digit-group {
  font-size: 120px;
  font-weight: 300;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-width: 148px;
  cursor: pointer;
  padding: 10px 0;
  border-radius: 6px;
  border: 2px solid transparent;
  line-height: 1;
  outline: none;
  transition: border-color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 0;
}

.timer-digit-group.active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: #ce841f;
  border-radius: 3px;
  z-index: -1;
}

.timer-colon {
  font-size: 120px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  user-select: none;
  width: auto;
  text-align: center;
}

/* ===== Mobile Time Input ===== */
.timer-clock-mobile {
  display: none;
  gap: 25px;
  justify-content: center;
  align-items: flex-start;
}

.timer-mobile-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 84px;
  gap: 0;
}

.timer-mobile-label {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 6px;
  user-select: none;
  width: 100%;
  text-align: center;
}

[data-theme="light"] .timer-mobile-label {
  color: #656565;
}

.timer-mobile-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 48px;
  background-color: #1e1e1e;
  border: 0.5px solid #555;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

[data-theme="light"] .timer-mobile-box {
  background-color: #ebebeb;
  border-color: #ccc;
}

.timer-mobile-value {
  font-size: 36px;
  font-weight: 300;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-mobile-arrow {
  display: none;
}

.timer-mobile-arrow svg {
  width: 12px;
  height: 8px;
  fill: var(--text-secondary);
}

/* Mobile dropdown list */
.timer-mobile-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: 85px;
  max-height: 380px;
  overflow-y: auto;
  background-color: #2a2a2a;
  border-radius: 4px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="light"] .timer-mobile-dropdown {
  background-color: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.timer-mobile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.timer-mobile-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  font-size: 24px;
  font-weight: 300;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.1s;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
}

.timer-mobile-dropdown-item:last-child {
  border-bottom: none;
}

[data-theme="light"] .timer-mobile-dropdown-item {
  border-bottom-color: rgba(0,0,0,0.1);
}

.timer-mobile-dropdown-item:hover {
  background-color: rgba(255,255,255,0.05);
}

[data-theme="light"] .timer-mobile-dropdown-item:hover {
  background-color: rgba(0,0,0,0.05);
}

.timer-mobile-dropdown-item.selected {
  color: #e66c00;
}

.timer-mobile-dropdown::-webkit-scrollbar {
  width: 3px;
}
.timer-mobile-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.timer-mobile-dropdown::-webkit-scrollbar-thumb {
  background: #8d8d8d;
  border-radius: 5px;
}

/* ===== Label Input ===== */
.timer-label-wrap {
  margin-top: 30px;
}

.timer-label-input {
  width: 168px;
  height: 23px;
  background-color: #202020;
  border: none;
  border-radius: 5px;
  box-shadow: inset 0px -1px 0px 0px #515151;
  color: var(--text-primary);
  font-size: 12px;
  padding: 0 13px;
  outline: none;
  font-family: system-ui, -apple-system, sans-serif;
}

[data-theme="light"] .timer-label-input {
  background-color: #f0f0f0;
  box-shadow: inset 0px -1px 0px 0px #d0d0d0;
}

.timer-label-input::placeholder {
  color: #5f5f5f;
}

[data-theme="light"] .timer-label-input::placeholder {
  color: #999;
}

/* ===== Sound Selector ===== */
.timer-sound-wrap {
  margin-top: 12px;
  position: relative;
}

.timer-sound-btn {
  display: flex;
  align-items: center;
  width: 168px;
  height: 23px;
  background-color: #565656;
  border: none;
  border-radius: 5px;
  box-shadow: inset 0px 1px 0px 0px #696969;
  color: #ffffff;
  font-size: 12px;
  padding: 0 13px;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  position: relative;
}

[data-theme="light"] .timer-sound-btn {
  background-color: #d8d8d8;
  box-shadow: inset 0px 1px 0px 0px #e8e8e8;
  color: #000000;
}

.timer-sound-name {
  flex: 1;
  text-align: left;
}

.timer-sound-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  background-color: #e66c00;
  border-radius: 4px;
  box-shadow: 0px 0px 3px 0px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  pointer-events: none;
}

.timer-sound-toggle-arrow {
  display: block;
  width: 11px;
  height: 6px;
}

.timer-sound-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 168px;
  background-color: #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  padding: 4px 0;
}

[data-theme="light"] .timer-sound-dropdown {
  background-color: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.timer-sound-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.timer-sound-option {
  display: block;
  width: 100%;
  padding: 6px 13px;
  color: #ffffff;
  font-size: 12px;
  background: none;
  border: none;
  border-bottom: 0.5px solid rgba(255,255,255,0.1);
  text-align: left;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  transition: background-color 0.1s;
}

.timer-sound-option:last-child {
  border-bottom: none;
}

[data-theme="light"] .timer-sound-option {
  color: #000000;
  border-bottom-color: rgba(0,0,0,0.1);
}

.timer-sound-option:hover {
  background-color: rgba(255,255,255,0.05);
}

[data-theme="light"] .timer-sound-option:hover {
  background-color: rgba(0,0,0,0.05);
}

.timer-sound-option.selected {
  color: #e66c00;
}


/* ===== Timer Running Display ===== */
.timer-area {
  position: relative;
  width: 100%;
  margin-bottom: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.timer-area.timer-running {
  min-height: 360px;
}

.timer-area + .btn-group {
  margin-top: 30px;
}

.timer-area.timer-running + .btn-group {
  margin-top: 60px;
}

.timer-running-display {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  pointer-events: none;
}

.timer-running-display.visible {
  display: flex;
  animation: timerRunningFadeIn 0.3s ease-out;
}

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

.timer-ring-container {
  position: relative;
  width: 360px;
  height: 360px;
}

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

.timer-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 6;
}

[data-theme="light"] .timer-ring-bg {
  stroke: rgba(0, 0, 0, 0.12);
}

.timer-ring-progress {
  fill: none;
  stroke: #ff9f0b;
  stroke-width: 6;
  stroke-linecap: round;
}

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

.timer-ring-alarm {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.timer-bell-icon {
  width: 13px;
  height: 16px;
  fill: #ff9f0b;
}

.timer-alarm-time {
  font-size: 16px;
  font-weight: 600;
  color: #ff9f0b;
  line-height: 1.2;
}

.timer-countdown-time {
  font-size: 96px;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timer-countdown-time.has-hours {
  font-size: 72px;
}

.timer-countdown-label {
  font-size: 16px;
  font-weight: 600;
  color: #aeaeae;
  text-align: center;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 12px;
  line-height: 1.4;
}

.timer-countdown-label:empty {
  display: none;
}

[data-theme="light"] .timer-countdown-label {
  color: #888;
}

/* Timer pause button (orange) */
.btn-timer-pause {
  background: #ff9f0b;
  color: #ffffff;
}

[data-theme="light"] .btn-timer-pause {
  background: #e08a00;
  color: #ffffff;
}

/* ===== Timer Recents ===== */
.timer-recents {
  display: none;
  width: 100%;
  padding: 0 23px;
  margin-top: 40px;
}

.timer-recents.visible {
  display: grid;
  grid-template-columns: repeat(auto-fill, 232px);
  gap: 14px;
  justify-content: center;
  padding-bottom: 40px;
}

.timer-recents-title {
  grid-column: 1 / -1;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.timer-recents-desktop {
  display: contents;
}

.timer-recent-card {
  width: 232px;
  height: 211px;
  background-color: #1a1a1a;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 14px 12px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

[data-theme="light"] .timer-recent-card {
  background-color: #eaeaea;
}

.timer-recent-circle {
  position: relative;
  width: 157px;
  height: 157px;
}

.timer-recent-circle svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-recent-circle-bg {
  fill: none;
  stroke: #3a3a3a;
  stroke-width: 4;
}

[data-theme="light"] .timer-recent-circle-bg {
  stroke: #d0d0d0;
}

.timer-recent-circle-progress {
  fill: none;
  stroke: #aeaeae;
  stroke-width: 4;
  stroke-linecap: round;
}

[data-theme="light"] .timer-recent-circle-progress {
  stroke: #888;
}

.timer-recent-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  font-weight: 300;
  color: #aeaeae;
  text-align: center;
  line-height: 1;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-theme="light"] .timer-recent-time {
  color: #888;
}

.timer-recent-time.has-hours {
  font-size: 24px;
}

.timer-recent-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 0);
  margin-top: 22px;
  font-size: 12px;
  color: #aeaeae;
  text-align: center;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
  line-height: 1.3;
}

[data-theme="light"] .timer-recent-label {
  color: #888;
}

.timer-recent-label.multiline {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.timer-recent-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
}

.timer-recent-delete {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background-color: #3a3a3a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.timer-recent-delete:hover {
  background-color: #4a4a4a;
}

[data-theme="light"] .timer-recent-delete {
  background-color: #d0d0d0;
}

[data-theme="light"] .timer-recent-delete:hover {
  background-color: #bbb;
}

.timer-recent-delete svg {
  width: 12px;
  height: 12px;
  stroke: #999;
  stroke-width: 2;
  stroke-linecap: round;
}

[data-theme="light"] .timer-recent-delete svg {
  stroke: #666;
}

.timer-recent-play {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background-color: #30af4f;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.timer-recent-play:hover {
  background-color: #28a745;
}

.timer-recent-play svg {
  width: 10px;
  height: 12px;
  fill: #ffffff;
  margin-left: 2px;
}

/* === Mobile Recents: vertical list === */
.timer-recents-mobile {
  display: none;
}

.timer-recent-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  user-select: none;
  -webkit-user-select: none;
}

[data-theme="light"] .timer-recent-row {
  border-top-color: rgba(0,0,0,0.08);
}

.timer-recent-row:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

[data-theme="light"] .timer-recent-row:last-child {
  border-bottom-color: rgba(0,0,0,0.08);
}

.timer-recent-row-info {
  flex: 1;
  min-width: 0;
}

.timer-recent-row-time {
  font-size: 42px;
  font-weight: 300;
  color: #aeaeae;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .timer-recent-row-time {
  color: #888;
}

.timer-recent-row-label {
  font-size: 12px;
  color: #aeaeae;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  margin-top: 2px;
}

[data-theme="light"] .timer-recent-row-label {
  color: #888;
}

.timer-recent-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}

.timer-recent-row-delete {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background-color: #3a3a3a;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.timer-recent-row-delete:hover {
  background-color: #4a4a4a;
}

[data-theme="light"] .timer-recent-row-delete {
  background-color: #d0d0d0;
}

[data-theme="light"] .timer-recent-row-delete:hover {
  background-color: #bbb;
}

.timer-recent-row-delete svg {
  width: 14px;
  height: 14px;
  stroke: #999;
  stroke-width: 2;
  stroke-linecap: round;
}

[data-theme="light"] .timer-recent-row-delete svg {
  stroke: #666;
}

.timer-recent-row-play {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background-color: #30af4f;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.timer-recent-row-play:hover {
  background-color: #28a745;
}

.timer-recent-row-play svg {
  width: 14px;
  height: 16px;
  fill: #ffffff;
  margin-left: 2px;
}

/* ===== Drag & Reorder (Desktop) ===== */
/* Dragging card becomes a translucent "glass" panel: whatever the user is
   dragging it over is visible through the card but softly blurred, giving
   the drag a lifted-above-the-page feel. Each theme gets its own
   translucent base so the card keeps a readable tint. */
.timer-recent-card.dragging {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(1.03) rotate(1deg);
  z-index: 1000;
  background-color: rgba(26, 26, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

[data-theme="light"] .timer-recent-card.dragging {
  background-color: rgba(234, 234, 234, 0.55);
}

[data-theme="red"] .timer-recent-card.dragging,
[data-theme="teal"] .timer-recent-card.dragging,
[data-theme="blue"] .timer-recent-card.dragging,
[data-theme="purple"] .timer-recent-card.dragging,
[data-theme="green"] .timer-recent-card.dragging,
[data-theme="slate"] .timer-recent-card.dragging {
  background-color: rgba(255, 255, 255, 0.18);
}

.timer-recent-card.dragging .timer-recent-delete,
.timer-recent-card.dragging .timer-recent-play {
  opacity: 0 !important;
}

.timer-drag-placeholder {
  border-radius: 11px;
  background: transparent;
  min-height: 211px;
  width: 232px;
}

/* ===== Content Section Extras ===== */
.timer-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.content-section a.timer-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--content-border);
  border-radius: 999px;
  background: var(--content-card-bg);
  color: var(--content-heading);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.content-section a.timer-preset:hover {
  border-color: var(--accent);
  color: var(--content-heading);
}

.content-section code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 2px 6px;
  background: var(--content-card-bg);
  border: 1px solid var(--content-border);
  border-radius: 4px;
  color: var(--content-heading);
  word-break: break-word;
}

/* ===== Color theme overrides =====
   The default dark-grey surfaces (timer-clock-bg, label input, sound btn,
   recent cards) clash with the accent-colored hero on color themes. Swap
   to translucent-white glass, mirroring the pattern the alarm modal uses. */

/* Main timer picker */
[data-theme="red"] .timer-clock-bg,
[data-theme="teal"] .timer-clock-bg,
[data-theme="blue"] .timer-clock-bg,
[data-theme="purple"] .timer-clock-bg,
[data-theme="green"] .timer-clock-bg,
[data-theme="slate"] .timer-clock-bg {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="red"] .timer-unit-labels span,
[data-theme="teal"] .timer-unit-labels span,
[data-theme="blue"] .timer-unit-labels span,
[data-theme="purple"] .timer-unit-labels span,
[data-theme="green"] .timer-unit-labels span,
[data-theme="slate"] .timer-unit-labels span {
  color: rgba(255, 255, 255, 0.75);
}

/* Mobile hour/min picker boxes */
[data-theme="red"] .timer-mobile-box,
[data-theme="teal"] .timer-mobile-box,
[data-theme="blue"] .timer-mobile-box,
[data-theme="purple"] .timer-mobile-box,
[data-theme="green"] .timer-mobile-box,
[data-theme="slate"] .timer-mobile-box {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="red"] .timer-mobile-label,
[data-theme="teal"] .timer-mobile-label,
[data-theme="blue"] .timer-mobile-label,
[data-theme="purple"] .timer-mobile-label,
[data-theme="green"] .timer-mobile-label,
[data-theme="slate"] .timer-mobile-label {
  color: rgba(255, 255, 255, 0.75);
}

/* Label input */
[data-theme="red"] .timer-label-input,
[data-theme="teal"] .timer-label-input,
[data-theme="blue"] .timer-label-input,
[data-theme="purple"] .timer-label-input,
[data-theme="green"] .timer-label-input,
[data-theme="slate"] .timer-label-input {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #ffffff;
}

[data-theme="red"] .timer-label-input::placeholder,
[data-theme="teal"] .timer-label-input::placeholder,
[data-theme="blue"] .timer-label-input::placeholder,
[data-theme="purple"] .timer-label-input::placeholder,
[data-theme="green"] .timer-label-input::placeholder,
[data-theme="slate"] .timer-label-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Sound button (the orange toggle badge is left as-is - it stays as an
   accent highlight on top of the new translucent bg) */
[data-theme="red"] .timer-sound-btn,
[data-theme="teal"] .timer-sound-btn,
[data-theme="blue"] .timer-sound-btn,
[data-theme="purple"] .timer-sound-btn,
[data-theme="green"] .timer-sound-btn,
[data-theme="slate"] .timer-sound-btn {
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  color: #ffffff;
}

/* Dropdowns (mobile hour/min/sec picker + sound list) default to a dark
   #2a2a2a bg which clashes with the accent hero. Use a translucent dark
   overlay so the dropdown still reads as a menu without breaking tone. */
[data-theme="red"] .timer-mobile-dropdown,
[data-theme="teal"] .timer-mobile-dropdown,
[data-theme="blue"] .timer-mobile-dropdown,
[data-theme="purple"] .timer-mobile-dropdown,
[data-theme="green"] .timer-mobile-dropdown,
[data-theme="slate"] .timer-mobile-dropdown,
[data-theme="red"] .timer-sound-dropdown,
[data-theme="teal"] .timer-sound-dropdown,
[data-theme="blue"] .timer-sound-dropdown,
[data-theme="purple"] .timer-sound-dropdown,
[data-theme="green"] .timer-sound-dropdown,
[data-theme="slate"] .timer-sound-dropdown {
  background-color: rgba(0, 0, 0, 0.22);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

[data-theme="red"] .timer-mobile-dropdown-item,
[data-theme="teal"] .timer-mobile-dropdown-item,
[data-theme="blue"] .timer-mobile-dropdown-item,
[data-theme="purple"] .timer-mobile-dropdown-item,
[data-theme="green"] .timer-mobile-dropdown-item,
[data-theme="slate"] .timer-mobile-dropdown-item,
[data-theme="red"] .timer-sound-option,
[data-theme="teal"] .timer-sound-option,
[data-theme="blue"] .timer-sound-option,
[data-theme="purple"] .timer-sound-option,
[data-theme="green"] .timer-sound-option,
[data-theme="slate"] .timer-sound-option {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

[data-theme="red"] .timer-mobile-dropdown-item.selected,
[data-theme="teal"] .timer-mobile-dropdown-item.selected,
[data-theme="blue"] .timer-mobile-dropdown-item.selected,
[data-theme="purple"] .timer-mobile-dropdown-item.selected,
[data-theme="green"] .timer-mobile-dropdown-item.selected,
[data-theme="slate"] .timer-mobile-dropdown-item.selected,
[data-theme="red"] .timer-sound-option.selected,
[data-theme="teal"] .timer-sound-option.selected,
[data-theme="blue"] .timer-sound-option.selected,
[data-theme="purple"] .timer-sound-option.selected,
[data-theme="green"] .timer-sound-option.selected,
[data-theme="slate"] .timer-sound-option.selected {
  color: #ffe58f;
}

/* Recent cards (desktop) */
[data-theme="red"] .timer-recent-card,
[data-theme="teal"] .timer-recent-card,
[data-theme="blue"] .timer-recent-card,
[data-theme="purple"] .timer-recent-card,
[data-theme="green"] .timer-recent-card,
[data-theme="slate"] .timer-recent-card {
  background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="red"] .timer-recent-circle-bg,
[data-theme="teal"] .timer-recent-circle-bg,
[data-theme="blue"] .timer-recent-circle-bg,
[data-theme="purple"] .timer-recent-circle-bg,
[data-theme="green"] .timer-recent-circle-bg,
[data-theme="slate"] .timer-recent-circle-bg {
  stroke: rgba(255, 255, 255, 0.25);
}

[data-theme="red"] .timer-recent-circle-progress,
[data-theme="teal"] .timer-recent-circle-progress,
[data-theme="blue"] .timer-recent-circle-progress,
[data-theme="purple"] .timer-recent-circle-progress,
[data-theme="green"] .timer-recent-circle-progress,
[data-theme="slate"] .timer-recent-circle-progress {
  stroke: #ffffff;
}

[data-theme="red"] .timer-recent-time,
[data-theme="teal"] .timer-recent-time,
[data-theme="blue"] .timer-recent-time,
[data-theme="purple"] .timer-recent-time,
[data-theme="green"] .timer-recent-time,
[data-theme="slate"] .timer-recent-time {
  color: #ffffff;
}

[data-theme="red"] .timer-recent-label,
[data-theme="teal"] .timer-recent-label,
[data-theme="blue"] .timer-recent-label,
[data-theme="purple"] .timer-recent-label,
[data-theme="green"] .timer-recent-label,
[data-theme="slate"] .timer-recent-label {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="red"] .timer-recent-delete,
[data-theme="teal"] .timer-recent-delete,
[data-theme="blue"] .timer-recent-delete,
[data-theme="purple"] .timer-recent-delete,
[data-theme="green"] .timer-recent-delete,
[data-theme="slate"] .timer-recent-delete {
  background-color: rgba(255, 255, 255, 0.15);
}

[data-theme="red"] .timer-recent-delete:hover,
[data-theme="teal"] .timer-recent-delete:hover,
[data-theme="blue"] .timer-recent-delete:hover,
[data-theme="purple"] .timer-recent-delete:hover,
[data-theme="green"] .timer-recent-delete:hover,
[data-theme="slate"] .timer-recent-delete:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

[data-theme="red"] .timer-recent-delete svg,
[data-theme="teal"] .timer-recent-delete svg,
[data-theme="blue"] .timer-recent-delete svg,
[data-theme="purple"] .timer-recent-delete svg,
[data-theme="green"] .timer-recent-delete svg,
[data-theme="slate"] .timer-recent-delete svg {
  stroke: #ffffff;
}

/* Recent rows (mobile) */
[data-theme="red"] .timer-recent-row,
[data-theme="teal"] .timer-recent-row,
[data-theme="blue"] .timer-recent-row,
[data-theme="purple"] .timer-recent-row,
[data-theme="green"] .timer-recent-row,
[data-theme="slate"] .timer-recent-row {
  border-top-color: rgba(255, 255, 255, 0.2);
}

[data-theme="red"] .timer-recent-row:last-child,
[data-theme="teal"] .timer-recent-row:last-child,
[data-theme="blue"] .timer-recent-row:last-child,
[data-theme="purple"] .timer-recent-row:last-child,
[data-theme="green"] .timer-recent-row:last-child,
[data-theme="slate"] .timer-recent-row:last-child {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

[data-theme="red"] .timer-recent-row-time,
[data-theme="teal"] .timer-recent-row-time,
[data-theme="blue"] .timer-recent-row-time,
[data-theme="purple"] .timer-recent-row-time,
[data-theme="green"] .timer-recent-row-time,
[data-theme="slate"] .timer-recent-row-time {
  color: #ffffff;
}

[data-theme="red"] .timer-recent-row-label,
[data-theme="teal"] .timer-recent-row-label,
[data-theme="blue"] .timer-recent-row-label,
[data-theme="purple"] .timer-recent-row-label,
[data-theme="green"] .timer-recent-row-label,
[data-theme="slate"] .timer-recent-row-label {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="red"] .timer-recent-row-delete,
[data-theme="teal"] .timer-recent-row-delete,
[data-theme="blue"] .timer-recent-row-delete,
[data-theme="purple"] .timer-recent-row-delete,
[data-theme="green"] .timer-recent-row-delete,
[data-theme="slate"] .timer-recent-row-delete {
  background-color: rgba(255, 255, 255, 0.15);
}

[data-theme="red"] .timer-recent-row-delete:hover,
[data-theme="teal"] .timer-recent-row-delete:hover,
[data-theme="blue"] .timer-recent-row-delete:hover,
[data-theme="purple"] .timer-recent-row-delete:hover,
[data-theme="green"] .timer-recent-row-delete:hover,
[data-theme="slate"] .timer-recent-row-delete:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

[data-theme="red"] .timer-recent-row-delete svg,
[data-theme="teal"] .timer-recent-row-delete svg,
[data-theme="blue"] .timer-recent-row-delete svg,
[data-theme="purple"] .timer-recent-row-delete svg,
[data-theme="green"] .timer-recent-row-delete svg,
[data-theme="slate"] .timer-recent-row-delete svg {
  stroke: #ffffff;
}

/* Timer page only: pull the whole column up. The shared .hero uses 15vh
   (desktop) / 18vh (mobile) of padding-top, which leaves more empty space
   than the timer picker really needs. Scope via :has() so the stopwatch
   and alarm-clock pages keep their original spacing. */
.hero:has(.timer-setup) {
  padding-top: 8vh;
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
  .hero {
    padding-top: 18vh;
  }

  /* Keep the timer page mobile spacing in line with the other tools. */
  .hero:has(.timer-setup) {
    padding-top: 18vh;
  }

  .timer-area {
    min-height: auto;
    justify-content: flex-end;
  }

  .timer-area.timer-running {
    min-height: 265px;
  }

  .timer-clock-desktop {
    display: none;
  }

  .timer-clock-mobile {
    display: flex;
  }

  .timer-label-input {
    width: 216px;
    height: 30px;
    font-size: 16px;
    padding: 0 16px;
  }

  .timer-sound-btn {
    width: 216px;
    height: 30px;
    font-size: 16px;
    padding: 0 16px;
  }

  .timer-sound-toggle {
    width: 24px;
    height: 24px;
    right: 3px;
  }

  .timer-sound-toggle-arrow {
    width: 14px;
    height: 7px;
  }

  .timer-sound-dropdown {
    width: 216px;
  }

  .timer-sound-option {
    font-size: 16px;
    padding: 5px 16px;
  }

  .timer-label-wrap {
    margin-top: 30px;
  }

  .timer-ring-container {
    width: 265px;
    height: 265px;
  }

  .timer-ring-bg {
    stroke-width: 8;
  }

  .timer-ring-progress {
    stroke-width: 8;
  }

  .timer-bell-icon {
    width: 9px;
    height: 12px;
  }

  .timer-alarm-time {
    font-size: 12px;
  }

  .timer-ring-alarm {
    margin-bottom: 4px;
  }

  .timer-countdown-time {
    font-size: 62px;
  }

  .timer-countdown-time.has-hours {
    font-size: 48px;
  }

  .timer-countdown-label {
    font-size: 14px;
    max-width: 162px;
    margin-top: 8px;
  }

  .timer-recents {
    padding: 0 35px;
  }

  .timer-recents.visible {
    display: block;
  }

  .timer-recents-title {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .timer-recents-desktop {
    display: none;
  }

  .timer-recents-mobile {
    display: block;
  }

  .site-name {
    font-size: 16px;
    letter-spacing: 1.6px;
    top: 28px;
  }

  .timer-recent-card {
    cursor: default;
  }
}
