/* ACC Carpool ride board. Everything is scoped under .acc-cp; fonts come from the theme (css/brand.css). */

.acc-cp {
    --cp-ink: #1d3447;
    --cp-green: #2f774e;
    --cp-green-text: #2f774e;
    --cp-teal: #66ccb2;
    --cp-arctic: #f0f5f7;
    --cp-card: #fff;
    --cp-line: #d5dfe5;
    --cp-muted: #5b6f7f;
    --cp-sign-bg: #fff6cc;
    --cp-sign-ink: #5c4a00;
    --cp-taken: #1d3447;
    --cp-on-taken: #fff;
    --cp-display: var(--acc-font-display, inherit);
    color: var(--cp-ink);
}

@media (prefers-color-scheme: dark) {
    #ride-board.acc-cp {
        --cp-ink: #e6eef2;
        --cp-green-text: #7fd0a2;
        --cp-arctic: #22384a;
        --cp-card: #182a38;
        --cp-line: #33495b;
        --cp-muted: #a8bac6;
        --cp-taken: #4a6a82;
        background: #10202c;
        border-radius: 16px;
        padding: 16px;
    }
}

#ride-board.acc-cp {
    /* Room for the theme's fixed header when a #ride-board link scrolls here. */
    --cp-header-offset: 96px;
    scroll-margin-top: var(--cp-header-offset);
    margin: 0 0 32px;
    font-weight: 500;
    line-height: 1.5;
}

.acc-cp .acc-cp-car { scroll-margin-top: var(--cp-header-offset, 96px); }

/* The theme's phone header (below 981px) is shorter. */
@media (max-width: 980px) {
    #ride-board.acc-cp { --cp-header-offset: 80px; }
}

/* Divi gives every list in the content bullets and padding. */
.acc-cp#ride-board ul,
.acc-cp#ride-board ol,
.acc-cp.acc-cp-summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: inherit;
}
.acc-cp#ride-board h2,
.acc-cp#ride-board h3,
.acc-cp#ride-board h4 {
    color: var(--cp-ink);
    padding: 0;
}
.acc-cp p { padding: 0; }

.acc-cp-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.acc-cp .acc-cp-icon { flex: none; vertical-align: middle; }

/* --- headline ------------------------------------------------------------- */

.acc-cp-head { margin-bottom: 16px; }
.acc-cp .acc-cp-eyebrow { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--cp-muted); }
.acc-cp#ride-board .acc-cp-headline {
    margin: 0 0 10px;
    font-family: var(--cp-display);
    font-weight: 900;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.acc-cp .acc-cp-back { font-weight: 700; color: var(--cp-green-text); }

/* --- badges and buttons --------------------------------------------------- */

.acc-cp#ride-board .acc-cp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.acc-cp .acc-cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--cp-arctic);
    color: var(--cp-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}
.acc-cp .acc-cp-badge .acc-cp-icon { display: none; width: 14px; height: 14px; }
.acc-cp .acc-cp-badge.is-sign { background: var(--cp-sign-bg); color: var(--cp-sign-ink); }
.acc-cp .acc-cp-badge.is-met { background: var(--cp-green); color: #fff; }
.acc-cp .acc-cp-badge.is-met .acc-cp-icon { display: inline; }
.acc-cp .acc-cp-badge.is-ok { background: transparent; border: 1.5px solid var(--cp-green); color: var(--cp-green-text); }

.acc-cp .acc-cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 9px 20px;
    border: 2px solid var(--cp-green);
    border-radius: 999px;
    background: var(--cp-green);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
}
.acc-cp .acc-cp-btn:hover { background: var(--cp-ink); border-color: var(--cp-ink); color: var(--cp-card); }
.acc-cp .acc-cp-btn.is-quiet { background: transparent; color: var(--cp-green-text); }
.acc-cp .acc-cp-btn.is-quiet:hover { background: var(--cp-green); border-color: var(--cp-green); color: #fff; }
.acc-cp .acc-cp-btn.is-small { padding: 5px 14px; font-size: 14px; }
.acc-cp .acc-cp-btn.is-big { padding: 13px 28px; font-size: 17px; }
.acc-cp .acc-cp-btn:focus-visible,
.acc-cp .acc-cp-seat:focus-visible,
.acc-cp a:focus-visible { outline: 3px solid var(--cp-teal); outline-offset: 2px; }

.acc-cp .acc-cp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.acc-cp .acc-cp-actions form { margin: 0; }
.acc-cp .acc-cp-next { margin: 0 0 18px; }

.acc-cp .acc-cp-alert,
.acc-cp .acc-cp-banner {
    margin: 0 0 14px;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--cp-sign-bg);
    color: var(--cp-sign-ink);
    font-weight: 700;
}

