/* ── In/Out vehicle summary bar ── */
.vehicle-summary {
    display: flex;
    border: 2px solid #000;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.summary-half {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.7rem 1rem;
    min-width: 0;
}

.summary-half.in {
    flex: 6;
    background: #1a1a1a;
}

.summary-half.out {
    flex: 4;
    background: #0a0a0a;
    border-left: 2px solid #000;
}

.summary-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.summary-half.in .summary-title  { color: #ccc; }
.summary-half.out .summary-title { color: #6b9e6b; }

.summary-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Count shown as a filled pill so it can't be mistaken for a unit number. */
.summary-count {
    font-weight: 700;
    min-width: 1.6em;
    text-align: center;
    padding: 0.1em 0.45em;
    border-radius: 4px;
}

.summary-half.in .summary-chip  { font-size: 1.2rem; color: #f0f0f0; }
.summary-half.in .summary-count { background: #f0f0f0; color: #1a1a1a; }

.summary-half.out .summary-chip  { font-size: 1rem; color: #999; }
.summary-half.out .summary-count { background: #2a2a2a; color: #ccc; }

.summary-empty {
    color: #555;
    font-size: 1.1rem;
}

/* ── Rental rows ── */
.rental-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;
}

.rental-row.outside {
    background: #111111;
    border-color: #1e1e1e;
}

.rental-row.overdue {
    border-color: #dc2626;
    background: #1f0f0f;
}

.rental-row.bring-in {
    border-color: #d97706;
    background: #1a1400;
}

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

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

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

.block.duration {
    color: #888;
}

.block.note {
    color: #666;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.out-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    background: #1a2a1a;
    color: #6b9e6b;
    flex-shrink: 0;
}

.wheelies-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    background: #2a1f0a;
    color: #d97706;
    flex-shrink: 0;
}

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

.block.timer.overdue-text {
    color: #f87171;
}

.block.timer.bring-in-text {
    color: #fbbf24;
}

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

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

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

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

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

.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.cancel-request {
    background: #3a1f1f;
    color: #e08a8a;
}

.row-btn.cancel-request:hover {
    background: #4a2424;
    color: #f0b4b4;
}

.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.wheelies-toggle {
    background: #2a1f0a;
    color: #d97706;
}

.row-btn.wheelies-toggle:hover {
    background: #3a2a0d;
    color: #f0a93f;
}

.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.4rem 0.7rem;
    line-height: 1;
}

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

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

/* ── Collapsible action buttons ──────────────────────────
   Hidden by default to reduce clutter (especially on phones).
   Revealed once the row is expanded via the kebab toggle.
   Close is the one exception: it also reveals itself automatically
   once the timer has run out (.overdue / .bring-in), regardless of
   expand state, since that's the action needed most urgently then. */
.row-btn.subtract-time,
.row-btn.add-time,
.row-btn.pause,
.row-btn.resume,
.row-btn.wheelies-toggle,
.row-btn.swap,
.row-btn.close {
    display: none;
}

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

.rental-row.overdue .row-btn.close,
.rental-row.bring-in .row-btn.close {
    display: inline-block;
}

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

/* ── Create row inputs ── */
.create-row select,
.create-row input[type="text"] {
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 6px;
    color: #f0f0f0;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    outline: none;
}

.create-row select:focus,
.create-row input[type="text"]:focus {
    border-color: #555;
}

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

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