/* ==========================================
   PIZZERIA DELIVERY INTELLIGENCE — CB WEB & GIS
   Dashboard layout: sidebar + full-height map
========================================== */

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

:root {
    --bg: #f6f3ee;
    --panel: #ffffff;
    --panel-2: #f7f4ef;
    --border: #e6e0d8;

    --text: #172033;
    --text-soft: #687083;
    --text-faint: #9298a6;

    --sidebar: #101a36;
    --sidebar-panel: #182441;
    --sidebar-border: rgba(255, 255, 255, 0.10);

    --accent: #f26b4f;
    --accent-hover: #dd563e;
    --accent-soft: rgba(242, 107, 79, 0.13);

    --zone-fast: #42b978;
    --zone-standard: #e8aa31;
    --zone-extended: #e26757;

    --shadow: 0 12px 30px rgba(20, 28, 52, 0.10);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "Manrope", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.top-accent {
    height: 5px;
    background: linear-gradient(90deg, #f26b4f, #f49a52);
    flex-shrink: 0;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 28px;
    background: var(--sidebar);
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 5px 20px rgba(12, 21, 44, 0.16);
    flex-shrink: 0;
}

.app-header p {
    font-size: 12px;
    color: #b9c2d8;
    max-width: 720px;
}

.sidebar {
    width: 350px;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 20px;
    border-right: 1px solid var(--sidebar-border);
    background: var(--sidebar);
}

.panel {
    background: var(--sidebar-panel);
    border: 1px solid var(--sidebar-border);
    border-radius: 16px;
    padding: 19px;
    margin-bottom: 15px;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(5, 12, 30, 0.12);
}

.panel h2 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffffff;
    margin-bottom: 15px;
}

.check-row,
.stat-row,
.legend-row,
.group-item,
.ai-intro,
.ai-recs li {
    color: #bcc5da;
}

.stat-row b,
.group-item b,
.ai-recs li b {
    color: #ffffff;
}

.btn-block {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.12);
}

.btn-block:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.24);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.map-pane {
    flex: 1;
    position: relative;
    background: #dbe3dc;
}

a { color: inherit; text-decoration: none; }

/* ==========================================
   TOP ACCENT + HEADER
========================================== */

.top-accent { height: 4px; background: var(--accent); flex-shrink: 0; }

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: #17120d;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.brand { display: flex; align-items: flex-start; gap: 12px; }

.brand-icon {
    font-size: 22px;
    margin-top: 2px;
}

.app-header h1 { font-size: 19px; font-weight: 800; letter-spacing: -0.2px; margin-bottom: 3px; }
.app-header p { font-size: 13px; color: var(--text-soft); max-width: 720px; }

.menu-toggle {
    display: none;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
}

/* ==========================================
   APP BODY: sidebar + map
========================================== */

.app-body { flex: 1; display: flex; min-height: 0; }

.sidebar {
    width: 320px;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 18px;
    border-right: 1px solid var(--border);
    background: var(--bg);
}

.map-pane { flex: 1; position: relative; }

#map { position: absolute; inset: 0; background: #0e0b08; }

/* ==========================================
   PANELS (sidebar cards)
========================================== */

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
}

.panel h2 {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--text);
    margin-bottom: 14px;
}

/* Checkboxes */

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-soft);
    margin-bottom: 12px;
    cursor: pointer;
}

.check-row input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

.btn-block {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.btn-block:hover { border-color: rgba(255,255,255,0.2); }

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a0e05;
}

.btn-accent:hover { background: #f08a3d; }

/* ==========================================
   STATS
========================================== */

.stat-big { font-size: 34px; font-weight: 900; line-height: 1; }
.stat-big-label { font-size: 13px; color: var(--text-soft); margin: 4px 0 16px; }

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13.5px;
    color: var(--text-soft);
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-of-type { border-bottom: none; }
.stat-row b { color: var(--text); font-size: 14px; }

.zone-bar {
    display: flex;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0 12px;
    background: var(--panel-2);
}

.zone-bar .seg { height: 100%; }
.seg-fast { background: var(--zone-fast); }
.seg-standard { background: var(--zone-standard); }
.seg-extended { background: var(--zone-extended); }

.zone-legend { display: flex; flex-direction: column; gap: 7px; }

.legend-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-soft); }

.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-fast { background: var(--zone-fast); }
.dot-standard { background: var(--zone-standard); }
.dot-extended { background: var(--zone-extended); }

