/* Stații ITP: same look as the logged-in /verifica v2 shell (tokens from verifica/assets/css/ev2-shell.css). */

.itp2 {
    --itp-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
    --itp-page: #f5f7fb;
    --itp-card: #ffffff;
    --itp-border: #e9edf4;
    --itp-navy: #0f1b3d;
    --itp-text: #0f172a;
    --itp-text-2: #334155;
    --itp-muted: #64748b;
    --itp-faint: #94a3b8;
    --itp-soft: #f1f4f9;
    --itp-soft-2: #e6ebf3;
    --itp-field: #eef2fa;
    --itp-accent: #ec4320;
    --itp-grad: linear-gradient(135deg, #f6582a 0%, #ea3d1f 100%);
    --itp-tint: #fdeee8;
    --itp-green: #16a34a;
    --itp-green-tint: #e7f8ec;
    --itp-blue: #1f6fe5;
    --itp-blue-tint: #ebf3fe;
    --itp-amber: #c2410c;
    --itp-amber-tint: #fff4e5;
    --itp-purple: #7c3aed;
    --itp-purple-tint: #f3edff;
    --itp-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 18px rgba(31, 58, 110, .05);
    --itp-shadow-hover: 0 8px 24px rgba(31, 58, 110, .1);
    --itp-radius: 18px;
    font-family: var(--itp-font);
    color: var(--itp-text);
    background: linear-gradient(180deg, #fff 0, #fff 220px, var(--itp-page) 520px) no-repeat, var(--itp-page) !important;
    -webkit-font-smoothing: antialiased;
}

.itp2 [id] {
    scroll-margin-top: 96px;
}

/* ---------- Top bar: floating card like the v2 shell ---------- */

.itp2 > nav.sticky {
    background: transparent !important;
    box-shadow: none !important;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0;
}

.itp2 > nav.sticky > .site-nav-row {
    max-width: 1120px;
    background: var(--itp-card);
    border-radius: var(--itp-radius);
    box-shadow: var(--itp-shadow);
    padding: 10px 14px 10px 18px;
}

.itp2 > nav.sticky .site-nav-panel {
    max-width: 1120px;
    margin: 8px auto 0;
    border: 0 !important;
    border-radius: var(--itp-radius);
    box-shadow: var(--itp-shadow-hover);
}

.itp2 > nav.sticky .site-nav-cta,
.itp2 > nav.sticky .site-nav-auth.bg-brand {
    background: var(--itp-grad) !important;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(236, 67, 32, .22);
}

.itp2 > nav.sticky .site-nav-item.bg-brand {
    background: var(--itp-tint) !important;
    color: var(--itp-accent) !important;
}

@media (min-width: 640px) {
    .itp2 > nav.sticky {
        padding: calc(14px + env(safe-area-inset-top, 0px)) 24px 0;
    }
}

/* ---------- Typography ---------- */

.itp-eyebrow {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--itp-muted);
}

.itp-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--itp-navy);
    overflow-wrap: anywhere;
}

.itp-title em {
    font-style: normal;
    background: var(--itp-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.itp-lead {
    margin: 10px 0 0;
    font-size: 15.5px;
    line-height: 1.5;
    color: var(--itp-muted);
}

.itp-h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--itp-navy);
}

.itp-sub {
    margin: 3px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--itp-muted);
}

.itp-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.itp-link {
    color: var(--itp-accent);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.itp-link:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .itp-title { font-size: 34px; }
    .itp-h2 { font-size: 20px; }
}

/* ---------- Surfaces ---------- */

.itp-card,
.itp-hero {
    background: var(--itp-card);
    border-radius: var(--itp-radius);
    box-shadow: var(--itp-shadow);
    padding: 18px;
}

/* Accent line as a background layer: overflow stays visible for the search dropdown */
.itp-hero {
    position: relative;
    padding: 20px 18px;
    background: var(--itp-grad) top left / 100% 3px no-repeat, var(--itp-card);
}

