/* ── Timer rows ── */
.timer-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    min-width: 0;
}

.timer-row.times-up {
    border-color: #d97706;
    background: #1a1400;
}

.timer-row.paused {
    border-color: #6366f1;
    background: #0f0f1f;
}

.empty-note {
    color: #555;
    text-align: center;
    padding: 1.5rem 0;
}

/* ── Row blocks (individual info segments) ── */
.block {
    white-space: nowrap;
    font-size: 0.9rem;
    color: #ccc;
}

.block.type {
    font-weight: 700;
    font-size: 1.15rem;
    color: #f0f0f0;
    min-width: 3.5rem;
}

.block.duration {
    color: #888;
}

/* Trampoline note is the main identifier for its row, so it is not muted. */
.block.note {
    color: #f0f0f0;
    font-size: 1.05rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.block.timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 1.15rem;
}

.block.timer.times-up-text {
    color: #fbbf24;
}

.block.timer.paused-text {
    color: #818cf8;
}

/* ── Spacer pushes action buttons to the right ── */
.spacer {
    flex: 1;
}

/* ── Action buttons inside rows ── */
.row-btn {
    width: auto;
    padding: 0.6rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.row-btn.close {
    background: #16a34a;
}

.row-btn.close:hover {
    background: #15803d;
}

.row-btn.confirm {
    background: #2563eb;
}

.row-btn.confirm:hover {
    background: #1d4ed8;
}

.row-btn.cancel {
    background: #2a2a2a;
}

.row-btn.cancel:hover {
    background: #333;
}

.row-btn.pause {
    background: #4f46e5;
}

.row-btn.pause:hover {
    background: #4338ca;
}

.row-btn.resume {
    background: #0e7490;
}

.row-btn.resume:hover {
    background: #0c6480;
}

.row-btn.add-time {
    background: #2a2a2a;
    color: #a3a3a3;
}

.row-btn.add-time:hover {
    background: #333;
    color: #f0f0f0;
}

.row-btn.subtract-time {
    background: #3a1f1f;
    color: #e08a8a;
}

.row-btn.subtract-time:hover {
    background: #4a2424;
    color: #f0b4b4;
}

.row-btn.swap {
    background: #2a2a2a;
    color: #a3a3a3;
}

.row-btn.swap:hover {
    background: #333;
    color: #f0f0f0;
}

.row-btn.undo {
    background: #7c2d12;
    color: #fde68a;
}

.row-btn.undo:hover {
    background: #9a3412;
}

/* ── Kebab toggle (reveals the collapsed action buttons) ── */
.row-btn.toggle {
    width: auto;
    flex-shrink: 0;
    background: #2a2a2a;
    color: #888;
    padding: 0.6rem 0.9rem;
    line-height: 1;
}

.row-btn.toggle:hover {
    background: #333;
    color: #ccc;
}

.timer-row.expanded .row-btn.toggle {
    background: #3a3a3a;
    color: #f0f0f0;
}

/* ── Collapsible action buttons ──────────────────────────
   Hidden by default; revealed once the row is expanded via the kebab.
   Close is the one exception: it also reveals itself automatically
   once the time is up (.times-up), regardless of expand state. */
.row-btn.subtract-time,
.row-btn.add-time,
.row-btn.pause,
.row-btn.resume,
.row-btn.swap,
.row-btn.close {
    display: none;
}

.timer-row.expanded .row-btn.subtract-time,
.timer-row.expanded .row-btn.add-time,
.timer-row.expanded .row-btn.pause,
.timer-row.expanded .row-btn.resume,
.timer-row.expanded .row-btn.swap,
.timer-row.expanded .row-btn.close {
    display: inline-block;
}

.timer-row.times-up .row-btn.close {
    display: inline-block;
}

.block.closing-countdown {
    color: #fbbf24;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Add timer button ── */
.add-btn {
    width: 100%;
    background: #1a1a1a;
    border: 1px dashed #333;
    border-radius: 8px;
    color: #555;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 1rem;
    margin-top: 0.25rem;
    transition: border-color 0.15s, color 0.15s;
}

.add-btn:hover {
    border-color: #555;
    color: #888;
    background: #1a1a1a;
}