/* ==========================================
   GROUPS LIST
========================================== */

.groups-list { display: flex; flex-direction: column; gap: 10px; }

.group-item { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }
.group-item b { color: var(--text); }
.group-item .sep { color: var(--text-faint); margin: 0 4px; }

.groups-empty { font-size: 13px; color: var(--text-faint); }

/* ==========================================
   AI PANEL
========================================== */

.ai-intro { font-size: 13px; color: var(--text-soft); margin-bottom: 14px; }

.ai-result { margin-top: 14px; }

.ai-loading { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--accent); }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(232,121,43,0.25); border-top-color: var(--accent); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.ai-recs { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ai-recs li { font-size: 13px; color: var(--text-soft); line-height: 1.55; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; }
.ai-recs li:last-child { border-bottom: none; padding-bottom: 0; }
.ai-recs li span.rec-icon { flex-shrink: 0; }
.ai-recs li b { color: var(--text); }

.ai-disclaimer { font-size: 11px; color: var(--text-faint); margin-top: 10px; }

.sidebar-credit { font-size: 11.5px; color: var(--text-faint); text-align: center; padding: 6px 4px 2px; }
.sidebar-credit a { color: var(--accent); font-weight: 700; }

/* ==========================================
   LEAFLET THEMING
========================================== */

.leaflet-popup-content-wrapper { background: var(--panel); color: var(--text); border-radius: 12px; }
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content {
    font-family: "Manrope", Arial, sans-serif; font-size: 13px; line-height: 1.5; margin: 12px 14px; }
.leaflet-popup-content b { color: var(--accent); }
.leaflet-container a.leaflet-popup-close-button { color: var(--text-soft); }

.pizzeria-label {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    font-size: 12.5px;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    white-space: nowrap;
}
.pizzeria-label::before { display: none; }
/* ==========================================
   DELIVERY DRIVERS
========================================== */

.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.panel-heading-row h2 {
    margin-bottom: 0;
}

.driver-count {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.driver-intro {
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.55;
}

.drivers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;

    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--panel-2);

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.driver-card:hover {
    transform: translateY(-1px);
    border-color: rgba(242, 107, 79, 0.35);
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.08);
}

.driver-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    border-radius: 50%;

    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.driver-avatar--one {
    background: #3678e5;
}

.driver-avatar--two {
    background: #8b5bd7;
}

.driver-avatar--three {
    background: #e38a32;
}

.driver-information {
    min-width: 0;
}

.driver-information strong {
    display: block;
    margin-bottom: 3px;

    color: var(--text);
    font-size: 12px;
    line-height: 1.3;
}