/* --- route strip ---------------------------------------------------------- */

.acc-cp-route { margin: 0 0 20px; }
.acc-cp#ride-board .acc-cp-stops {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 20px 14px;
    border-radius: 16px;
    background: var(--cp-arctic);
}
/* The line runs through the stop dots: padding 16 + tile row 30 + half the 14px dot. */
.acc-cp#ride-board .acc-cp-stops::before {
    content: '';
    position: absolute;
    top: 52px;
    left: 44px;
    right: 44px;
    height: 3px;
    border-radius: 2px;
    background: var(--cp-ink);
}
.acc-cp .acc-cp-stop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    text-align: center;
}
.acc-cp .acc-cp-stop-cars { display: flex; gap: 3px; min-height: 30px; align-items: flex-end; padding-bottom: 2px; }
.acc-cp .acc-cp-dot {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    border: 3px solid var(--cp-ink);
    border-radius: 50%;
    background: var(--cp-card);
}
.acc-cp .acc-cp-dot.is-peak { width: 28px; border: 0; background: none; color: var(--cp-green-text); }
.acc-cp .acc-cp-dot.is-peak .acc-cp-icon { width: 28px; height: 28px; margin-top: -17px; }
.acc-cp .acc-cp-stop-name { margin-top: 4px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.acc-cp .acc-cp-stop-time { font-size: 13px; color: var(--cp-muted); }
.acc-cp .acc-cp-stop-waiting { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 4px; }
.acc-cp .acc-cp-key { margin: 8px 4px 0; font-size: 13px; color: var(--cp-muted); }

.acc-cp .acc-cp-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 26px;
    height: 26px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--cp-taken);
    color: var(--cp-on-taken);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}
