/* ============================================================
   Ruta Mea — app.css
   ============================================================ */

:root {
    --primary:        #1e40af;
    --primary-dark:   #1e3a8a;
    --header-bg:      #172554;
    --primary-light:  #e8f0fe;
    --success:        #0e9f6e;
    --warning:        #c27803;
    --danger:         #e02424;
    --bg:             #f3f4f6;
    --sidebar-bg:     #ffffff;
    --text:           #111827;
    --text-muted:     #6b7280;
    --border:         #e5e7eb;
    --radius:         8px;
    --shadow:         0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
    --shadow-lg:      0 4px 16px rgba(0,0,0,.12);
    --sidebar-width:  380px;
    --header-h:       52px;
    --font:           -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Prevent CSS display rules from overriding the HTML hidden attribute */
[hidden] { display: none !important; }

/* Utility classes used in JS-generated HTML (avoids inline styles, keeps CSP clean) */
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 13px; }
.dot--xs    { width: 7px !important; height: 7px !important; }
.flex-1     { flex: 1; }

html, body {
    height: 100%;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

/* ---- Header ---- */
.site-header {
    height: var(--header-h);
    background: var(--header-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    position: sticky;
    top: 0;
    z-index: 2000;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 13px; }
.site-nav a:hover { color: #fff; }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
    user-select: none;
}
.nav-dropdown-btn:hover { color: #fff; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    min-width: 260px;
    z-index: 1100;
}
.nav-dropdown[open] .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
    display: block;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.nav-dropdown-menu li:last-child a { border-bottom: none; }
.nav-dropdown-menu li a:hover { background: var(--primary-light); color: var(--primary); }

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.12); }
.nav-toggle .icon-close { display: none; }

.badge-beta {
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ---- Main layout ---- */
.site-main { height: calc(100vh - var(--header-h)); }

.planner {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,.05);
}

/* ---- Form fields ---- */
.field-group {
    margin-bottom: 12px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.field-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
select.field-input { cursor: pointer; }

.row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

/* Origin / destination colour dots */
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot--green { background: var(--success); }
.dot--red   { background: var(--danger); }
.dot--blue  { background: var(--primary); }

/* ---- Autocomplete ---- */
.autocomplete-wrap { position: relative; }

.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    z-index: 500;
    max-height: 240px;
    overflow-y: auto;
}
.autocomplete-list li {
    padding: 9px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    line-height: 1.3;
}
.autocomplete-list li:last-child { border-bottom: none; }
.autocomplete-list li:hover,
.autocomplete-list li.active { background: var(--primary-light); }
.autocomplete-list li .country-chip {
    display: inline-block;
    font-size: 10px;
    background: var(--border);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ---- Waypoint ---- */
.waypoint-group {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-bottom: 8px;
}
.waypoint-group .autocomplete-wrap { flex: 1; }
.btn-remove-waypoint {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    cursor: pointer;
    color: var(--danger);
    line-height: 1;
    transition: background .1s;
}
.btn-remove-waypoint:hover { background: #fee2e2; }

.btn-add-waypoint {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
    transition: background .1s, border-color .1s;
}
.btn-add-waypoint:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* ---- Calculate button ---- */
.btn-calculate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 4px;
}
.btn-calculate:hover  { background: var(--primary-dark); }
.btn-calculate:active { transform: scale(.98); }
.btn-calculate:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ---- Results ---- */
.results {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.results-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    padding: 7px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-muted);
    flex: 1;
    min-width: 120px;
}
.summary-item--total {
    flex-basis: 100%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
}
.summary-item--total strong { font-size: 16px; }

.results-section {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.results-section summary {
    padding: 10px 14px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: var(--bg);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.results-section summary::-webkit-details-marker { display: none; }
.results-section[open] summary { border-bottom: 1px solid var(--border); }
.results-section > *:not(summary) { padding: 10px 14px; }

.chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform .2s ease;
}
.results-section[open] > summary .chevron { transform: rotate(180deg); }

/* City list */
.city-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.city-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
}
.city-list li .cc-chip {
    font-size: 10px;
    background: var(--border);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-left: auto;
}

