/* Driver passenger manifest ("відомість"). Mobile-first: drivers open it on a phone. */

/* Minimal page: strip the site chrome that wp_footer() injects (Weglot language switcher, etc.). */
body.driver-list-page { margin: 0; background: #eef1f4; }
body.driver-list-page .country-selector,
body.driver-list-page [class*="weglot"] { display: none !important; }

#driver-list {
    max-width: 760px;
    margin: 16px auto;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #1d2733;
    font-size: 15px;
    box-sizing: border-box;
}

#driver-list .dl-msg { padding: 28px 8px; text-align: center; color: #6b7280; }

/* Refresh bars (top: status + button; bottom: button only) */
#driver-list .dl-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #eef1f4;
}
#driver-list .dl-bar-bottom {
    justify-content: center; border-bottom: none; border-top: 1px solid #eef1f4;
    margin: 16px 0 0; padding: 14px 0 0;
}
#driver-list .dl-refresh {
    padding: 9px 18px; border: 0; border-radius: 8px; background: #0b66c3; color: #fff; font-size: 15px; cursor: pointer;
}
#driver-list .dl-refresh:disabled { opacity: .6; cursor: default; }
#driver-list #dl-status { color: #94a3b8; font-size: 12px; }

/* Header — clear trip info, like the printed manifest */
#driver-list .dl-head { margin-bottom: 12px; }
#driver-list .dl-head h2 { font-size: 19px; margin: 0 0 8px; }
#driver-list .dl-info { display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: #334155; }
#driver-list .dl-info b { color: #0f172a; font-weight: 600; }
#driver-list .dl-gid { word-break: break-all; }   /* same size/colour as the rest of .dl-info */

/* Passenger cards — ONE per row on phones; two only on wide screens */
#driver-list .dl-list { display: block; }
@media (min-width: 700px) {
    #driver-list .dl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
}
#driver-list .dl-card { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-top: 1px solid #eef1f4; }
#driver-list .dl-seat {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; background: #0b66c3; color: #fff; font-weight: 700;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
#driver-list .dl-body { flex: 1 1 auto; min-width: 0; }
#driver-list .dl-name { font-weight: 600; }
#driver-list .dl-route { color: #475569; font-size: 14px; margin-top: 2px; }
#driver-list .dl-phone { display: inline-block; color: #0b66c3; text-decoration: none; font-size: 14px; margin-top: 2px; }
#driver-list .dl-ticket { color: #64748b; font-size: 13px; margin-top: 2px; }
#driver-list .dl-buy { color: #94a3b8; font-size: 12px; margin-top: 2px; }
#driver-list .dl-free { font-size: 14px; color: #334155; line-height: 1.7; }

/* Controls row: sort + status filter + station filter.
   flex:1 equal thirds -> width is layout-driven, not text-driven, so labels never make a button jump.
   wrap on narrow phones; capped on desktop so they don't stretch the full card width. */
#driver-list .dl-sortbar { margin: 0 0 8px; display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
#driver-list .dl-ctl {
    flex: 1 1 150px; text-align: center;
    border: 1px solid #cbd5e1; background: #fff; color: #334155;
    border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
#driver-list .dl-ctl.is-on { background: #0b66c3; color: #fff; border-color: #0b66c3; }
@media (min-width: 700px) { #driver-list .dl-ctl { max-width: 240px; } }

/* Attendance (v1, local): tap a card -> whole card tinted + seat badge coloured */
#driver-list .dl-card[data-ticket] { cursor: pointer; }
#driver-list .dl-card.dl-att-go { background: #bbf7d0; }
#driver-list .dl-card.dl-att-no { background: #fecaca; }
#driver-list .dl-card.dl-att-go .dl-seat { background: #16a34a; }
#driver-list .dl-card.dl-att-no .dl-seat { background: #dc2626; }
#driver-list .dl-card.dl-att-no .dl-name { text-decoration: line-through; color: #b91c1c; }

/* Stops — fixed-layout table so the name column is capped (%) and посадка/висадка always fit */
#driver-list .dl-section { font-weight: 700; margin: 18px 0 8px; }
#driver-list .dl-stations { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
#driver-list .dl-stations th,
#driver-list .dl-stations td { padding: 6px 6px; border-bottom: 1px solid #eef1f4; text-align: center; vertical-align: top; }
#driver-list .dl-stations th { background: #f1f5f9; color: #475569; font-weight: 600; }
#driver-list .dl-stations th:first-child { width: 42%; text-align: left; }
#driver-list .dl-stations .dl-st-name { text-align: left; white-space: normal; word-break: break-word; }

/* ===== STATION FILTER (delete this block together with the JS feature) ===== */
#driver-list .dl-filter {
    margin: 12px 0; padding: 10px 12px; background: #dbeafe; border: 1px solid #93c5fd; border-radius: 8px;
    font-size: 14px; color: #1e3a8a; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
#driver-list .dl-clearfilter {
    margin-left: auto; border: 0; background: #0b66c3; color: #fff; border-radius: 6px;
    padding: 7px 12px; font-size: 14px; cursor: pointer;
}
#driver-list .dl-hint { font-weight: 400; font-size: 12px; color: #94a3b8; }
#driver-list .dl-strow { cursor: pointer; }
#driver-list .dl-strow .dl-st-name { color: #0b66c3; text-decoration: underline; }
#driver-list .dl-strow.is-active { background: #dbeafe; }
/* ===== /STATION FILTER ===== */
