﻿body {
    overflow: hidden;
    --plyr-color-main: Orange;
}
body::-webkit-scrollbar {
    display: none;
}

.modal-backdrop {
    z-index: -1;
}

#modal-createrentalprotocol {
    z-index:5 !important;
}

/* ── MapLibre GL overrides ────────────────────── */
.maplibregl-marker {
    z-index: 1 !important;
}

.maplibregl-popup {
    z-index: 1000 !important;
}

.maplibregl-canvas-container {
    position: absolute;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
    z-index: 1;
}

/* Move top-right controls to vertical center of map */
.maplibregl-ctrl-top-right {
    top: 50% !important;
    transform: translateY(-50%);
}

.container-xxl {
    width: 100% !important;
    margin: 0 !important;
    max-width: 100% !important;
}

tbody tr, td {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}

.listObjectsIcon {
    padding-left: 2px;
    padding-right: 2px;
}


.easepick-wrapper {
    z-index: 1 !important;
}

.groupSelector {
    background-color: transparent !important;
    border: none;
    color: #c9c9c9 !important;
    text-align: right;
}

/* ── Map Marker ────────────────────────────────── */
.custom-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.marker-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Speed badge - top-right corner with state icon + speed */
.marker-speed-badge {
    position: absolute;
    top: -9px;
    right: -12px;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    padding: 1px 4px 1px 2px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 14px;
    z-index: 1;
    pointer-events: none;
}

.marker-speed-badge.marker-moving {
    background: #2e7d32;
}

.marker-speed-badge.marker-stopped {
    background: #c62828;
}

.marker-speed-badge.marker-offline {
    background: #f57c00;
}

/* Stav stojiciho vozidla (ANO-51): kratke zastaveni oranzova pauza, delsi stani cerveny stop.
   Stejne barvy ma ikona stavu v seznamu vozidel (Controls.css .status-idling / .status-stopped). */
.marker-speed-badge.marker-badge-pause {
    background: #f57c00;
}

.marker-speed-badge.marker-badge-stop {
    background: #c62828;
}

.marker-badge-icon {
    font-size: 12px !important;
}

/* Main row: icon + name side by side */
.marker-main {
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 5px;
    padding: 2px 5px 2px 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    white-space: nowrap;
}

.marker-car-icon {
    font-size: 20px;
    color: #555;
}

/* Custom SVG icon in marker — uses mask-image, inherits color from .marker-car-icon */
.marker-custom-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
}
.marker-custom-icon .custom-icon-mask {
    width: 22px;
    height: 22px;
}

.marker-moving .marker-car-icon {
    color: #2e7d32;
}

.marker-stopped .marker-car-icon {
    color: #c62828;
}

/* Stale (>10 min no movement) — grey out */
.marker-stale .marker-car-icon {
    color: #bbb;
}

.marker-stale .marker-name {
    color: #999;
}

/* Offline (>2 days) — grey out */
.marker-offline .marker-car-icon {
    color: #bbb;
}

.marker-offline .marker-name {
    color: #999;
}

.marker-name {
    font-size: 11px;
    font-weight: 600;
    color: #222;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: max-width 0.3s ease;
}
.marker-wrapper:hover .marker-name {
    max-width: 300px;
}

/* ── Popisek markeru: styl podle tridy na kontejneru mapy (ANO-33, MarkerLabels.js) ──
   short (vychozi) = kratky text, long = delsi, hover = jen ikona, twoLines = popisek a pod nim doplnujici udaje.
   Pri najeti mysi se marker roztahne: cely popisek a doplnujici udaje (SPZ, ridic …) na druhem radku. */
.marker-label {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}
.marker-details {
    display: none;
    font-size: 10px;
    font-weight: 500;
    color: #555;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.marker-wrapper:hover .marker-details:not(:empty) {
    display: block;
}
.map-labels-long .marker-name {
    max-width: 220px;
}
.map-labels-hover .marker-label {
    display: none;
}
.map-labels-hover .marker-main {
    padding-right: 2px;
}
.map-labels-hover .marker-wrapper:hover .marker-label {
    display: flex;
}
.map-labels-hover .marker-wrapper:hover .marker-main {
    padding-right: 5px;
}
.map-labels-twoLines .marker-name,
.map-labels-twoLines .marker-details {
    max-width: 160px;
}
.map-labels-twoLines .marker-details:not(:empty) {
    display: block;
}
.map-labels-twoLines .marker-wrapper:hover .marker-name,
.map-labels-twoLines .marker-wrapper:hover .marker-details {
    max-width: 300px;
}