@media (min-width: 768px) {
    .itp-card { padding: 22px; }
    .itp-hero { padding: 26px 28px; }
}

.itp-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.itp-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--itp-tint);
    color: var(--itp-accent);
}

.itp-ic svg { width: 21px; height: 21px; }
.itp-ic--sm { width: 36px; height: 36px; border-radius: 12px; }
.itp-ic--sm svg { width: 18px; height: 18px; }
.itp-ic--round { border-radius: 999px; }
.itp-ic--green { background: var(--itp-green-tint); color: var(--itp-green); }
.itp-ic--blue { background: var(--itp-blue-tint); color: var(--itp-blue); }
.itp-ic--amber { background: var(--itp-amber-tint); color: var(--itp-amber); }
.itp-ic--purple { background: var(--itp-purple-tint); color: var(--itp-purple); }

.itp-divider {
    height: 1px;
    background: var(--itp-border);
    border: 0;
    margin: 14px 0;
}

/* ---------- Pills / badges ---------- */

.itp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--itp-green-tint);
    color: #15803d;
}

.itp-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
}

.itp-badge--off { background: #fde0e0; color: #dc2626; }

.itp-code {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--itp-faint);
}

.itp-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--itp-soft);
    color: var(--itp-text-2);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.itp-chip svg { width: 17px; height: 17px; }
.itp-chip--sm { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.itp-chip--sm svg { width: 15px; height: 15px; }
.itp-chip--c1 svg { color: var(--itp-purple); }
.itp-chip--c2 svg { color: var(--itp-blue); }
.itp-chip--c3 svg { color: var(--itp-amber); }

/* ---------- Buttons ---------- */

.itp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, filter .2s ease;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none !important;
}

.itp-btn svg { width: 19px; height: 19px; flex: none; }
.itp-btn:active { transform: scale(.985); }
.itp-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(236, 67, 32, .35); }

.itp-btn.itp-btn--primary {
    background: var(--itp-grad);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(236, 67, 32, .25);
}

.itp-btn.itp-btn--soft { background: var(--itp-soft); color: var(--itp-text) !important; }
.itp-btn.itp-btn--green { background: var(--itp-green-tint); color: #15803d !important; }
.itp-btn.itp-btn--blue { background: var(--itp-blue-tint); color: var(--itp-blue) !important; }
.itp-btn.itp-btn--sm { min-height: 38px; padding: 0 13px; border-radius: 11px; font-size: 13.5px; gap: 7px; }
.itp-btn.itp-btn--sm svg { width: 16px; height: 16px; }
.itp-btn.itp-btn--block { width: 100%; }

@media (hover: hover) {
    .itp-btn.itp-btn--primary:hover { filter: brightness(1.04); box-shadow: 0 10px 24px rgba(236, 67, 32, .32); }
    .itp-btn.itp-btn--soft:hover { background: var(--itp-soft-2); }
    .itp-btn.itp-btn--green:hover { background: #d5f3df; }
    .itp-btn.itp-btn--blue:hover { background: #dce9fd; }
}

.itp-btn-stack {
    display: grid;
    gap: 8px;
}

.itp-btn-stack .itp-btn.itp-btn--primary {
    min-height: 54px;
    font-size: 16px;
}

/* ---------- Notices ---------- */

.itp-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--itp-amber-tint);
    color: #9a3412;
    font-size: 14px;
    line-height: 1.45;
}

.itp-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.itp-note a { font-weight: 700; text-decoration: underline; }

/* ---------- Lists ---------- */

.itp-rows {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .itp-rows--2 { grid-template-columns: 1fr 1fr; }
}

.itp-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    background: var(--itp-soft);
}

.itp-row h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--itp-text);
}

.itp-row p {
    margin: 1px 0 0;
    font-size: 12.5px;
    color: var(--itp-muted);
}

.itp-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--itp-green-tint);
    color: var(--itp-green);
}

.itp-tick svg { width: 14px; height: 14px; }

