/* =========================================================
   RideMonkey Service History — Page Styling
   ========================================================= */

.rm-service-history {
    width: 100%;
}

.rm-service-history .rm-page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}


/* ---------------------------------------------------------
   Section labels — distinguish reminders from actual logs
   --------------------------------------------------------- */

.rm-service-section-label {
    display: block;
    margin: 2px 0 -8px;

    color: #666666;

    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}


/* ---------------------------------------------------------
   Service schedule status summary

   Off-white tint (matching card header colour elsewhere)
   rather than plain white, so this reads as visually
   distinct from the white service log cards below it.
   --------------------------------------------------------- */

.rm-service-schedule-empty {
    padding: 16px 18px;

    background: #faf9f6;

    border: 1px solid #dddddd;
    border-radius: 14px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);

    color: #666666;

    font-size: 14px;
}

.rm-service-schedule-empty a {
    color: #ff4b00;
}

.rm-service-schedule-summary {
    width: 100%;
    padding: 4px 0;

    background: #faf9f6;

    border: 1px solid #dddddd;
    border-radius: 14px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);

    overflow: hidden;
}

.rm-service-schedule-status-row {
    display: flex;

    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 12px 18px;

    border-bottom: 1px solid #f0f0f0;
}

.rm-service-schedule-status-row:last-child {
    border-bottom: none;
}

.rm-service-schedule-status-type {
    color: #222222;

    font-size: 14px;
    font-weight: 600;
}

.rm-service-schedule-status-icon {
    margin-right: 6px;
}

.rm-service-schedule-status-value {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.rm-status-ok .rm-service-schedule-status-value {
    color: #1a7f37;
}

.rm-status-due_soon .rm-service-schedule-status-value {
    color: #c07a00;
}

.rm-status-overdue .rm-service-schedule-status-value {
    color: #c0392b;
}

.rm-status-never_logged .rm-service-schedule-status-value {
    color: #666666;
}


/* ---------------------------------------------------------
   Service list wrapper

   Same reasoning as garage's .rm-bike-list — this sits as
   a single child of .rm-page-grid, so it needs its own gap
   rather than relying on the grid's.
   --------------------------------------------------------- */

.rm-service-list {
    display: flex;
    flex-direction: column;

    gap: 14px;
}


/* ---------------------------------------------------------
   Service card

   Whole card is the link (unlike the bike card's
   header-only link), since every part of it leads to the
   same service detail page.
   --------------------------------------------------------- */

.rm-service-card {
    display: block;
    width: 100%;

    background: #ffffff;

    border: 1px solid #dddddd;
    border-radius: 14px;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);

    overflow: hidden;

    color: inherit;
    text-decoration: none;

    transition: border-color 0.15s ease;
}

.rm-service-card:hover,
.rm-service-card:focus {
    border-color: #ff4b00;
}

.rm-service-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 12px 18px 10px;

    background: #faf9f6;

    border-bottom: 2px solid #ff4b00;

    color: #222222;

    font-size: 16px;
    font-weight: 700;
}

.rm-service-card-header .rm-card-arrow {
    color: #ff4b00;

    font-size: 18px;
    font-weight: 700;
}

.rm-service-card-meta {
    display: flex;

    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 8px;

    padding: 10px 18px;
}

.rm-service-card-date,
.rm-service-card-mileage {
    color: #666666;

    font-size: 13px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   Empty state
   --------------------------------------------------------- */

.rm-service-history-empty-message {
    margin: 0;
    padding: 4px 2px;

    color: #666666;

    font-size: 15px;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {

    .rm-service-history .rm-page-grid {
        gap: 14px;
    }

    .rm-service-list {
        gap: 10px;
    }

    .rm-service-card-header {
        padding: 10px 16px 8px;

        font-size: 14px;
    }

    .rm-service-card-meta {
        padding: 8px 16px;
    }

    .rm-service-card-date,
    .rm-service-card-mileage {
        font-size: 12px;
    }

}