/* ── Marker Action Bar (hover/click) ──────────── */
.marker-actions {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
    padding-bottom: 4px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 3px 4px;
    gap: 2px;
    white-space: nowrap;
    z-index: 10;
    flex-direction: row;
    align-items: center;
}

.marker-wrapper:hover .marker-actions {
    display: inline-flex;
}

.marker-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    color: #555;
    transition: background 0.15s, color 0.15s;
}
.marker-action-btn:hover {
    background: #f0f0f0;
    color: var(--brand-primary);
}
.marker-action-btn .material-icons {
    font-size: 18px;
}

/* Pin/arrow below */
.marker-pin {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(255, 255, 255, 0.92);
}

/* Hover detail - hidden by default */
.marker-detail {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    padding: 3px 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    margin-top: 2px;
    max-width: 180px;
    pointer-events: none;
}

.marker-wrapper:hover .marker-detail {
    display: block;
}

/* Re-enable pointer events on hover so detail stays visible */
.marker-wrapper:hover {
    z-index: 1000 !important;
}

.marker-address {
    font-size: 10px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* ── Vehicle Popup (click-based) ────────────────── */

.vehicle-popup .maplibregl-popup-content {
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}
.vehicle-popup .maplibregl-popup-close-button {
    font-size: 18px;
    color: #888;
    padding: 4px 8px;
    z-index: 1;
}
.vehicle-popup .maplibregl-popup-close-button:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
    border-radius: 0 10px 0 6px;
}

.vp-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #222;
    min-width: 260px;
    max-width: 340px;
}

.vp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}
.vp-icon {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.vp-icon .custom-icon-mask {
    width: 28px;
    height: 28px;
    background: #555;
}
.vp-header-text {
    min-width: 0;
}
.vp-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vp-plate {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.vp-section {
    padding: 8px 16px;
}
.vp-section-label {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.vp-addr-line {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.vp-coords {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 8px;
}
.vp-coord-text {
    font-size: 11px;
    color: #777;
    font-family: 'Roboto Mono', monospace;
}
.vp-action {
    font-size: 16px !important;
    color: #999;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
    line-height: 1;
    background: transparent;
    border: 0;
    padding: 0;
}
.vp-action:hover {
    color: #1e88e5;
}

.vp-divider {
    height: 1px;
    background: #eee;
    margin: 0 16px;
}

.vp-telemetry,
.vp-trip,
.vp-driver {
    padding: 8px 16px;
}

.vp-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 2px 0;
    gap: 12px;
}
.vp-label {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}
.vp-val {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-status-moving { color: #2e7d32; }
.vp-status-stopped { color: #c62828; }
.vp-status-inactive { color: #999; }
.vp-warning { color: #f57c00; }

.vp-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    margin-right: 2px;
}
.vp-badge-inactive {
    opacity: 0.4;
}

.vp-trip-addr {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-empty {
    padding: 16px;
    text-align: center;
    color: #999;
}


.ObjectListBR {
    display: block !important;
    margin: 0em !important;
}

.ObjectListName {
    font-weight: 600;
    font-size: 14px !important;
    margin: 0;
}
body {
    height: 100%;
}

.ObjectListAditionalInfo {
    font-weight: 300;
    font-size: 14px !important;
    margin: 0;
}

/* ── View Switcher (Folders | Tags) + Sort Dropdown ──────── */
.sidebar-view-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}
.view-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    color: #888;
    transition: all 0.15s;
}
.view-switch-btn:hover {
    border-color: #aaa;
    background: #f8f8f8;
}
.view-switch-btn.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
.sort-dropdown-wrapper {
    margin-left: auto;
}
.sort-dropdown {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #333;
}

/* ── Folder Tree Headers ─────────────────────────────────── */
.folder-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fb;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}
.folder-header:hover {
    background: #eef1f5;
}
.folder-header .folder-expand-icon {
    font-size: 18px;
    color: #888;
    transition: transform 0.2s;
}
.folder-header.collapsed .folder-expand-icon {
    transform: rotate(-90deg);
}
.folder-header .folder-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.folder-header .folder-count {
    font-size: 11px;
    color: #999;
}
.folder-header .folder-zoom-btn {
    opacity: 0;
    border: none;
    background: none;
    cursor: pointer;
    padding: 2px;
    color: #888;
    transition: opacity 0.15s;
}
.folder-header:hover .folder-zoom-btn {
    opacity: 1;
}

/* ── Tag Headers ─────────────────────────────────────────── */
.tag-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8f9fb;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
}
.tag-header:hover {
    background: #eef1f5;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

/* ── Drag & Drop ─────────────────────────────────────────── */
.vehicle-item[draggable="true"] {
    cursor: grab;
}
.vehicle-item.dragging {
    opacity: 0.4;
}
.vehicle-group-header.drop-target {
    background: #e3f2fd;
    outline: 2px dashed var(--brand-primary);
    outline-offset: -2px;
}

/* ── Move to Folder Modal ────────────────────────────────── */
.move-folder-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.move-folder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}
.move-folder-item:hover {
    background: #f1f5f9;
}
.move-folder-item.active {
    background: #e3f2fd;
}
.move-folder-name {
    flex: 1;
    font-size: 14px;
}

/* ── Tag Dot (in dropdown + tag manager) ─────────────────── */
.tag-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
}
.dropdown-item-tag {
    display: flex;
    align-items: center;
    font-size: 12px;
}

/* ── Tag Manager Modal ───────────────────────────────────── */
#modal-tag-manager .modal-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
}
#modal-tag-manager .modal-header .btn-close {
    padding: 0;
    margin: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tag-manager-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}
.tag-manager-name {
    flex: 1;
    font-size: 13px;
}
.tag-color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
}
.tag-color-swatch.active {
    border-color: #333;
    box-shadow: 0 0 0 1px #fff inset;
}
.tag-edit-form {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

/* ── Vehicle Search ───────────────────────────────────────── */
.vehicle-search-wrapper {
    position: relative;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}
.vehicle-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #bbb;
}
.vehicle-search-input {
    width: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 7px 10px 7px 36px;
    font-size: 13px;
    outline: none;
    background: #f8f9fa;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.vehicle-search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    background: #fff;
}