.acc-cp .acc-cp-tile.is-driver { background: var(--cp-green); color: #fff; }
.acc-cp .acc-cp-tile.is-waiting { background: var(--cp-card); color: var(--cp-ink); border: 1.5px solid var(--cp-ink); }
.acc-cp .acc-cp-tile .acc-cp-icon { width: 13px; height: 13px; }

@media (max-width: 600px) {
    .acc-cp#ride-board .acc-cp-stops { flex-direction: column; gap: 14px; padding: 14px 16px; }
    .acc-cp#ride-board .acc-cp-stops::before { top: 22px; bottom: 22px; left: 22.5px; right: auto; width: 3px; height: auto; }
    .acc-cp .acc-cp-stop { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; text-align: left; }
    .acc-cp .acc-cp-dot { order: -1; flex: none; }
    .acc-cp .acc-cp-dot.is-peak { width: 14px; }
    .acc-cp .acc-cp-dot.is-peak .acc-cp-icon { margin: -8px 0 0 -7px; }
    .acc-cp .acc-cp-stop-cars,
    .acc-cp .acc-cp-stop-waiting { order: 5; min-height: 0; margin: 0; padding: 0; }
    .acc-cp .acc-cp-stop-name { margin: 0; }
}

/* --- seat map ------------------------------------------------------------- */

.acc-cp .acc-cp-map { flex: none; }
.acc-cp .acc-cp-body {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    padding: 26px 12px 14px;
    border: 2px solid var(--cp-ink);
    border-radius: 30px 30px 18px 18px;
    background: var(--cp-card);
}
/* The windscreen. */
.acc-cp .acc-cp-body::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 16px;
    right: 16px;
    height: 10px;
    border-top: 2px solid var(--cp-ink);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.acc-cp .acc-cp-row { display: flex; gap: 6px; justify-content: space-between; }
.acc-cp .acc-cp-row form { display: contents; }

.acc-cp .acc-cp-seat {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9px 9px 6px 6px;
    background: var(--cp-arctic);
    color: var(--cp-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    overflow: hidden;
}
.acc-cp .acc-cp-seat.is-driver { background: var(--cp-green); color: #fff; }
.acc-cp .acc-cp-seat.is-taken { background: var(--cp-taken); color: var(--cp-on-taken); }
.acc-cp .acc-cp-seat.is-mine { background: var(--cp-teal); color: #1d3447; }
.acc-cp .acc-cp-seat.is-open {
    border: 2px dashed var(--cp-green);
    background: transparent;
    color: var(--cp-green-text);
    font-size: 20px;
}
.acc-cp button.acc-cp-seat { cursor: pointer; }
.acc-cp .acc-cp-seat.is-off { border: 2px solid var(--cp-line); background: transparent; color: var(--cp-line); font-size: 20px; }
.acc-cp .acc-cp-seat.is-locked { border: 2px dashed var(--cp-line); background: transparent; color: var(--cp-muted); opacity: .55; }
/* One leg taken: the taken half is filled, the open half stays dashed. */
.acc-cp .acc-cp-seat.is-half,
.acc-cp .acc-cp-seat.is-split { flex-direction: column; }
.acc-cp .acc-cp-seat.is-half > span,
.acc-cp .acc-cp-seat.is-split > span { display: flex; flex: 1; width: 100%; align-items: center; justify-content: center; }
.acc-cp .acc-cp-seat.is-half { border: 2px dashed var(--cp-green); background: transparent; color: var(--cp-green-text); }
.acc-cp .acc-cp-seat.is-half > span:first-child { background: var(--cp-taken); color: var(--cp-on-taken); }
.acc-cp .acc-cp-seat.is-half.is-mine > span:first-child { background: var(--cp-teal); color: #1d3447; }
.acc-cp .acc-cp-seat.is-half.is-locked { border-color: var(--cp-line); }
.acc-cp .acc-cp-seat.is-split > span + span { border-top: 1px solid var(--cp-card); }

@media (prefers-reduced-motion: no-preference) {
    .acc-cp button.acc-cp-seat.is-open,
    .acc-cp button.acc-cp-seat.is-half,
    .acc-cp button.acc-cp-seat.is-off { transition: transform .15s ease; }
    .acc-cp button.acc-cp-seat.is-open:hover,
    .acc-cp button.acc-cp-seat.is-half:hover { transform: translateY(-2px); }
    .acc-cp button.acc-cp-seat:active { transform: translateY(1px) scale(.96); }
}

/* --- car cards ------------------------------------------------------------ */

.acc-cp-cars { display: grid; gap: 14px; margin: 0 0 20px; }
.acc-cp .acc-cp-car {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    padding: 18px;
    border: 1.5px solid var(--cp-line);
    border-radius: 16px;
    background: var(--cp-card);
}
.acc-cp .acc-cp-car.is-locked { border-style: dashed; }
.acc-cp .acc-cp-car.is-yours { border-color: var(--cp-teal); border-width: 2px; }
.acc-cp#ride-board .acc-cp-car-name {
    margin: 0;
    font-family: var(--cp-display);
    font-weight: 900;
    font-size: 22px;
    line-height: 1.2;
}
.acc-cp .acc-cp-vehicle { margin: 2px 0 0; font-size: 14px; color: var(--cp-muted); }
.acc-cp .acc-cp-share { margin: 4px 0; }
.acc-cp .acc-cp-price {
    font-family: var(--cp-display);
    font-weight: 900;
    font-size: 30px;
    line-height: 1.1;
}
.acc-cp .acc-cp-price.is-unset { font-size: 20px; color: var(--cp-muted); }
.acc-cp .acc-cp-share-note { font-size: 14px; color: var(--cp-muted); }
.acc-cp .acc-cp-hint { margin: 4px 0 0; font-size: 14px; color: var(--cp-muted); }
.acc-cp .acc-cp-state { margin: 4px 0; font-weight: 700; }
.acc-cp .acc-cp-notes { margin: 4px 0; font-size: 14px; }
.acc-cp .acc-cp-phone { font-size: 14px; }
.acc-cp .acc-cp-phone a { font-weight: 700; color: var(--cp-green-text); }

.acc-cp#ride-board .acc-cp-riders { margin: 10px 0 0; border-top: 1px solid var(--cp-line); }
.acc-cp .acc-cp-riders li,
.acc-cp .acc-cp-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--cp-line);
    font-size: 15px;
}
.acc-cp .acc-cp-rider-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.acc-cp .acc-cp-sub { display: block; width: 100%; margin: 0; font-size: 14px; color: var(--cp-muted); }
.acc-cp .acc-cp-sub.is-private { color: var(--cp-sign-ink); background: var(--cp-sign-bg); padding: 4px 10px; border-radius: 8px; }

.acc-cp .acc-cp-remove summary { list-style: none; }
.acc-cp .acc-cp-remove summary::-webkit-details-marker { display: none; }
.acc-cp .acc-cp-remove[open] form { display: grid; gap: 6px; margin-top: 8px; max-width: 26rem; }
.acc-cp form:has(> .acc-cp-select) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }

.acc-cp .acc-cp-empty { margin: 0 0 20px; padding: 16px; border-radius: 16px; background: var(--cp-arctic); }

.acc-cp-list { margin: 0 0 20px; }
.acc-cp#ride-board .acc-cp-list h3 { margin: 0 0 6px; font-size: 18px; }
.acc-cp#ride-board .acc-cp-list h4 { margin: 12px 0 0; font-size: 15px; color: var(--cp-muted); }

.acc-cp .acc-cp-foot { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--cp-line); font-size: 14px; color: var(--cp-muted); }
.acc-cp .acc-cp-foot a { color: var(--cp-green-text); font-weight: 700; }

