/* Focused — single-column centered layout. (Files live under the
   `timed/` folder for back-compat with old DNS / DB names; the
   user-facing brand is "Focused".) */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.timedPage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 80px;
}

.timedCard {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* --- Task label (single-session intent, not a todo) --- */
.timedTask {
    width: 100%;
    max-width: 340px;
    text-align: center;
    padding: 8px 12px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}
.timedTask:hover { border-bottom-color: var(--border); }
.timedTask:focus { border-bottom-color: var(--border-strong); }
.timedTask::placeholder { color: var(--text-tertiary); }

/* --- Timer readout --- */
.timedDisplay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.timedProgress {
    width: 100%;
    max-width: 360px;
    height: 2px;
    background: var(--bg-sidebar);
    border-radius: 1px;
    overflow: hidden;
    margin-top: 2px;
}

.timedProgressFill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.25s linear, background-color var(--transition);
}

.timedProgressFill--running {
    background: var(--mint);
}

.timedReadout {
    font-family: var(--font-mono);
    font-size: 120px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    user-select: none;
}

.timedModeLabel {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.timedModeLabel--running {
    color: var(--mint);
}

/* --- Mode toggle pills --- */
.timedModes {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.timedModeBtn {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
    position: relative;
}

.timedModeBtn:hover {
    color: var(--text);
}

.timedModeBtn--active {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.timedModeBtn--running {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.timedModeBtn--running:hover {
    color: #fff;
}

/* --- Buttons --- */
.timedControls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.timedPrimaryBtn {
    width: 180px;
    padding: 12px 20px;
    background: var(--accent);
    /* Pick the page background as the foreground so the label always
       contrasts against the accent — Ink's accent is near-white, so a
       hard-coded #fff label was invisible on it. Every theme pairs
       --accent and --bg as contrasting tokens. */
    color: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: opacity var(--transition);
}

.timedPrimaryBtn:hover {
    opacity: 0.85;
}

.timedSecondaryBtn {
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: color var(--transition);
}

.timedSecondaryBtn:hover {
    color: var(--text);
}

.timedSecondaryBtn:disabled {
    color: var(--text-tertiary);
    opacity: 0.4;
    cursor: default;
}

/* --- Settings popover --- */
.timedSettings {
    position: fixed;
    top: calc(var(--header-height) + 6px);
    right: 14px;
    width: 280px;
    padding: 16px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.04);
    z-index: 200;
    display: none;
}

.timedSettings[data-open="true"] {
    display: block;
}

.timedSettingsHead {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.timedSettingsRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.timedSettingsRow + .timedSettingsRow {
    border-top: 1px solid var(--border);
}

.timedSettingsLabel {
    font-size: 14px;
    color: var(--text);
}

.timedSettingsSub {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.timedSettingsInput {
    width: 60px;
    padding: 6px 8px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}

.timedSettingsInput:focus {
    border-color: var(--accent);
}

.timedSettingsInput:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timedSettingsSuffix {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 6px;
}

/* Small toggle switch */
.timedToggle {
    position: relative;
    width: 32px;
    height: 18px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: background var(--transition);
    flex-shrink: 0;
}
.timedToggle::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 14px;
    height: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    transition: transform var(--transition);
}
.timedToggle[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
}
.timedToggle[aria-pressed="true"]::after {
    transform: translateX(14px);
    background: #fff;
    border-color: transparent;
}

.timedSettingsReset {
    display: block;
    margin-top: 12px;
    padding: 6px 0;
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    width: 100%;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.15);
    text-underline-offset: 2px;
    transition: color var(--transition);
}
.timedSettingsReset:hover {
    color: var(--text);
}

.timedSettingsNote {
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
    min-height: 1em;
}

/* --- Daily count dots --- */
.timedCount {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.timedCountDots {
    display: flex;
    gap: 5px;
}

.timedCountDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border);
}

.timedCountDot--filled {
    background: var(--accent);
}

/* --- Shortcuts hint row --- */
.timedHints {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

.timedHint kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    margin-right: 4px;
}

/* --- Footer — same as noted/app.css .appFooter so the family feels the same. --- */
.appFooter {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
    font-size: 11px;
    color: var(--text-tertiary);
    text-align: center;
}

.appFooter a {
    color: var(--text-secondary);
}

.appFooterMeta {
    opacity: 0.75;
}

/* --- Responsive --- */
@media (max-width: 520px) {
    .timedReadout { font-size: 88px; }
    .timedCard { gap: 32px; }
    .timedHints { font-size: 11px; gap: 10px; }
}

@media (max-width: 380px) {
    .timedReadout { font-size: 72px; }
    .timedModeBtn { padding: 7px 12px; font-size: 12px; }
}