/* ── Vehicle List - Group Headers ─────────────────────────── */
.vehicle-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
    position: sticky;
    top: 0;
    z-index: 1;
}
.vehicle-group-header:hover { background: #e8f0f8; }
.group-expand-icon { font-size: 18px; color: #64748b; transition: transform 0.15s; }
.vehicle-group-header.expanded .group-expand-icon { transform: rotate(0deg); }
.group-folder-icon { font-size: 16px; color: #64748b; }
.group-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-count { font-size: .7rem; color: #94a3b8; font-weight: 400; white-space: nowrap; }
.tag-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Vehicle List - Div-based Layout ─────────────────────── */
.vehicle-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 14px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.12s;
    gap: 10px;
}
.vehicle-item:hover {
    background: #f8f9fb;
}
.vehicle-item:last-child {
    border-bottom: none;
}

.vehicle-icon-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
}
.vehicle-item-body {
    flex: 1;
    min-width: 0;
}
.vehicle-item-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Row 1: Name, SPZ, status, time */
.vehicle-row1 {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.vehicle-favorite-star {
    color: #f59e0b;
    font-size: 16px;
    margin-right: 2px;
    vertical-align: middle;
}
.vehicle-name {
    font-weight: 600;
    font-size: 13px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vehicle-spz {
    font-size: 10px;
    color: #777;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}
.vehicle-status-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}
.vehicle-status-icon {
    font-size: 16px !important;
}
.vehicle-speed {
    font-size: 12px;
    font-weight: 600;
    color: #4caf50;
    white-space: nowrap;
}
.vehicle-offline-icon {
    font-size: 16px !important;
}
.vehicle-time-ago {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

/* Row 2: Address, odometer */
.vehicle-row2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    line-height: 1.2;
}
.vehicle-row2-icon {
    font-size: 11px !important;
    vertical-align: middle;
    color: #bbb;
}

/* Share button inside vehicle-row2 (replaces the location marker icon) */
.vehicle-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 18px;
    height: 18px;
    border: none;
    background: transparent;
    color: #bbb;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.vehicle-share-btn:hover {
    background: #e8f0fe;
    color: var(--brand-primary);
}
.vehicle-share-btn .material-icons {
    font-size: 13px !important;
    line-height: 1;
}

/* Share / Navigate modal */
.vehicle-share-addr {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 4px;
    word-break: break-word;
}
.vehicle-share-coords {
    font-family: 'Roboto Mono', monospace;
    font-size: 11px;
    color: #888;
    margin-bottom: 14px;
}
.vehicle-share-coords:empty {
    display: none;
}
.vehicle-share-section-label {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 0 6px;
}
.vehicle-share-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vehicle-share-action {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #222;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    text-align: left;
}
.vehicle-share-action:hover {
    background: #f6f9ff;
    border-color: #c6dafd;
    color: #1e3a8a;
}
.vehicle-share-action[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.vehicle-share-action .material-icons {
    font-size: 18px !important;
    color: #1e88e5;
}
.vehicle-share-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.vehicle-share-nav-google .vehicle-share-nav-icon { background: #4285F4; }
.vehicle-share-nav-waze .vehicle-share-nav-icon { background: #33CCFF; }
.vehicle-share-nav-mapycom .vehicle-share-nav-icon { background: #E32E2E; }

/* Share modal header — tight padding, title ellipsis. Close button rendering
   je delegovany na OS-native chrome (OsDetector.upgradeModalHeader), takze
   .btn-close zde NESTYLOVAT — ohnulo by to .modal-header:has(.window-chrome-modal)
   .btn-close { display: none } pravidlo a zobrazila by se dve krizky. */
#modal-vehicle-share .modal-header {
    padding: 10px 12px 10px 16px;
}
#modal-vehicle-share .modal-header .modal-title {
    flex: 1;
    min-width: 0;
}
#modal-vehicle-share #vehicleShareTitle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Spinner shown while server resolves precise address */
.vehicle-share-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #cbd5e1;
    border-top-color: #1e88e5;
    border-radius: 50%;
    animation: vehicle-share-spin 0.7s linear infinite;
    display: inline-block;
    flex-shrink: 0;
}
@keyframes vehicle-share-spin {
    to { transform: rotate(360deg); }
}
.vehicle-share-action.is-loading {
    pointer-events: none;
    opacity: 0.75;
}
.vehicle-address {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.vehicle-odometer {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}
.vehicle-driver {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Battery indicator */
.vehicle-battery {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}
.vehicle-battery-icon {
    font-size: 14px !important;
}
.vehicle-battery-icon.battery-ok {
    color: #4caf50;
}
.vehicle-battery-icon.battery-low {
    color: #ff9800;
}
.vehicle-battery-icon.battery-critical {
    color: #f44336;
    animation: battery-pulse 1.5s infinite;
}
.battery-percent {
    font-weight: 500;
    color: #555;
}
.battery-voltage {
    color: #999;
    font-size: 10px;
}
body.hide-vf-battery .vf-battery { display: none !important; }

@keyframes battery-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Action buttons */
.vehicle-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #999;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.vehicle-action-btn:hover {
    background: #e8f0fe;
    color: var(--brand-primary);
}
.vehicle-action-btn .material-icons {
    font-size: 18px;
}
.dropdown-item-icon {
    font-size: 16px !important;
    margin-right: 8px;
    color: #666;
}

/* ── Field Visibility (body-level CSS classes) ───────────── */
body.hide-vf-spz .vf-spz { display: none !important; }
body.hide-vf-speed .vf-speed { display: none !important; }
body.hide-vf-address .vf-address { display: none !important; }
body.hide-vf-odometer .vf-odometer { display: none !important; }
body.hide-vf-timeAgo .vf-timeAgo { display: none !important; }
body.hide-vf-offline .vf-offline { display: none !important; }
body.hide-vf-actions .vf-actions { display: none !important; }
body.hide-vf-icon .vf-icon { display: none !important; }

/* When row2 is fully hidden, tighten up spacing */
body.hide-vf-address.hide-vf-odometer .vehicle-row2 { display: none !important; }

.ObjectIcon {
    margin: auto;
}

.ControllButtons {
    position: relative;
    font-size: 30px;
    margin: -7px;
    top: 6px;
}
/*/// Custom Map iccons  ///*/

.hiddenElement {
    visibility: hidden;
    display: none;
    width: 0px !important;
    padding: 0 !important;
}

.hiddenElement a {
    display: none;
    visibility: hidden;
    width: 0px !important;
    padding: 0 !important;
}



.mapSideBarToggle a {
    color: rgb(252, 134, 0) !important;
}

.mapSideBarToggle a :hover {
    color: rgb(255, 200, 137) !important;
}

/* ── Floating Panel ────────────────────────────────────────── */
.mapSideBarWrapper {
    position: fixed;
    display: flex;
    top: 68px;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
}

.mapSideBarWrapper.panel-collapsed {
    transform: translateX(calc(-100% - 12px));
    opacity: 0;
    pointer-events: none;
}

.mapSideBar {
    width: 400px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    flex-shrink: 0;
}

.lg--icon {
    width: 28px;
    height: 28px;
}

.mapSideBar::-webkit-scrollbar {
    display: none;
}

.mapSideBar.fullWidth {
    width: 500px;
}

/* Panel expand button — visible when collapsed */
.panel-expand-btn {
    display: none;
    position: fixed;
    top: 68px;
    left: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.15s;
}
.panel-expand-btn:hover {
    background: #f0f0f0;
}
.mapSideBarWrapper.panel-collapsed ~ .panel-expand-btn {
    display: flex;
}

/* Panel header styles → shared-panels.css */

/* Scrollable vehicle list area */
.vehicle-list-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.VehicleListMain td {
    padding: 0.5px;
}
.objectListIconMain {
    font-size: 28px;
    padding: 2px;
}

#map {
    position: fixed;
    margin-left: 0;
    width: 100%;
    height: calc(100% - 20px);
    z-index: 1;
}


/* Pod 1200 px je lišta GPS sbalená a výběry providera, firmy a skupiny mají vlastní řádek
   (navbar-selectors-row, viz UnifiedTopNav): lišta má 92 px místo 56 a plovoucí panel s horním
   okrajem 68 px by horních 24 px schoval pod ni. Telefon (do 800 px) má vlastní odsazení níž;
   uživatel bez výběrů řádek nemá a zůstává mu 68 px. */
@media screen and (min-width: 801px) and (max-width: 1199.98px) {
    body:has(.navbar-selectors-row) .mapSideBarWrapper,
    body:has(.navbar-selectors-row) .panel-expand-btn {
        top: 104px;
    }
}

/* ── Mobile Navbar Selectors Row ──────────────────────────── */
.navbar-selectors-row {
    display: flex;
    gap: 8px;
    padding: 6px 12px;
    background: inherit;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.navbar-selector-item {
    flex: 1;
    min-width: 0;
}
.navbar-selector-select {
    width: 100%;
    font-size: 13px;
}


/* Resize handle styles → shared-panels.css */

/* Vehicle highlight when clicking marker on map */
.vehicle-highlighted {
    background-color: #fff3cd !important;
    transition: background-color 0.5s ease;
}

/* Marker flash animation when focusing from list */
@keyframes markerFlash {
    0%, 100% { opacity: 1; }
    25% { opacity: 0.3; }
    50% { opacity: 1; }
    75% { opacity: 0.3; }
}
.marker-flash .marker-main {
    animation: markerFlash 1.5s ease;
}

/* ── Follow Mode Indicator ─────────────────────────────────────── */
/* Vizualni indikace sledovaneho vozidla — border v barve brandingu */

.marker-following .marker-main {
    box-shadow: 0 0 0 3px var(--brand-primary), 0 0 10px rgba(32, 107, 196, 0.35), 0 1px 4px rgba(0,0,0,0.2);
}

.marker-following .marker-pin {
    border-top-color: var(--brand-primary);
}

/* Aktivni follow tlacitko v action baru */
.marker-following .marker-action-btn[data-marker-action="follow"] {
    color: var(--brand-primary);
    background: #e8f0fe;
}

/* Follow pulse animace — jemny pulz kolem markeru */
@keyframes followPulse {
    0% { box-shadow: 0 0 0 3px var(--brand-primary), 0 0 10px rgba(32, 107, 196, 0.35), 0 1px 4px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 0 0 5px var(--brand-primary), 0 0 16px rgba(32, 107, 196, 0.5), 0 1px 4px rgba(0,0,0,0.2); }
    100% { box-shadow: 0 0 0 3px var(--brand-primary), 0 0 10px rgba(32, 107, 196, 0.35), 0 1px 4px rgba(0,0,0,0.2); }
}

.marker-following .marker-main {
    animation: followPulse 2s ease-in-out infinite;
}

/* ── Trail Toggle Control ──────────────────────────────────────── */
.maplibregl-ctrl-trail-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}
.maplibregl-ctrl-trail-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ── Geofence Toggle Control ────────────────────────────────── */
.maplibregl-ctrl-geofence-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}
.maplibregl-ctrl-geofence-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ── Map Switcher Control ──────────────────────────────────── */
.map-switcher-ctrl {
    position: relative;
}
.maplibregl-ctrl-map-switcher,
.maplibregl-ctrl-marker-labels {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}
.maplibregl-ctrl-map-switcher:hover,
.maplibregl-ctrl-marker-labels:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Map switcher dropdown */
.map-switcher-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    min-width: 180px;
    max-height: 340px;
    overflow-y: auto;
    z-index: 10;
    padding: 4px 0;
}
.map-switcher-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.15s;
    white-space: nowrap;
}
.map-switcher-item:hover {
    background-color: #f0f4f8;
}
.map-switcher-item.active {
    background-color: #e8f0fe;
    font-weight: 600;
}
.map-switcher-thumbnail {
    width: 40px;
    height: 28px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}
.map-switcher-label {
    font-size: 13px;
    color: #333;
}

/* Styl popisku vozidel (MarkerLabelControl) — polozky jako u prepinace map */
.marker-label-dropdown {
    min-width: 160px;
}
.marker-label-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border: none;
    background: none;
    font-size: 13px;
    color: #333;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.marker-label-item:hover {
    background-color: #f0f4f8;
}
.marker-label-item.active {
    background-color: #e8f0fe;
    font-weight: 600;
}
@media (max-width: 800px) {
    .marker-label-item { min-height: 36px; }
}