/* Vehicle class tiles */
.itp-class {
    border-radius: 16px;
    padding: 14px;
    background: var(--itp-soft);
}

.itp-class-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.itp-class h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--itp-text);
}

.itp-class p {
    margin: 1px 0 0;
    font-size: 12.5px;
    color: var(--itp-muted);
}

.itp-class-lines {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--itp-green);
}

.itp-class ul {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 4px;
}

.itp-class li {
    display: flex;
    gap: 7px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--itp-text-2);
}

.itp-class li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    margin-top: 6px;
    border-radius: 999px;
    background: #f59e0b;
}

.itp-class li.is-no::before { background: #ef4444; }

/* ---------- FAQ / collapsibles ---------- */

.itp-faq {
    display: grid;
    gap: 8px;
}

.itp-faq-item {
    border: 1px solid var(--itp-border);
    border-radius: 16px;
    background: var(--itp-card);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.itp-faq-item[open] {
    border-color: rgba(229, 57, 53, .22);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .06);
}

.itp-faq-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    list-style: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--itp-text);
    -webkit-tap-highlight-color: transparent;
}

.itp-faq-item > summary::-webkit-details-marker { display: none; }

.itp-faq-item > summary .itp-chev {
    flex: none;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--itp-soft);
    color: var(--itp-muted);
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.itp-faq-item > summary .itp-chev svg { width: 15px; height: 15px; }

.itp-faq-item[open] > summary .itp-chev {
    transform: rotate(180deg);
    background: var(--itp-tint);
    color: var(--itp-accent);
}

.itp-faq-body {
    padding: 0 16px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--itp-muted);
}

details.itp-card > summary { list-style: none; cursor: pointer; }
details.itp-card > summary::-webkit-details-marker { display: none; }
details.itp-card[open] > summary .itp-chev { transform: rotate(180deg); }
details.itp-card .itp-chev { display: inline-flex; transition: transform .2s ease; color: var(--itp-muted); }
details.itp-card .itp-chev svg { width: 20px; height: 20px; }

/* ---------- Key/value ---------- */

.itp-kv {
    display: grid;
    gap: 2px 24px;
    margin: 0;
    font-size: 14px;
}

@media (min-width: 640px) {
    .itp-kv { grid-template-columns: 1fr 1fr; }
}

.itp-kv > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--itp-border);
}

.itp-kv dt { color: var(--itp-muted); }
.itp-kv dd { margin: 0; color: var(--itp-text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* ---------- Station card (lists) ---------- */

.itp-scard {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
    background: var(--itp-card);
    box-shadow: var(--itp-shadow);
    transition: box-shadow .2s ease, transform .2s ease;
}

@media (hover: hover) {
    .itp-scard:hover { box-shadow: var(--itp-shadow-hover); transform: translateY(-1px); }
}

.itp-scard-name {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--itp-navy);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

.itp-scard-addr {
    display: flex;
    gap: 6px;
    margin: 6px 0 10px;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--itp-muted);
}

.itp-scard-addr svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--itp-faint); }

.itp-scard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--itp-border);
}

.itp-dist {
    flex: none;
    height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--itp-blue-tint);
    color: var(--itp-blue);
    font-size: 12px;
    font-weight: 700;
}

.itp-nophone {
    font-size: 12.5px;
    color: var(--itp-faint);
}

/* ---------- Forms ---------- */