@media (max-width: 600px) {
    .acc-cp .acc-cp-car { grid-template-columns: 1fr; gap: 14px; }
    .acc-cp .acc-cp-car .acc-cp-map { justify-self: center; }
}

/* --- forms ---------------------------------------------------------------- */

.acc-cp .acc-cp-card {
    margin: 0 0 16px;
    padding: 18px;
    border: 1.5px solid var(--cp-line);
    border-radius: 16px;
    background: var(--cp-card);
    min-width: 0;
}
.acc-cp fieldset.acc-cp-card > legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; }
.acc-cp fieldset.acc-cp-card > legend + * { clear: left; }
.acc-cp .acc-cp-card-title,
.acc-cp#ride-board .acc-cp-card h3 {
    display: block;
    margin: 0;
    font-family: var(--cp-display);
    font-weight: 900;
    font-size: 22px;
    line-height: 1.2;
}

.acc-cp .acc-cp-field { margin: 12px 0 0; }
.acc-cp .acc-cp-field > label,
.acc-cp .acc-cp-toggle-group > legend,
.acc-cp .acc-cp-remove label {
    display: block;
    margin: 0 0 4px;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
}
.acc-cp input[type="text"],
.acc-cp input[type="time"],
.acc-cp input[type="number"],
.acc-cp select,
.acc-cp textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: 28rem;
    padding: 8px 12px;
    border: 1.5px solid var(--cp-line);
    border-radius: 10px;
    background: var(--cp-card);
    color: var(--cp-ink);
    font: inherit;
    font-size: 16px;
}
.acc-cp input[type="time"],
.acc-cp input[type="number"],
.acc-cp .acc-cp-select { width: auto; }
.acc-cp input:focus-visible,
.acc-cp select:focus-visible,
.acc-cp textarea:focus-visible { outline: 3px solid var(--cp-teal); outline-offset: 1px; }

