/* MailPac shipping schedule page (app/Views/front_end/express_schedule.php). Loaded after
   site.css, which holds the tokens, bands, buttons and the base .mp-table; everything here is
   prefixed mp-sched- so it cannot clash with shared classes. */

.mp-sched-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------- page header: optional admin image */
.mp-sched-head {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
}
.mp-sched-head__media {
    padding: 18px;
    border-radius: var(--mp-radius-lg);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.mp-sched-head__media img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    border-radius: var(--mp-radius);
}
.mp-sched-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.mp-sched-jump .mp-btn { max-width: 100%; min-height: 40px; padding: 8px 18px; font-size: 14px; white-space: normal; }
/* these labels can come from the admin, so let them wrap instead of overflowing */
.mp-pinkband__actions .mp-btn { max-width: 100%; white-space: normal; text-align: center; }
.mp-sched-jump svg { width: 16px; height: 16px; transform: rotate(90deg); }

/* ---------------------------------------------------------------- flight table */
.mp-sched-wrap { box-shadow: var(--mp-shadow); border-color: transparent; }
.mp-sched-table th[scope="col"] { padding-top: 16px; padding-bottom: 16px; }
.mp-sched-th { display: inline-flex; align-items: center; gap: 8px; min-height: 18px; vertical-align: middle; }
.mp-sched-th svg { flex: none; width: 18px; height: 18px; color: var(--mp-pink); }
.mp-sched-table tbody th {
    padding: 16px 18px;
    border-top: 1px solid var(--mp-line);
    background: var(--mp-white);
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    white-space: normal;
    color: var(--mp-blue);
}
.mp-sched-table tbody tr:hover th { background: var(--mp-sky-2); }
.mp-sched-table td { padding-top: 16px; padding-bottom: 16px; }
.mp-sched-flight { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.mp-sched-flight svg {
    flex: none;
    width: 34px;
    height: 34px;
    padding: 7px;
    border-radius: 50%;
    background: var(--mp-pink-50);
    color: var(--mp-pink);
}
.mp-sched-none { color: var(--mp-muted); }

/* ---------------------------------------------------------------- empty states */
.mp-sched-empty {
    max-width: 620px;
    margin: 0 auto;
    padding: 40px 32px;
    border-radius: var(--mp-radius);
    border: 2px dashed #C9D3EA;
    background: var(--mp-white);
    text-align: center;
}
.mp-sched-empty__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: var(--mp-sky);
    color: var(--mp-blue);
}
.mp-sched-empty__icon svg { width: 30px; height: 30px; }
.mp-sched-empty h3 { font-size: 20px; font-weight: 600; color: var(--mp-blue); }
.mp-sched-empty p { margin-top: 8px; color: var(--mp-muted); }
.mp-sched-empty .mp-btn { margin-top: 22px; }

/* ---------------------------------------------------------------- operating days */
.mp-sched-place {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 10px;
    margin: -20px auto 28px;
    padding: 8px 18px 8px 10px;
    border-radius: 999px;
    background: var(--mp-white);
    border: 1px solid var(--mp-line);
    font-weight: 600;
    color: var(--mp-blue);
}
.mp-sched-place svg {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 50%;
    background: var(--mp-sky);
}
.mp-sched-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.mp-sched-day {
    position: relative;
    padding: 20px 12px 18px;
    border-radius: 16px;
    border: 2px solid transparent;
    background: var(--mp-white);
    box-shadow: 0 6px 18px rgba(12, 62, 157, 0.06);
    text-align: center;
    overflow-wrap: anywhere;
}
.mp-sched-day dt { font-weight: 600; color: var(--mp-blue); }
.mp-sched-day dd { margin: 6px 0 0; font-size: 15px; color: var(--mp-ink); }
.mp-sched-day--weekend dd { font-weight: 600; color: var(--mp-pink-600); }
.mp-sched-day.is-today { border-color: var(--mp-pink); }
.mp-sched-day__today {
    display: block;
    width: fit-content;
    margin: 6px auto 0;
    padding: 1px 10px;
    border-radius: 999px;
    background: var(--mp-pink);
    color: var(--mp-white);
    font-size: 12px;
    font-weight: 600;
}
.mp-sched-day__today[hidden] { display: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .mp-sched-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
    .mp-sched-head { grid-template-columns: 1fr; gap: 32px; }
    .mp-sched-head__media { max-width: 520px; }

    /* The flight table becomes one card per flight; the ARIA roles in the markup keep it a
       table for screen readers after the display change. */
    .mp-sched-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .mp-sched-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
    .mp-sched-table,
    .mp-sched-table tbody,
    .mp-sched-table tr,
    .mp-sched-table tbody th,
    .mp-sched-table td { display: block; }
    .mp-sched-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .mp-sched-table tr {
        overflow: hidden;
        border-radius: var(--mp-radius);
        border: 1px solid var(--mp-line);
        background: var(--mp-white);
        box-shadow: 0 6px 18px rgba(12, 62, 157, 0.06);
    }
    .mp-sched-table tbody th { border-top: 0; background: var(--mp-sky); }
    .mp-sched-table td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 18px;
        text-align: right;
    }
    .mp-sched-table td::before {
        content: attr(data-label);
        content: attr(data-label) / "";
        flex: none;
        font-size: 14px;
        font-weight: 600;
        color: var(--mp-muted);
        text-align: left;
    }
    .mp-sched-table tbody tr:hover td { background: transparent; }
    .mp-sched-table tbody tr:hover th { background: var(--mp-sky); }
}

@media (max-width: 600px) {
    .mp-sched-table tbody { grid-template-columns: 1fr; }
    .mp-sched-days { grid-template-columns: 1fr; gap: 10px; }
    .mp-sched-day {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 4px 16px;
        padding: 14px 18px;
        text-align: left;
    }
    .mp-sched-day dt { display: flex; align-items: center; gap: 8px; }
    .mp-sched-day dd { margin: 0; text-align: right; }
    .mp-sched-day__today { margin: 0; }
    .mp-sched-place { margin-top: -16px; }
    .mp-sched-empty { padding: 32px 20px; }
}
