/* Trip module — passenger-facing pickup "boarding pass". Prefix mw-tp-*.
   Theme-aware via --mud-palette-*; the stub tear-off uses the app primary so it
   fits the account page and adapts to light/dark automatically. */

/* ── Boarding pass shell ───────────────────────────────────────────── */
/* NOTE: Stub-left / details-right on wide screens; stacks (stub on top) on
   narrow screens — see the mobile block at the end. */
.mw-tp-pass {
    display: flex;
    overflow: hidden;
}

/* ── Tear-off stub (carries the time) ──────────────────────────────── */
.mw-tp-stub {
    flex: none;
    width: 140px;
    padding: 18px 16px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

/* perforation punched between stub and details */
.mw-tp-stub::after {
    content: "";
    position: absolute;
    right: -9px;
    top: 0;
    bottom: 0;
    width: 18px;
    background: radial-gradient(circle at left, transparent 0 8px, var(--mud-palette-surface) 8px);
    background-size: 18px 18px;
    background-repeat: repeat-y;
    z-index: 1;
}

.mw-tp-tiny {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.72;
    font-weight: 600;
}

.mw-tp-day {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.92;
    margin-top: 2px;
}

.mw-tp-time {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* seat: "SEAT" label on the left edge, pun stacked one word per line on the right edge */
.mw-tp-board {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 7px;
    font-family: monospace;
    font-size: 0.68rem;
    opacity: 0.78;
    letter-spacing: 0.04em;
    margin-top: 6px;
}

.mw-tp-board-label {
    font-weight: 700;
    flex: none;
}

.mw-tp-board-seat {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: right;
}

/* ── Details half ──────────────────────────────────────────────────── */
.mw-tp-main {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
}

.mw-tp-route {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
    color: var(--mud-palette-text-primary);
}

.mw-tp-route-arrow {
    color: var(--mud-palette-primary);
    font-weight: 700;
}

.mw-tp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}

.mw-tp-cell-label {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.mw-tp-cell-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--mud-palette-text-primary);
}

.mw-tp-muted {
    color: var(--mud-palette-text-secondary);
}

/* ── License-plate token (details half) ────────────────────────────── */
.mw-tp-plate {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.72rem;
    border: 1.5px solid var(--mud-palette-text-primary);
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.04em;
    color: var(--mud-palette-text-primary);
}

/* ── Mobile: stack the stub above the details ──────────────────────── */
@media (max-width: 640px) {
    .mw-tp-pass {
        flex-direction: column;
    }

    .mw-tp-stub {
        width: auto;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    /* perforation moves to the bottom edge when stacked */
    .mw-tp-stub::after {
        right: 0;
        left: 0;
        top: auto;
        bottom: -9px;
        width: auto;
        height: 18px;
        background: radial-gradient(circle at top, transparent 0 8px, var(--mud-palette-surface) 8px);
        background-size: 18px 18px;
        background-repeat: repeat-x;
    }
}

@media (max-width: 420px) {
    .mw-tp-grid {
        grid-template-columns: 1fr;
    }
}