.driver-information span {
    display: block;
    overflow: hidden;

    color: var(--text-soft);
    font-size: 10px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-status {
    grid-column: 2;

    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 6px;

    padding: 4px 8px;
    border-radius: 999px;

    font-size: 9px;
    font-weight: 800;
}

.driver-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.driver-status--available {
    background: rgba(66, 185, 120, 0.13);
    color: #278857;
}

.driver-status--available::before {
    background: #42b978;
}
.driver-status--delivering {
    background: rgba(242, 107, 79, 0.14);
    color: #d84f37;
}

.driver-status--delivering::before {
    background: #f26b4f;
    box-shadow: 0 0 0 4px rgba(242, 107, 79, 0.12);
}

.driver-card--busy {
    border-color: rgba(242, 107, 79, 0.3);
}
/* Driver panel positioned over the map */

.map-driver-panel {
    position: absolute;
    top: auto;
    bottom: 28px;
    left: 22px;
    z-index: 900;

    width: 310px;
    max-height: calc(100% - 56px);
    margin: 0;
    overflow-y: auto;

    box-shadow: 0 18px 45px rgba(20, 28, 52, 0.2);
}
/* ==========================================
   MOBILE
========================================== */

@media (max-width: 860px) {
    html, body { height: auto; overflow: auto; }

    .app-header { flex-wrap: wrap; }
    .app-header p { display: none; }
    .menu-toggle { display: block; }

   .app-body {
    flex: none;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}
   .creator-ticker {
    display: none;
}

   .driver-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
}

.driver-status {
    grid-column: auto;
    justify-self: end;
}

.driver-information strong {
    font-size: 13px;
}

.driver-information span {
    font-size: 11px;
}
   .map-driver-panel {
    top: auto;
    right: 12px;
    bottom: 32px;
    left: 12px;

    width: auto;
    max-height: 190px;
    padding: 14px;
    overflow-y: auto;
}

.map-driver-panel .driver-intro {
    display: none;
}

.map-driver-panel .drivers-list {
    gap: 7px;
}

.map-driver-panel .driver-card {
    padding: 8px;
}

.map-driver-panel .driver-avatar {
    width: 34px;
    height: 34px;
}
    .sidebar {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0 18px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        transition: max-height .3s ease, padding .3s ease;
    }
    .sidebar.open { max-height: 2400px; padding: 18px; }

   .map-pane {
    flex: none;
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 480px;
}

#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
}
@media (max-width: 860px) {

    .map-contact-card {
        top: 14px;
        right: 14px;
        width: min(300px, calc(100% - 75px));
        padding: 14px;
    }

    .map-contact-card strong {
        font-size: 11px;
    }
}
@media (max-width: 480px) {
    .app-header h1 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .creator-ticker-track {
        animation: none;
    }
}
/* ==========================================
   BRANDED HEADER
========================================== */

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo {
    width: 72px;
    height: 48px;
    flex-shrink: 0;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: #07121f;
    box-shadow: 0 9px 22px rgba(242, 107, 79, 0.20);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    padding: 0;
    transform: scale(1.15);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-owner {
    margin-bottom: 2px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.app-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.app-header p {
    margin-top: 2px;
    color: #aeb8cf;
    font-size: 11px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
/* ==========================================
   GUIDE BUTTON
========================================== */

.guide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 16px;
    border: 1px solid rgba(239, 111, 82, 0.55);
    border-radius: 10px;

    background: rgba(239, 111, 82, 0.12);
    color: #ffffff;

    font-family: "Manrope", sans-serif;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;
    white-space: nowrap;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.guide-button span {
    color: #ef6f52;
    font-size: 12px;
}

.guide-button:hover {
    background: #ef6f52;
    border-color: #ef6f52;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 111, 82, 0.25);
}

.guide-button:hover span {
    color: #ffffff;
}

.guide-button:focus-visible {
    outline: 3px solid rgba(239, 111, 82, 0.35);
    outline-offset: 3px;
}

.guide-button:active {
    transform: translateY(0);
}
.demo-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #c5cede;
    font-size: 11px;
    font-weight: 600;
}

.demo-status i,
.restaurant-status i {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: #55cf8a;
    box-shadow: 0 0 0 5px rgba(85, 207, 138, 0.12);
}

.header-link {
    padding: 9px 12px;
    color: #c5cede;
    font-size: 11px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: #ffffff;
}

.contact-button {
    padding: 10px 16px;
    border-radius: 9px;
    color: #ffffff;
    background: var(--accent);
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(242, 107, 79, 0.22);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.contact-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}


/* ==========================================
   PIZZERIA PHOTO CARD
========================================== */

.pizzeria-hero {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--sidebar-border);
    border-radius: 18px;
    background: #111a30;
    box-shadow: 0 14px 30px rgba(5, 12, 30, 0.20);
}

.pizzeria-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pizzeria-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(9, 16, 32, 0.10) 0%,
            rgba(9, 16, 32, 0.36) 38%,
            rgba(9, 16, 32, 0.96) 100%
        );
}

.pizzeria-content {
    position: relative;
    z-index: 2;
    min-height: 230px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
}

.restaurant-status {
    align-self: flex-start;
    padding: 7px 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    background: rgba(10, 18, 35, 0.72);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
}

.restaurant-type {
    margin-bottom: 6px;
    color: #ff9b82;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.pizzeria-content h2 {
    margin: 0 0 7px;
    color: #ffffff;
    font-size: 21px;
    letter-spacing: -0.03em;
}

.restaurant-description {
    max-width: 275px;
    color: #c3cada;
    font-size: 10px;
    line-height: 1.55;
}


/* ==========================================
   CONTACT CARD
========================================== */

.contact-card {
    padding: 17px;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    border: 1px solid rgba(242, 107, 79, 0.24);
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            rgba(242, 107, 79, 0.14),
            rgba(255,255,255,0.04)
        );
}

.contact-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    background: var(--accent);
    font-size: 16px;
}

.contact-label {
    display: block;
    margin-bottom: 4px;
    color: #ff9b82;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-card strong {
    display: block;
    margin-bottom: 9px;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.5;
}

.contact-card a {
    color: #ff9b82;
    font-size: 10px;
    font-weight: 800;
}