/* Toll list */
.toll-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.toll-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}
.toll-list li .toll-cost {
    margin-left: auto;
    font-weight: 600;
    color: var(--warning);
    white-space: nowrap;
}
.toll-list li .toll-link {
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
}
.toll-list li .toll-link:hover { text-decoration: underline; }
.toll-type-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}
.toll-type-badge--crossing { background: #fef3c7; color: #92400e; }
.toll-type-badge--vignette { background: #dbeafe; color: #1e40af; }
.toll-type-badge--perkm    { background: #f3e8ff; color: #6b21a8; }
.toll-type-badge--approx   { background: #fef9c3; color: #854d0e; }

.toll-km-detail { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.toll-warnings { margin-top: 8px; }
.toll-warning {
    display: flex;
    gap: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 8px 10px;
    font-size: 12px;
    color: #78350f;
    margin-bottom: 6px;
    line-height: 1.4;
}

.cost-detail {
    font-size: 13px;
    color: var(--text);
    line-height: 1.8;
}
.cost-detail .highlight { font-weight: 700; color: var(--primary); }

.cost-total {
    margin-top: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--warning);
    text-align: right;
}

/* Charger list */
.charger-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.charger-list li {
    font-size: 12px;
    background: var(--bg);
    padding: 7px 10px;
    border-radius: var(--radius);
    line-height: 1.6;
}
.charger-list li strong { color: var(--primary); }
.charger-operator { color: var(--text-muted); }
.charger-cost { color: #2e7d32; font-weight: 600; }

/* ---- Error box ---- */
.error-box {
    margin-top: 16px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.5;
}

/* ---- Map ---- */
.map-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

.map-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 400;
    font-size: 14px;
    color: var(--text-muted);
    backdrop-filter: blur(2px);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Fuel price table ---- */
.fuel-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 8px;
}
.fuel-price-table th {
    text-align: left;
    padding: 5px 8px;
    background: var(--bg);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 1px solid var(--border);
}
.fuel-price-table td {
    padding: 5px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.fuel-price-table tr:last-child td { border-bottom: none; }
.fuel-price-table tr.cheapest-row td { background: #f0fdf4; font-weight: 600; }
.fuel-price-table tr.priciest-row td { background: #fff7ed; }
.price-cheap  { color: var(--success); font-weight: 700; }
.price-normal { color: var(--text); }
.price-high   { color: var(--danger); }

.cheapest-tip {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 13px;
    color: #065f46;
    margin-bottom: 10px;
    line-height: 1.5;
}
.cheapest-tip strong { font-weight: 700; }
.cheapest-tip__main { margin-bottom: 2px; }
.cheapest-tip__saving { font-size: 12px; color: #047857; }

.price-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* ---- Leaflet custom markers ---- */
.lf-marker-city {
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 10px !important;
    height: 10px !important;
    box-shadow: var(--shadow);
}
.lf-marker-toll {
    background: #f59e0b;
    border: 2px solid #fff;
    border-radius: 4px;
    width: 14px !important;
    height: 14px !important;
    box-shadow: var(--shadow);
}
.lf-marker-charger {
    background: var(--success);
    border: 2px solid #fff;
    border-radius: 50%;
    width: 12px !important;
    height: 12px !important;
    box-shadow: var(--shadow);
}

/* ---- SEO landing pages ---- */
body.page-seo .site-main {
    height: auto;
    overflow: visible;
}
body.page-seo .planner {
    height: 72vh;
    min-height: 520px;
}

.seo-wrap {
    display: flex;
    flex-direction: column;
}

.seo-intro {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
}
.seo-intro h1 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}
.seo-intro p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 780px;
}

.seo-faq {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 28px 24px;
    max-width: 860px;
    width: 100%;
    align-self: center;
}
.seo-faq h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
}
.faq-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.faq-item p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ---- Route listing page ---- */
.rute-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}
.rute-header {
    margin-bottom: 24px;
}
.rute-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}
.rute-header p { font-size: 14px; color: var(--text-muted); }

.rute-empty { padding: 40px 0; text-align: center; color: var(--text-muted); }
.rute-empty a { color: var(--primary); }

.rute-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.route-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: box-shadow .15s, border-color .15s;
}
.route-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.route-card__route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}
.route-card__city { flex: 1; }
.route-card__meta {
    font-size: 12px;
    color: var(--text-muted);
}
.route-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}
.route-card__cost {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}
.route-card__type {
    font-size: 12px;
    color: var(--text-muted);
}
.route-card__consumption {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding-bottom: 24px;
}
.pagination__btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity .15s;
}
.pagination__btn:hover { opacity: .85; }
.pagination__btn--disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
}
.pagination__info { font-size: 14px; color: var(--text-muted); }

/* Honeypot — must be invisible to humans */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- Return trip checkbox ---- */
.field-group--checkbox { padding: 2px 0 4px; }
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}
.checkbox-label input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); flex-shrink: 0; }

