/* BorderPark Details — bpd-* */

.bp-page--details {
    --bpd-navy: #0e2740;
    --bpd-ink: #132536;
    --bpd-muted: #5d6b78;
    --bpd-line: rgba(14, 39, 64, 0.1);
    --bpd-panel: #ffffff;
    --bpd-soft: #f3f7fb;
    --bpd-accent: #1d6b4f;
}

.bpd-wrap {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.bpd-hero {
    position: relative;
    padding: 2.4rem 0 2rem;
    background:
        radial-gradient(ellipse 70% 55% at 0% 0%, rgba(29, 107, 79, 0.2), transparent 55%),
        linear-gradient(155deg, #0b1f33 0%, #143652 50%, #0e2740 100%);
    color: #eef5fb;
    overflow: hidden;
}

.bpd-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
}

.bpd-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    color: #b7f5cb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.bpd-back:hover {
    color: #fff;
}

.bpd-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(142, 240, 176, 0.14);
    border: 1px solid rgba(142, 240, 176, 0.28);
    color: #b7f5cb;
    font-size: 0.82rem;
    font-weight: 700;
}

.bpd-hero__title-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.bpd-flag {
    flex: 0 0 auto;
    width: 4rem;
    height: 4rem;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
    background: rgba(255, 255, 255, 0.12);
}

.bpd-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bpd-hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.4;
}

.bpd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin: 0.65rem 0 0;
    color: #c5d4e4;
}