.contact-card a:hover {
    color: #ffffff;
}
/* ==========================================
   INTERACTIVE GUIDE
========================================== */

/* Section currently presented by the guide */
.tour-highlight {
    position: relative;
    z-index: 1200 !important;
    outline: 4px solid #ef6f52;
    outline-offset: 5px;
    border-radius: 14px;
    box-shadow:
        0 0 0 8px rgba(239, 111, 82, 0.18),
        0 14px 36px rgba(0, 0, 0, 0.28);
    animation: tourPulse 1.6s ease-in-out infinite;
}

@keyframes tourPulse {
    0%,
    100% {
        outline-color: rgba(239, 111, 82, 0.75);
        box-shadow:
            0 0 0 7px rgba(239, 111, 82, 0.12),
            0 14px 36px rgba(0, 0, 0, 0.24);
    }

    50% {
        outline-color: #ef6f52;
        box-shadow:
            0 0 0 12px rgba(239, 111, 82, 0.22),
            0 18px 44px rgba(0, 0, 0, 0.32);
    }
}

/* Floating guide information box */
.tour-popover {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);

    width: min(520px, calc(100% - 32px));
    padding: 20px;

    background: rgba(17, 20, 39, 0.97);
    color: #ffffff;
    border: 1px solid rgba(239, 111, 82, 0.5);
    border-radius: 16px;

    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);

    font-family: "Manrope", sans-serif;
    z-index: 5000;
}

/* Progress text: Steg 1 av 6 */
.tour-progress {
    display: block;
    margin-bottom: 7px;

    color: #ef8a70;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

/* Guide title */
.tour-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

/* Guide description */
.tour-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.65;
}

/* Bottom row containing the buttons */
.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 17px;
}

