/* Exam Timer — page-specific layout and components */

.app {
  max-width: 1100px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.exam-timer .button-row {
  margin-bottom: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-subtle);
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  transform: scale(1.15);
  accent-color: var(--accent);
}

.checkbox-row label {
  margin: 0;
  font-weight: 600;
}

.top-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.status-box {
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px;
}

.status-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 6px;
}

.status-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-value.phase {
  font-size: 1.05rem;
  letter-spacing: normal;
  font-weight: 600;
}

.phase-line {
  margin: 8px 0 18px;
  color: var(--muted);
  font-weight: 600;
}

.exam-timer table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--bg-subtle);
}

.exam-timer thead {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

.exam-timer th,
.exam-timer td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.exam-timer tbody tr:last-child td {
  border-bottom: none;
}

.timer {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 2px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--bg-subtle);
}

.small {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.done {
  color: var(--danger);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.grid.timer-view {
  grid-template-columns: 1fr;
}

.grid.timer-view #timerPanel {
  width: 100%;
}

.grid.timer-view .top-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.timer-view .status-box {
  padding: 28px;
}

.grid.timer-view .status-label {
  font-size: 1.05rem;
}

.grid.timer-view .status-value {
  font-size: 3rem;
}

.grid.timer-view .status-value.phase {
  font-size: 1.85rem;
}

.grid.timer-view .phase-line {
  font-size: 1.08rem;
}

.grid.timer-view th,
.grid.timer-view td {
  padding: 18px 14px;
}

.grid.timer-view .timer {
  font-size: 2rem;
}

.grid.timer-view table {
  font-size: 1.05rem;
}

.reminder-30 {
  color: var(--warning);
  font-weight: 700;
}

.reminder-5 {
  color: var(--danger);
  font-weight: 700;
}

@media (max-width: 900px) {
  .grid,
  .top-status {
    grid-template-columns: 1fr;
  }
}

/* Display theme control (Exam Timer only) */

.site-header__theme {
  flex-shrink: 0;
}

.theme-segment {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(76, 29, 149, 0.05);
}

.theme-segment__btn {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.theme-segment__btn[aria-pressed="true"] {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(76, 29, 149, 0.1);
}

:root[data-theme="dark"] .theme-segment__btn[aria-pressed="true"] {
  background: var(--panel-hover);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.theme-segment__btn:hover:not([aria-pressed="true"]) {
  color: var(--text);
}

.theme-segment__btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