.bpd-code {
    padding: 0.15rem 0.45rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.bpd-updated {
    margin: 0.75rem 0 0;
    color: #a9bdd0;
    font-size: 0.9rem;
}

.bpd-updated strong {
    color: #fff;
    font-weight: 700;
}

.bpd-hero__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.bpd-stat {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bpd-stat__label {
    display: block;
    color: #a9bdd0;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.bpd-stat__value {
    display: block;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.bpd-section {
    padding: 2.25rem 0 3.5rem;
    background: linear-gradient(180deg, #eef3f8 0%, #f3f7fb 45%, #e8eef5 100%);
}

.bpd-block-head {
    margin: 2rem 0 1rem;
}

.bpd-block-head__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.bpd-block-head:first-child {
    margin-top: 0;
}

.bpd-ops-open {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(29, 107, 79, 0.3);
    background: #ecfdf5;
    color: var(--bpd-accent);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.bpd-ops-open:hover {
    background: #d1fae5;
    border-color: rgba(29, 107, 79, 0.45);
    color: #145a41;
}

.bpd-block-title {
    margin: 0;
    color: var(--bpd-navy);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 800;
}

.bpd-block-head p {
    margin: 0.45rem 0 0;
    color: var(--bpd-muted);
    line-height: 1.75;
}

.bpd-alert {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.bpd-alert--info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a8a;
}

.bpd-alert p {
    margin: 0.25rem 0 0;
    line-height: 1.7;
}

.bpd-link {
    display: inline-block;
    margin-top: 0.55rem;
    color: inherit;
    font-weight: 700;
}

.bpd-notices {
    margin-bottom: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.bpd-notice-list {
    margin: 0.65rem 0 0;
    padding-inline-start: 1.2rem;
    color: #92400e;
    line-height: 1.8;
}

.bpd-table-wrap,
.bpd-called-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    background: var(--bpd-panel);
    border: 1px solid var(--bpd-line);
    box-shadow: 0 10px 28px rgba(14, 39, 64, 0.05);
}

.bpd-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.bpd-table th,
.bpd-table td {
    padding: 0.85rem 0.9rem;
    text-align: right;
    border-bottom: 1px solid var(--bpd-line);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
    white-space: nowrap;
}

.bpd-table thead th {
    background: #e8eef5;
    color: var(--bpd-navy);
    font-size: 0.82rem;
    font-weight: 800;
}

.bpd-table tbody th {
    color: var(--bpd-ink);
    font-weight: 700;
}

.bpd-table tbody tr:last-child th,
.bpd-table tbody tr:last-child td {
    border-bottom: 0;
}

.bpd-table tbody tr:hover td,
.bpd-table tbody tr:hover th {
    background: rgba(29, 107, 79, 0.04);
}

.bpd-table code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
    color: var(--bpd-accent);
    white-space: nowrap;
}

.bpd-plate {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    direction: ltr !important;
    unicode-bidi: isolate;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.bpd-plate__main,
.bpd-plate__city {
    direction: ltr;
    unicode-bidi: bidi-override;
}

.bpd-plate__city {
    padding-inline-start: 0.35rem;
    border-inline-start: 1px solid rgba(14, 39, 64, 0.22);
}

.bpd-dt {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    line-height: 1.25;
}

.bpd-dt__date {
    color: var(--bpd-ink);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.bpd-dt__time {
    color: var(--bpd-muted);
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
}

.bpd-dt__time:empty {
    display: none;
}

.bpd-updated .bpd-dt {
    display: inline-flex;
    margin-inline-start: 0.35rem;
    vertical-align: middle;
}

.bpd-eq {
    color: var(--bpd-muted);
    margin-inline-end: 0.25rem;
    font-weight: 600;
}

.bpd-tir-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.bpd-tir {
    padding: 1.05rem 1.1rem;
    border-radius: 16px;
    background: var(--bpd-panel);
    border: 1px solid var(--bpd-line);
    box-shadow: 0 8px 22px rgba(14, 39, 64, 0.05);
}

.bpd-tir h3 {
    margin: 0;
    color: var(--bpd-navy);
    font-size: 1.05rem;
    font-weight: 800;
}

.bpd-tir__cap {
    margin: 0.45rem 0 0;
    color: var(--bpd-muted);
    font-size: 0.9rem;
}

.bpd-tir__cap strong {
    color: var(--bpd-navy);
}

.bpd-tir__access {
    margin: 0.55rem 0 0;
    color: #334155;
    font-size: 0.86rem;
    line-height: 1.7;
}

.bpd-tir__addr {
    margin: 0.55rem 0 0;
    color: var(--bpd-muted);
    font-size: 0.86rem;
    line-height: 1.7;
}

.bpd-tir__map {
    display: inline-flex;
    margin-top: 0.75rem;
    color: var(--bpd-accent);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.88rem;
}

.bpd-tir__map:hover {
    text-decoration: underline;
}

.bpd-called {
    display: grid;
    gap: 0.75rem;
}

.bpd-called-group {
    border-radius: 16px;
    background: var(--bpd-panel);
    border: 1px solid var(--bpd-line);
    overflow: hidden;
}

.bpd-called-group > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.1rem;
    color: var(--bpd-navy);
    font-weight: 800;
    background: #eef4f9;
    flex-wrap: nowrap;
}

.bpd-called-group > summary > span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.bpd-called-group > summary::-webkit-details-marker {
    display: none;
}

.bpd-called-group__count {
    flex: 0 0 auto;
    min-width: 2rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(29, 107, 79, 0.12);
    color: var(--bpd-accent);
    font-size: 0.82rem;
    text-align: center;
    white-space: nowrap;
}

.bpd-called-group .bpd-called-table-wrap {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.bpd-detail-btn {
    border: 1px solid rgba(29, 107, 79, 0.35);
    background: #ecfdf5;
    color: var(--bpd-accent);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.bpd-detail-btn:hover {
    background: #d1fae5;
}

.bpd-detail-btn.is-soon,
.bpd-detail-btn:disabled {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: #94a3b8;
    cursor: default;
}

/* Vehicle / ops / records modal */
body.bpd-modal-open {
    overflow: hidden;
}

.bpd-modal {
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: min(40rem, calc(100vw - 1.5rem));
    width: 100%;
}

.bpd-modal::backdrop {
    background: rgba(11, 31, 51, 0.55);
    backdrop-filter: blur(3px);
}

.bpd-modal__card {
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(14, 39, 64, 0.1);
    box-shadow: 0 24px 60px rgba(11, 31, 51, 0.28);
    overflow: hidden;
}

.bpd-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.2rem 0.85rem;
    background: linear-gradient(160deg, #0e2740, #163a58);
    color: #fff;
}

.bpd-modal__eyebrow {
    margin: 0 0 0.3rem;
    color: #b7f5cb;
    font-size: 0.78rem;
    font-weight: 700;
}

.bpd-modal__head h2,
.bpd-modal__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.4;
}

.bpd-plate--title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    gap: 0.4rem;
}

.bpd-plate--title .bpd-plate__city {
    border-inline-start-color: rgba(255, 255, 255, 0.45);
}

.bpd-modal__close {
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.bpd-modal__tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    padding: 0.75rem 0.85rem 0;
    background: #f3f7fb;
}

.bpd-modal__tab {
    border: 0;
    border-radius: 12px 12px 0 0;
    background: transparent;
    color: #64748b;
    padding: 0.7rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.bpd-modal__tab.is-active {
    background: #fff;
    color: var(--bpd-navy);
    box-shadow: 0 -1px 0 #fff;
}

.bpd-modal__body {
    padding: 1rem 1.15rem 1.2rem;
    max-height: min(70vh, 36rem);
    overflow: auto;
}

.bpd-modal__panel[hidden] {
    display: none !important;
}

.bpd-modal__hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #ecfdf5, #f0f9ff);
    border: 1px solid rgba(29, 107, 79, 0.15);
}

.bpd-modal__plate {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--bpd-navy);
    letter-spacing: 0.02em;
}

.bpd-modal__plate.bpd-plate {
    gap: 0.32rem;
}

.bpd-modal__queue code {
    font-size: 0.95rem;
    color: var(--bpd-accent);
}

.bpd-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin: 0;
}

.bpd-modal__grid > div {
    padding: 0.7rem 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(14, 39, 64, 0.06);
}

.bpd-modal__grid dt {
    margin: 0;
    color: #64748b;
    font-size: 0.78rem;
}

.bpd-modal__grid dd {
    margin: 0.28rem 0 0;
    color: var(--bpd-ink);
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.bpd-live {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(14, 39, 64, 0.15);
}

.bpd-live h3 {
    margin: 0 0 0.65rem;
    color: var(--bpd-navy);
    font-size: 0.95rem;
    font-weight: 800;
}

.bpd-live__msg {
    margin: 0 0 0.75rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    line-height: 1.7;
}

.bpd-ops {
    display: grid;
    gap: 0.65rem;
}

.bpd-ops__btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    text-align: right;
    border: 1px solid rgba(14, 39, 64, 0.1);
    background: #fff;
    color: var(--bpd-navy);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

.bpd-ops__btn i {
    color: var(--bpd-accent);
}

.bpd-ops__btn:hover {
    border-color: rgba(29, 107, 79, 0.35);
    background: #f0fdf4;
}

.bpd-ops__btn--solid {
    width: auto;
    background: var(--bpd-accent);
    color: #fff;
    border-color: var(--bpd-accent);
}

.bpd-ops__btn--solid i {
    color: #fff;
}

.bpd-ops__btn--solid:hover {
    background: #145a41;
    border-color: #145a41;
    color: #fff;
}

.bpd-ops__btn--solid:hover i {
    color: #fff;
}

.bpd-ops__hint {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.7;
}

.bpd-ops-inquiry {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(14, 39, 64, 0.15);
}

.bpd-ops-inquiry__label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--bpd-navy);
    font-size: 0.86rem;
    font-weight: 700;
}

.bpd-ops-inquiry__row {
    display: flex;
    gap: 0.55rem;
}

.bpd-ops-inquiry__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(14, 39, 64, 0.15);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
}

.bpd-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.bpd-timeline li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
}

.bpd-timeline__dot {
    width: 0.75rem;
    height: 0.75rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: var(--bpd-accent);
    box-shadow: 0 0 0 4px rgba(29, 107, 79, 0.15);
}

.bpd-timeline strong {
    display: block;
    color: var(--bpd-navy);
    font-size: 0.9rem;
}

.bpd-timeline p {
    margin: 0.25rem 0 0;
    color: #475569;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .bpd-modal__grid,
    .bpd-ops-inquiry__row {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .bpd-modal__body {
        max-height: min(78vh, 40rem);
    }
}

.bpd-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.bpd-reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (max-width: 980px) {
    .bpd-hero__stats,
    .bpd-tir-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bpd-hero__stats,
    .bpd-tir-grid {
        grid-template-columns: 1fr;
    }

    .bpd-table {
        min-width: 640px;
    }
}