/* Pill toggle groups: radio buttons, one tap per option. */
.acc-cp .acc-cp-toggle-group { margin: 12px 0 0; padding: 0; border: 0; min-width: 0; }
.acc-cp .acc-cp-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 22px;
    background: var(--cp-arctic);
}
.acc-cp .acc-cp-toggle label { position: relative; margin: 0; cursor: pointer; }
.acc-cp .acc-cp-toggle input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.acc-cp .acc-cp-toggle span {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
.acc-cp .acc-cp-toggle input:checked + span { background: var(--cp-ink); color: var(--cp-card); }
.acc-cp .acc-cp-toggle input:focus-visible + span { outline: 3px solid var(--cp-teal); outline-offset: 1px; }

.acc-cp .acc-cp-req-check { margin-top: 16px !important; }
.acc-cp .acc-cp-req-sentence { margin: 4px 0 0; font-weight: 700; }

.acc-cp .acc-cp-seat-picker { margin: 8px 0 4px; }
.acc-cp .acc-cp-seat-picker .acc-cp-sub { margin-bottom: 6px; }

/* No-JS fallbacks: the seat taps replace the number field once the script runs. */
.acc-cp .acc-cp-js-only { display: none; }
.acc-cp.has-js .acc-cp-js-only { display: block; }
.acc-cp.has-js .acc-cp-nojs-only { display: none; }

/* The driver's pledge stays Blue Slate in both colour schemes. */
.acc-cp .acc-cp-card.acc-cp-pledge { border: 0; background: #1d3447; color: #fff; }
.acc-cp#ride-board .acc-cp-pledge h3 { color: #fff; }
.acc-cp .acc-cp-pledge .acc-cp-sub { color: #c5d4dd; }
.acc-cp .acc-cp-pledge p { margin: 8px 0 0; }
.acc-cp#ride-board .acc-cp-pledge-points { display: grid; gap: 8px 24px; margin: 10px 0 16px; }
.acc-cp .acc-cp-pledge-points li { display: flex; gap: 8px; align-items: flex-start; }
.acc-cp .acc-cp-pledge-points .acc-cp-icon { color: #66ccb2; margin-top: 2px; }
@media (min-width: 601px) {
    .acc-cp#ride-board .acc-cp-pledge-points { grid-template-columns: 1fr 1fr; }
}
.acc-cp .acc-cp-pledge-sign { position: relative; display: inline-block; cursor: pointer; }
.acc-cp .acc-cp-pledge-sign input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acc-cp .acc-cp-pledge-sign > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: 2px solid #66ccb2;
    border-radius: 999px;
    background: #66ccb2;
    color: #1d3447;
    font-weight: 700;
}
.acc-cp .acc-cp-pledge-sign .acc-cp-when-on { display: none; background: transparent; color: #66ccb2; }
.acc-cp .acc-cp-pledge-sign input:checked ~ .acc-cp-when-off { display: none; }
.acc-cp .acc-cp-pledge-sign input:checked ~ .acc-cp-when-on { display: inline-flex; }
.acc-cp .acc-cp-pledge-sign input:focus-visible ~ span { outline: 3px solid #fff; outline-offset: 2px; }

.acc-cp .acc-cp-or p { margin: 0 0 8px; }
.acc-cp .acc-cp-or .acc-cp-sub { margin-top: 10px; }

/* --- sidebar summary ------------------------------------------------------ */

.acc-cp.acc-cp-summary li { margin: 0 0 4px; }
.acc-cp.acc-cp-summary .carpool-cost { display: block; font-size: 13px; color: #5b6f7f; }
.acc-cp.acc-cp-summary a { font-weight: 700; }
.acc-cp.acc-cp-summary .acc-cp-note { margin-top: 8px; font-weight: 700; }