/* ── Map Type Cards (settings modal) ──────────────────────── */
.map-type-card {
    transition: box-shadow 0.15s, border-color 0.15s;
    opacity: 0.55;
    border: 2px solid transparent;
}
.map-type-card.map-card-enabled {
    opacity: 1;
    border-color: var(--brand-primary);
}
.map-type-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.map-card-preview {
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 3px 3px 0 0;
}
.map-default-star {
    color: #bbb;
    padding: 2px;
}
.map-default-star.active {
    color: #f59f00;
}
.map-default-star .material-icons {
    font-size: 18px;
}

/* Mobile toggle bar base styles → shared-panels.css */

@media screen and (max-width: 800px) {
    .mapSideBarWrapper {
        position: fixed;
        top: 94px;
        left: 0;
        bottom: 0;
        right: 0;
        width: 100% !important;
        padding-bottom: 40px;
    }

    .mapSideBar {
        width: 100% !important;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
    }

    .sidebar-resize-handle {
        display: none;
    }

    .menuWidthToggle {
        display: none;
    }

    .mapSideBarToggle {
        display: none;
    }

    .panel-expand-btn {
        display: none !important;
    }

    .panel-header .panel-collapse-btn {
        display: none;
    }

    .main-mobile-toggle.mobile-toggle-bar {
        display: flex;
    }

    .main-hidden-mobile {
        display: none !important;
    }

    /* Vehicle action buttons — larger touch targets on mobile */
    .vehicle-action-btn {
        width: 44px;
        height: 44px;
    }

    /* Okno vozidla na mape: vozidlo se posune k dolnimu okraji (MarkerManager.onDetailClick),
       okno se veje pod horni listu a pri delsim obsahu roluje */
    .vehicle-popup .maplibregl-popup-content {
        max-height: calc(100vh - 270px);
        max-height: calc(100dvh - 270px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .vehicle-popup .vp-card { min-width: 0; }
    .vehicle-popup .maplibregl-popup-close-button { width: 36px; height: 36px; font-size: 22px; }


    /* Vehicle dropdown — JS repositions as position:fixed on show */
    .vehicle-item-actions .btn-group .dropdown-menu {
        min-width: 180px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.18);
        z-index: 1050;
        border: none;
    }
}

/* Prst (telefon i tablet): Slozky / Stitky, razeni a sprava slozek nad seznamem vozidel,
   akcni lista markeru (sledovat, upravit, detail, kniha jizd) */
@media (max-width: 800px), (pointer: coarse) {
    .view-switch-btn { min-height: 36px; }
    .marker-action-btn { width: 36px; height: 36px; }
    .marker-action-btn .material-icons { font-size: 20px; }
}
