/* A handful of component classes and animations that are clearer here than
   as repeated Tailwind utility strings in JS template literals. */

.preset-btn {
  border-radius: 9999px;
  border: 1px solid rgb(51 65 85);
  padding: 0.125rem 0.625rem;
  color: rgb(203 213 225);
  transition: border-color 150ms ease, color 150ms ease;
}
.preset-btn:hover {
  border-color: rgb(14 165 233);
  color: rgb(125 211 252);
}

.timer-btn {
  border-radius: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.timer-btn:focus-visible {
  outline: 2px solid rgb(56 189 248);
  outline-offset: 2px;
}

.timer-btn-primary {
  background-color: rgb(14 165 233);
  color: rgb(2 6 23);
}
.timer-btn-primary:hover {
  background-color: rgb(56 189 248);
}

.timer-btn-ghost {
  border: 1px solid rgb(51 65 85);
  color: rgb(203 213 225);
}
.timer-btn-ghost:hover {
  border-color: rgb(100 116 139);
  color: rgb(241 245 249);
}

.timer-card-alerting {
  animation: timer-pulse 1.1s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
}

.toast {
  animation: toast-in 200ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-card-alerting,
  .toast {
    animation: none;
  }
}

/* Segmented duration field --------------------------------------------- */

.time-digit {
  appearance: none;
  border: 0;
  border-radius: 0.5rem;
  background-color: transparent;
  padding: 0.125rem 0.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: rgb(248 250 252);
  caret-color: rgb(56 189 248);
  transition: background-color 150ms ease, box-shadow 150ms ease;
}
.time-digit:hover {
  background-color: rgb(30 41 59 / 0.6);
}
.time-digit:focus {
  outline: none;
  background-color: rgb(30 41 59 / 0.9);
  box-shadow: inset 0 -2px 0 0 rgb(14 165 233);
}
.time-digit::selection {
  background-color: rgb(14 165 233 / 0.35);
}

/* The label is deliberately quiet: it is metadata, not the main input. */
.name-input {
  border: 0;
  border-bottom: 1px solid rgb(51 65 85);
  background-color: transparent;
  padding: 0.375rem 0.25rem;
  color: rgb(226 232 240);
  transition: border-color 150ms ease;
}
.name-input::placeholder {
  color: rgb(100 116 139);
}
.name-input:focus {
  outline: none;
  border-bottom-color: rgb(14 165 233);
}

.kbd {
  border-radius: 0.25rem;
  border: 1px solid rgb(51 65 85);
  padding: 0 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6875rem;
  color: rgb(148 163 184);
}