.itp-input,
.itp-select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--itp-field);
    color: var(--itp-text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.itp-input::placeholder { color: #8792a8; }

.itp-input:focus,
.itp-select:focus {
    outline: none;
    border-color: rgba(236, 67, 32, .45);
    background: var(--itp-card);
    box-shadow: 0 0 0 4px rgba(236, 67, 32, .1);
}

.itp-seg {
    display: inline-flex;
    padding: 4px;
    gap: 4px;
    border-radius: 13px;
    background: var(--itp-field);
}

.itp-seg button {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--itp-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.itp-seg button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.itp-search-results {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 6px;
    max-height: 22rem;
    overflow-y: auto;
    padding: 6px;
    border-radius: 16px;
    background: var(--itp-card);
    box-shadow: 0 12px 32px rgba(31, 58, 110, .16);
    text-align: left;
}

.itp-sr-item {
    border-radius: 12px;
    color: var(--itp-text);
}

.itp-sr-item:hover,
.itp-sr-item.is-active {
    background: var(--itp-soft);
}

.itp-sr-item .itp-dist { height: 20px; padding: 0 7px; font-size: 11px; }

.itp-seg button.is-on {
    background: var(--itp-card);
    color: var(--itp-text);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}

/* ---------- Map ---------- */

.itp2 .leaflet-container {
    font-family: inherit;
}

.itp-map-card {
    overflow: hidden;
    padding: 0 !important;
}

.itp-map-only {
    border-radius: var(--itp-radius);
    box-shadow: var(--itp-shadow);
}

.itp2 .leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: var(--itp-shadow-hover);
}

/* ---------- Breadcrumbs ---------- */

.itp-crumbs {
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--itp-faint);
}

.itp-crumbs a { color: var(--itp-muted); }
.itp-crumbs a:hover { color: var(--itp-accent); }

/* ---------- CTA ---------- */

.itp-cta {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    border-radius: var(--itp-radius);
    background: linear-gradient(135deg, #fff5f1 0%, #fdeee8 55%, #fde4da 100%);
}

.itp-cta h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--itp-navy);
}

.itp-cta p {
    margin: 4px 0 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--itp-text-2);
}

@media (min-width: 768px) {
    .itp-cta { flex-direction: row; align-items: center; justify-content: space-between; padding: 26px 30px; }
}

/* ---------- Stats ---------- */

.itp-stat b {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--itp-navy);
}

.itp-stat span {
    font-size: 13px;
    color: var(--itp-muted);
}

/* ---------- County tiles ---------- */

.itp-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--itp-card);
    box-shadow: var(--itp-shadow);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--itp-text);
    transition: box-shadow .2s ease, color .2s ease;
}

.itp-tile span {
    min-width: 30px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--itp-soft);
    color: var(--itp-muted);
    font-size: 12px;
    font-weight: 700;
}

@media (hover: hover) {
    .itp-tile:hover { box-shadow: var(--itp-shadow-hover); color: var(--itp-accent); }
    .itp-tile:hover span { background: var(--itp-tint); color: var(--itp-accent); }
}

/* ---------- Prose (SEO text) ---------- */

.itp-prose {
    font-size: 15px;
    line-height: 1.7;
    color: var(--itp-text-2);
}

.itp-prose h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; color: var(--itp-navy); letter-spacing: -.01em; }
.itp-prose h3 { margin: 20px 0 8px; font-size: 17px; font-weight: 700; color: var(--itp-navy); }
.itp-prose p { margin: 0 0 12px; }
.itp-prose ul { margin: 0 0 12px; padding-left: 20px; list-style: disc; }
.itp-prose li { margin: 4px 0; }
.itp-prose a { color: var(--itp-accent); font-weight: 600; }
.itp-prose strong { color: var(--itp-text); }

/* ---------- Sticky action bar (mobile) ---------- */

.itp-sticky {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    box-shadow: 0 -6px 20px rgba(31, 58, 110, .08);
}

/* ---------- Footer ---------- */

.itp-foot {
    position: relative;
    overflow: hidden;
    background: var(--itp-card);
    border-radius: 22px;
    box-shadow: var(--itp-shadow);
    padding: 24px 22px 18px;
}

.itp-foot::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--itp-grad);
}

.itp-foot h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--itp-faint);
}

.itp-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; }
.itp-foot a { color: var(--itp-text-2); font-weight: 500; }
.itp-foot a:hover { color: var(--itp-accent); }
.itp-foot li { color: var(--itp-muted); }

.itp-foot-bottom {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--itp-border);
    font-size: 12.5px;
    color: var(--itp-faint);
}