/* Shared button styling */
.tour-close,
.tour-next {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 9px;

    font-family: "Manrope", sans-serif;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

/* End-guide button */
.tour-close {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.tour-close:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Next-step button */
.tour-next {
    background: #ef6f52;
    color: #ffffff;
    border: 1px solid #ef6f52;
}

.tour-next:hover {
    background: #f47d61;
    border-color: #f47d61;
    transform: translateY(-1px);
}

.tour-close:focus-visible,
.tour-next:focus-visible {
    outline: 3px solid rgba(239, 111, 82, 0.4);
    outline-offset: 3px;
}

/* ==========================================
   HEADER MOBILE
========================================== */

@media (max-width: 860px) {

    .demo-status,
    .header-link {
        display: none;
    }

    .contact-button {
        padding: 9px 12px;
    }

    .brand-logo {
        width: 62px;
        height: 42px;
    }
}
@media (max-width: 860px) {
    .guide-button {
        padding: 9px 12px;
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .brand-logo {
        width: 52px;
        height: 38px;
    }

    .app-header p {
        display: none;
    }
}
.tour-popover {
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 17px;
}

.tour-title {
    font-size: 18px;
}

.tour-text {
    font-size: 13px;
}

.tour-highlight {
    outline-width: 3px;
    outline-offset: 3px;
}

@media (max-width: 560px) {

    .app-header {
        padding: 12px 14px;
    }

    .brand-owner {
        display: none;
    }

    .app-header h1 {
        max-width: 155px;
        font-size: 14px;
        line-height: 1.2;
    }

    .contact-button {
        display: none;
    }

    .header-actions {
        gap: 7px;
    }
}
/* Larger header typography */

.brand-owner {
    margin-bottom: 3px;
    font-size: 11px;
    letter-spacing: 0.17em;
}

.app-header h1 {
    font-size: 22px;
    line-height: 1.2;
}

.app-header p {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
}
/* ==========================================
   MOVING CB WEB & GIS MESSAGE
========================================== */

.creator-ticker {
    position: relative;
    flex: 1;
    max-width: 540px;
    height: 42px;
    margin: 0 35px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    mask-image: linear-gradient(
        to right,
        transparent,
        black 12%,
        black 88%,
        transparent
    );
}

.creator-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 55px;
    white-space: nowrap;
    animation: moveCreatorText 12s linear infinite;
}

.creator-ticker-track span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.creator-ticker-track span:first-child {
    color: #ff8a70;
}

.creator-ticker:hover .creator-ticker-track {
    animation-play-state: paused;
}

@keyframes moveCreatorText {
    from {
        transform: translateX(540px);
    }

    to {
        transform: translateX(-100%);
    }
}
/* ==========================================
   CONTACT CARD OVER MAP
========================================== */

.map-contact-card {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 1000;
    width: 330px;
    padding: 18px;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 13px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(16, 26, 54, 0.97),
            rgba(27, 38, 71, 0.94)
        );

    box-shadow:
        0 18px 45px rgba(10, 18, 40, 0.28);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.map-contact-card .contact-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: var(--accent);
    font-size: 17px;
    box-shadow: 0 7px 18px rgba(242, 107, 79, 0.28);
}

.map-contact-card .contact-label {
    display: block;
    margin-bottom: 5px;
    color: #ff9b82;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.map-contact-card strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.5;
}

.map-contact-card a {
    display: inline-flex;
    align-items: center;
    color: #ff9b82;
    font-size: 11px;
    font-weight: 800;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.map-contact-card a:hover {
    color: #ffffff;
    transform: translateX(3px);
}
/* Larger contact card on the map */

.map-contact-card {
    width: 420px;
    padding: 24px;
    grid-template-columns: 55px 1fr;
    gap: 17px;
    border-radius: 20px;
}

.map-contact-card .contact-icon {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    font-size: 23px;
}

.map-contact-card .contact-label {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: 0.08em;
}

.map-contact-card strong {
    margin-bottom: 14px;
    font-size: 17px;
    line-height: 1.5;
}

.map-contact-card a {
    font-size: 13px;
    line-height: 1.4;
}
/* Mobile size for the map contact card only */

@media (max-width: 860px) {
    .map-contact-card {
        top: 12px;
        right: 12px;
        width: min(340px, calc(100% - 70px));
        padding: 17px;
        grid-template-columns: 44px 1fr;
        gap: 12px;
    }

    .map-contact-card .contact-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .map-contact-card .contact-label {
        font-size: 9px;
    }

    .map-contact-card strong {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .map-contact-card a {
        font-size: 11px;
    }
}
/* Larger header navigation text */

.demo-status {
    font-size: 14px;
    font-weight: 700;
}

.demo-status i {
    width: 9px;
    height: 9px;
}

.header-link {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
}

.contact-button {
    padding: 12px 18px;
    font-size: 14px;
}

.header-actions {
    gap: 18px;
}
@media (prefers-reduced-motion: reduce) {
    .tour-highlight {
        animation: none;
    }
}
/* ==========================================
   SELECTED DRIVER
========================================== */

.driver-card {
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.driver-card:hover {
    transform: translateY(-2px);
    border-color: rgba(238, 111, 79, 0.45);
    box-shadow: 0 8px 20px rgba(20, 24, 45, 0.12);
}

.driver-card--selected {
    background: #fff1ec;
    border-color: #ee6f4f;
    box-shadow:
        0 0 0 3px rgba(238, 111, 79, 0.16),
        0 10px 24px rgba(20, 24, 45, 0.15);
}

.driver-card--selected::after {
    content: "Visar rutt";
    margin-left: auto;
    color: #d95435;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
/* ==========================================
   LIVE DELIVERY SIMULATION
========================================== */

.delivery-simulation {
    margin: 14px 0;
    padding: 13px;
    border: 1px solid #dfe3ec;
    border-radius: 12px;
    background: linear-gradient(
        145deg,
        #f8faff,
        #f4f1ed
    );
}

.simulation-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
}

.simulation-heading > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.simulation-label {
    color: #ee6f4f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.simulation-heading strong {
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
}

.simulation-counter {
    color: var(--text-soft);
    font-size: 9px;
    line-height: 1.4;
    text-align: right;
}

.simulation-counter b {
    color: #ee6f4f;
    font-size: 12px;
}

.simulation-progress {
    width: 100%;
    height: 6px;
    margin-bottom: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4e7ed;
}

.simulation-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #ee6f4f,
        #f5a15f
    );
    transition: width 0.4s ease;
}

.simulation-actions {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 7px;
}

.simulation-button {
    min-height: 34px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        background 0.2s ease;
}

.simulation-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.simulation-button--start {
    color: #ffffff;
    background: #ee6f4f;
}

.simulation-button--start:hover:not(:disabled) {
    background: #dc5d3e;
}

.simulation-button--reset {
    color: var(--text);
    border-color: #dfe3ec;
    background: #ffffff;
}

.simulation-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.delivery-simulation.is-running {
    border-color: rgba(238, 111, 79, 0.55);
    box-shadow: 0 8px 20px rgba(238, 111, 79, 0.12);
}