/* ---- Toll explanation page ---- */
.toll-exp-wrap { max-width: 820px; margin: 0 auto; padding: 32px 20px 60px; }
.toll-exp-hero { margin-bottom: 36px; }
.toll-exp-hero h1 { font-size: 26px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.toll-exp-hero p { color: var(--text-muted); font-size: 15px; }
.toll-exp-section { margin-bottom: 40px; }
.toll-exp-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.toll-exp-section p { margin-bottom: 10px; line-height: 1.6; }
.toll-exp-section code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.toll-exp-note { font-size: 13px; color: var(--text-muted); background: var(--primary-light); border-left: 3px solid var(--primary); padding: 8px 12px; border-radius: 0 6px 6px 0; margin-top: 10px !important; }
.toll-exp-note a { color: var(--primary); }
.toll-class-table-wrap { overflow-x: auto; margin: 16px 0; }
.toll-class-table, .toll-rate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.toll-class-table th, .toll-rate-table th { background: var(--primary); color: #fff; padding: 8px 12px; text-align: left; }
.toll-class-table td, .toll-rate-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.toll-class-table tr:nth-child(even) td, .toll-rate-table tr:nth-child(even) td { background: #f9fafb; }
.vehicle-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.vehicle-badge--moto { background: #fef3c7; color: #92400e; }
.vehicle-badge--car  { background: #d1fae5; color: #065f46; }
.vehicle-badge--truck{ background: #fee2e2; color: #991b1b; }
.country-flag { font-size: 22px; line-height: 1; }
.toll-exp-steps { padding-left: 22px; margin: 10px 0 16px; }
.toll-exp-steps li { margin-bottom: 8px; line-height: 1.6; }
.toll-exp-disclaimer { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; font-size: 13px; line-height: 1.6; }
.toll-exp-cta { margin-top: 24px; }
.btn-primary { display: inline-block; background: var(--primary); color: #fff; padding: 10px 24px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.btn-primary:hover { background: var(--primary-dark); }

/* ---- Share bar (inside sidebar results) ---- */
.share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-share:hover { background: var(--primary-dark); }
.share-feedback {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

/* ---- Route share page ---- */
.share-page { display: flex; flex-direction: column; min-height: 100%; }

/* Currency toggle — dark variant (share page header) */
.currency-toggle {
    display: flex;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius);
    overflow: hidden;
}
.currency-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,.75);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.currency-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.currency-btn.active { background: rgba(255,255,255,.2); color: #fff; }
.currency-btn + .currency-btn { border-left: 1px solid rgba(255,255,255,.3); }

/* Currency toggle — light variant (results summary on home page) */
.results-summary .currency-toggle {
    border-color: var(--border);
    background: var(--bg);
}
.results-summary .currency-btn {
    color: var(--text-muted);
}
.results-summary .currency-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.results-summary .currency-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Params bar — blue strip between hero and map body */
.share-params-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,.9);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    border-bottom: 2px solid rgba(0,0,0,.15);
}
.share-param {
    padding: 8px 16px;
    border-right: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: 6px;
}
.share-param:last-child { border-right: none; }
.share-param__label {
    font-weight: 700;
    color: rgba(255,255,255,.55);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Date badge in section title */
.share-section__date {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
}

.share-hero {
    background: var(--primary);
    color: #fff;
    padding: 20px 24px;
}
.share-hero__route {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.share-hero__city { font-size: 22px; font-weight: 700; }
.share-hero__meta {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.share-hero__sep { opacity: .5; }
.share-hero__cost { color: #fff; font-size: 16px; }
.share-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-recalc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.btn-recalc:hover { background: rgba(255,255,255,.25); }

.share-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 520px;
}
.share-map-wrap {
    flex: 1;
    position: relative;
}
#share-map { width: 100%; height: 100%; min-height: 400px; }

.share-results {
    width: 380px;
    min-width: 340px;
    background: #fff;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px;
}

.share-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.share-section:last-child { border-bottom: none; margin-bottom: 0; }
.share-section__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.share-kv {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.share-kv:last-child { border-bottom: none; }
.share-kv span { color: var(--text-muted); flex: 1; }
.share-kv--total { font-weight: 700; color: var(--warning); }
.share-kv--total span { color: var(--text); }

.share-feedback {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    /* Hamburger visible, nav hidden by default */
    .nav-toggle { display: flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--header-bg);
        padding: 8px 0 12px;
        z-index: 1999;
        box-shadow: 0 6px 20px rgba(0,0,0,.25);
        gap: 0;
    }
    body.nav-open .site-nav { display: flex; }
    body.nav-open .nav-toggle .icon-hamburger { display: none; }
    body.nav-open .nav-toggle .icon-close { display: block; }

    .site-nav > a {
        padding: 11px 20px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    /* Dropdown inline in mobile nav */
    .nav-dropdown { position: static; }
    .nav-dropdown-btn {
        width: 100%;
        padding: 11px 20px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        justify-content: space-between;
    }
    .nav-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,.15);
        min-width: unset;
        width: 100%;
    }
    .nav-dropdown[open] .nav-dropdown-menu { display: block; }
    .nav-dropdown-menu li a {
        padding: 10px 20px 10px 32px;
        color: rgba(255,255,255,.8);
        border-bottom-color: rgba(255,255,255,.07);
        font-size: 14px;
    }
    .nav-dropdown-menu li a:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }

    .planner { flex-direction: column; }
    .sidebar {
        width: 100%;
        min-width: unset;
        height: auto;
        max-height: 60vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .map-wrap { flex: 1; min-height: 300px; }
    body.page-seo .planner { height: auto; min-height: unset; }
    .share-params-bar { overflow-x: auto; flex-wrap: nowrap; }
    .share-body { flex-direction: column; }
    .share-results { width: 100%; min-width: unset; border-left: none; border-top: 1px solid var(--border); }
    #share-map { min-height: 300px; }
}
