/* Cruise calendar — /{destination}/ships
 *
 * Busyness shading is the page's one real visual idea, so it carries the colour
 * budget. Everything else stays quiet.
 *
 * The five quintile colours are a sequential ramp, not a traffic light: "Packed" is
 * a fact about crowding, not a warning, and red/green would read as good/bad. They
 * are also distinguishable in greyscale and carry a text label in the same cell, so
 * colour is never the only channel — the shading is redundant with the badge rather
 * than load-bearing on its own.
 */

.cruise-page { padding-block: 1.5rem 3rem; }

.cruise-head h1 { margin: 0 0 .5rem; }

/* The summary sentence is the page's answer. Give it room. */
.cruise-summary {
    font-size: 1.125rem;
    line-height: 1.55;
    max-width: 62ch;
    margin: 0 0 2rem;
}

.cruise-muted { color: #6b7280; }

.cruise-note {
    margin-top: .75rem;
    font-size: .875rem;
    color: #6b7280;
}

/* ---- month nav ---- */

.cruise-calendar-head {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.cruise-calendar-head h2 { margin: 0; }

.cruise-month-nav { display: flex; gap: .75rem; }
.cruise-month-nav a {
    text-decoration: none;
    padding: .35rem .7rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
    font-size: .875rem;
    white-space: nowrap;
}
.cruise-month-nav a:hover { background: #f3f4f6; }

/* ---- grid ----
 * A wide table on a phone scrolls inside its own container rather than making the
 * page scroll sideways.
 */

.cruise-calendar { overflow-x: auto; margin-bottom: 2.5rem; }

.cruise-grid {
    width: 100%;
    min-width: 40rem;
    border-collapse: collapse;
    font-size: .9375rem;
}

.cruise-grid th,
.cruise-grid td {
    text-align: left;
    padding: .5rem .75rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.cruise-grid thead th {
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4b5563;
    border-bottom-width: 2px;
}

.cruise-grid tbody th { font-weight: 600; white-space: nowrap; }

.cruise-day--none td,
.cruise-day--none th { color: #9ca3af; }

/* Sequential ramp, palest to deepest. Left border does the work so the row text
   keeps full contrast against white. */
.cruise-day { border-left: 4px solid transparent; }
.cruise-day--quiet    { border-left-color: #dbeafe; background: #f8fbff; }
.cruise-day--steady   { border-left-color: #a9c9f0; background: #f4f8fe; }
.cruise-day--busy     { border-left-color: #7ba6e0; background: #eff5fd; }
.cruise-day--verybusy { border-left-color: #4d7fc4; background: #e8f1fb; }
.cruise-day--packed   { border-left-color: #24528f; background: #dfebf8; }

.cruise-day.is-today {
    outline: 2px solid #111827;
    outline-offset: -2px;
}

.cruise-day-ships { margin: 0; padding: 0; list-style: none; }
.cruise-day-ships li { margin-bottom: .25rem; }
.cruise-day-ships li:last-child { margin-bottom: 0; }

.cruise-ship-name { font-weight: 600; }

.cruise-line,
.cruise-times,
.cruise-pax {
    color: #6b7280;
    font-size: .875rem;
    margin-left: .4rem;
}

.cruise-holiday {
    display: block;
    font-size: .75rem;
    font-weight: 400;
    color: #92400e;
}

.cruise-homeport {
    display: inline-block;
    margin-left: .4rem;
    padding: .05rem .4rem;
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 1px solid #d1d5db;
    border-radius: .25rem;
    color: #4b5563;
}

.cruise-badge {
    display: inline-block;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .8125rem;
    background: #f3f4f6;
    white-space: nowrap;
}
.cruise-badge--quiet    { background: #eff6ff; }
.cruise-badge--steady   { background: #e5effc; }
.cruise-badge--busy     { background: #dbe9fb; }
.cruise-badge--verybusy { background: #cfe0f8; color: #1e3a5f; }
.cruise-badge--packed   { background: #bcd4f2; color: #16324f; }

/* ---- upcoming list ---- */

.cruise-list { list-style: none; margin: 0; padding: 0; }

.cruise-list-day { margin-bottom: 1.5rem; }

.cruise-list-day h3 {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin: 0 0 .35rem;
    font-size: 1rem;
}

.cruise-list-day ul { margin: 0; padding-left: 1.1rem; }
.cruise-list-day li { margin-bottom: .2rem; }

/* ---- filters (revealed by JS only) ---- */

.cruise-filters {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    align-items: center;
}
.cruise-filters h2 { width: 100%; margin: 0 0 .25rem; font-size: 1rem; }
.cruise-filters select { padding: .3rem .5rem; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-color-scheme: dark) {
    .cruise-summary { color: inherit; }
    .cruise-grid th,
    .cruise-grid td { border-bottom-color: #374151; }
    .cruise-day--quiet    { background: #10192a; }
    .cruise-day--steady   { background: #132034; }
    .cruise-day--busy     { background: #16283f; }
    .cruise-day--verybusy { background: #1a304c; }
    .cruise-day--packed   { background: #1f3a5c; }
    .cruise-day.is-today  { outline-color: #e5e7eb; }
    .cruise-badge { background: #1f2937; color: #e5e7eb; }
    .cruise-month-nav a { border-color: #374151; }
    .cruise-month-nav a:hover { background: #1f2937; }
}

/* A day whose calls are all filtered out. Dimmed and labelled rather than left as an
   unexplained blank — the day still happened, it just has nothing matching the filter. */
.cruise-day.is-filtered-empty { opacity: .45; }
.cruise-list-day.is-filtered-empty { display: none; }
.cruise-day.is-filtered-empty td:last-child::after {
    content: "No matching ships";
    color: #6b7280;
    font-size: .875rem;
}
