/* Ritten page – dashboard style */

/* =======================
   HEADER CARD + TOP STATS
   ======================= */

.rides-header-card {
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(0, 48, 130, 0.06), #ffffff 60%);
    border: 1px solid var(--border);
}

.rides-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rides-header-title h2 {
    margin: 6px 0 0;
    font-size: 1.2rem;
}

/* Badge re-used here */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.badge-soft {
    background: rgba(0, 48, 130, 0.06);
    color: var(--brand-blue);
}

/* Stats chips */

.rides-header-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-chip {
    background: rgba(0, 48, 130, 0.04);
    border-radius: 999px;
    padding: 6px 10px;
    display: inline-flex;
    flex-direction: column;
    min-width: 90px;
}

.stat-chip-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.stat-chip-value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ====================
   FILTER FORM & CONTROLS
   ==================== */

.filter-form {
    margin-top: 8px; /* tighter */
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* smaller gap */
    align-items: center;
}

.filter-group {
    min-width: 160px;
    flex: 1 1 160px;
    margin-bottom: 0; /* remove extra vertical space */
}

.filter-group label {
    display: block;
    margin-bottom: 2px; /* tighter label spacing */
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: 6px; /* smaller gap */
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
}

.btn-reset {
    background: #ffffff;
    color: var(--brand-blue);
    border-color: var(--border);
}

/* Active filters text */

.filter-active {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    margin-left: 6px;
    font-size: 0.8rem;
}

/* ==================
   RITTEN LISTING CARD
   ================== */

.rides-list-card {
    padding-top: 18px;
}

.card-month {
    margin-top: 12px;
}

.card-month .month-heading {
    margin: 0 0 4px;
    font-size: 1rem;
}

.card-month .month-heading a {
    color: var(--text);
    text-decoration: none;
}

.card-month .month-heading a:hover {
    text-decoration: underline;
}

/* Empty state */

.empty-state {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ==========================
   FILTER PILL / RADIO STYLES
   ========================== */

/* Slightly smaller pills than the Nieuwe rit page */

.filter-radio-group .radio-item {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Neutral “all” style (not used now but left for safety) */

.radio-item.filter-all {
    background: rgba(148, 163, 184, 0.18);
    color: #111;
}

.radio-item.filter-all:has(input[type="radio"]:checked) {
    background: rgba(0, 48, 130, 0.16);
    color: var(--brand-blue);
    font-weight: 700;
}

/* Ensure radio groups wrap nicely inside filter rows */

.filter-group .radio-group {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Slightly smaller cards spacing */

.rides-header-card .radio-group {
    margin-bottom: 0;
}

/* =================
   INLINE TITLE STYLE
   ================= */

.rides-header-title-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rides-header-title-inline .badge {
    flex-shrink: 0;
}

.rides-header-title-inline h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* ===========================
   MOBILE MEDIA QUERIES
   =========================== */

@media (max-width: 700px) {
    .rides-header-top {
        align-items: flex-start;
    }

    .rides-header-title h2 {
        font-size: 1.1rem;
    }

    /* Disable horizontal flex layout for filters on mobile:
       stack everything with minimal gaps */
    .filter-row {
        display: block; /* no flex on mobile */
        gap: 0;
    }

    .filter-group {
        width: 100%;
        margin-bottom: 4px; /* small space between sections */
    }

    .filter-actions {
        justify-content: flex-start;
        margin-top: 4px;
    }

    .btn-primary,
    .btn-secondary {
        width: auto;
    }

    /* On small screens, make pills easier to tap */
    .filter-radio-group .radio-item {
        padding: 9px 18px;
        font-size: 0.9rem;
    }

    /* Keep filter and reset buttons side by side on mobile */
    .filter-actions {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
    }

    .filter-actions .btn-primary,
    .filter-actions .btn-secondary {
        flex: 1 1 auto;
        width: auto;
    }
}

@media (max-width: 480px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* =============================
   NEW RIDE LIST CARD STYLE (v2)
   ============================= */

.rides-day-block {
    margin-bottom: 24px;
}

.day-heading {
    margin: 0 0 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-blue);
    text-transform: capitalize;
}

.rides-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main card */
.ride-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ride-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Left info section */
.ride-card-left {
    flex: 1;
    display: flex;
   
    gap: 6px;
    min-width: 0;
}

.ride-info-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ride-description {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.85;
    line-height: 1.3;
}

/* Right side */
.ride-card-right {
    flex-shrink: 0;
    margin-left: 12px;
}

.km-pill {
    background: rgba(0, 48, 130, 0.08);
    color: var(--brand-blue);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Responsive: stack layout on mobile */
@media (max-width: 700px) {
    .ride-card {
        align-items: flex-start;
        padding: 12px 14px;
    }

    .ride-card-right {
        margin: 8px 0 0;
        flex-direction: column;
        margin-left: 5px;
    }

    .km-pill {
        align-self: flex-start;
    }

    .ride-description {
        font-size: 0.95rem;
    }
}

/* ==========================
   RIDE DETAILS MODAL
   ========================== */

.ride-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.ride-modal-backdrop.is-visible {
    display: flex;
}

.ride-modal {
    background: #ffffff;
    border-radius: 18px;
    max-width: 420px;
    width: 100%;
    margin: 0 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.3);
    padding: 18px 18px 16px;
}

.ride-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ride-modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.ride-modal-close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}

.ride-modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.ride-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ride-modal-table th {
    text-align: left;
    padding: 4px 6px 4px 0;
    white-space: nowrap;
    color: var(--muted);
    font-weight: 500;
}

.ride-modal-table td {
    padding: 4px 0;
}

.ride-modal-footer {
    margin-top: 12px;
    text-align: right;
}

.no-scroll-modal {
    overflow: hidden;
}

/* Make ride cards clearly clickable */
.ride-card {
    cursor: pointer;
}

/* Price pill next to km */
.ride-card-right {
    display: flex;

    align-items: flex-end;
    gap: 4px;
}

.price-pill {
    background: #ffefb9;
    color: #ffbb00;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .ride-card-right {
        align-items: flex-start;
    }

    .ride-card-left {
         flex-direction: column;
    }
}
