/* Weboldal fő részeinek stílusa */
body { margin: 0; padding: 0; font-family: sans-serif; }
html, body { height: 100%; height: -webkit-fill-available; overflow: hidden; }

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    background-color: #f0f2f5; /* Háttérszín a hézagokhoz */
    visibility: hidden; /* Rejtve marad az auth ellenőrzésig */
}

#main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 10px 10px 10px 10px;
    gap: 10px;
}

#map_container {
    flex-grow: 1;
    height: 100%;
    position: relative; /* Hogy a belső gombot abszolút lehessen pozícionálni */
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden; /* Biztosítja, hogy a blokkoló ne lógjon ki a sarkoknál */
}

/* Térképen lévő profil gomb alapértelmezett rejtése */
#user-btn-map {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 12; /* Az összevetés (10) és az alap vezérlők (11) felett */
    display: none;
}

/* Mobil lehúzó fogantyú */
.mobile-drag-handle {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px;
    flex-shrink: 0;
    cursor: pointer;
    background-color: #fff;
    border-radius: 15px 15px 0 0;
}

.mobile-drag-handle img {
    width: 33%;
    height: 24px;
    opacity: 0.3;
    object-fit: contain;
}

/* Mobil felhúzó gomb */
.mobile-panel-toggle {
    display: none;
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 24px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
    cursor: grab;
    z-index: 20002;
    align-items: center;
    justify-content: center;
}

.mobile-panel-toggle img {
    width: 16px;
    height: 16px;
}

.side-panel {
    width: 0;
    flex-shrink: 0;
    background: #ffffff;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20001; /* Az app-blocker (20000) fölé emelve */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
}

/* Allow the toggle button to protrude from the left panel */
#left-panel {
    overflow: visible;
}

.side-panel.panel-open {
    width: 320px;
}

.side-panel.panel-collapsed {
    width: 0;
}

.panel-toggle-btn {
    position: absolute;
    top: 50%;
    right: -24px; /* Move outside the panel */
    transform: translateY(-50%); /* Center vertically relative to its top position */
    width: 24px;
    height: 48px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-left: none;
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 6px -2px rgba(0,0,0,0.1);
    cursor: grab;
    z-index: 101;
    display: none;
    align-items: center;
    justify-content: center;
    transition: none; /* Disable transition for drag performance */
}

.panel-toggle-btn img {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.panel-toggle-btn:active {
    cursor: grabbing;
}

.side-panel.panel-collapsed .panel-toggle-btn img {
    /* 180 fokos elforgatás, amikor a panel össze van csukva */
    transform: rotate(180deg);
}

.side-panel.panel-open .panel-toggle-btn,
.side-panel.panel-collapsed .panel-toggle-btn {
    display: flex;
}

.side-panel.panel-collapsed .panel-content,
.side-panel.panel-collapsed .panel-close-btn {
    display: none;
}

.panel-header-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    z-index: 100;
}

.panel-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 100;
    transition: background-color 0.2s;
}

.panel-header-actions .panel-close-btn,
.panel-header-actions .panel-info-btn {
    position: static;
}

.panel-info-btn {
    position: absolute;
    top: 10px;
    right: 38px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 100;
    transition: background-color 0.2s;
}

.panel-close-btn:hover,
.panel-info-btn:hover {
    background-color: #e9ecef;
    border-radius: 8px;
}

.panel-info-btn img {
    width: 24px;
    height: 24px;
}

.panel-close-btn img {
    width: 24px;
    height: 24px;
}

.panel-content {
    padding: 20px;
    padding-top: 50px; /* Hely a bezáró gombnak */
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Nézetek kezelése */
.sub-content, .sub-content-right { display: none; }
.sub-content.active, .sub-content-right.active {
    display: flex; 
    flex-direction: column; 
    height: 100%; 
    overflow-y: auto;
    overscroll-behavior: contain; /* Görgetés ne fusson át a térkép mögé */
    scrollbar-width: none;        /* Firefox: rejtett csúszka */
    -ms-overflow-style: none;     /* IE/Edge: rejtett csúszka */
    padding: 0 4px; /* Hely biztosítása a mezők kijelölési árnyékának */
    margin: 0 -4px; /* A vízszintes pozíció megtartása a negatív margóval */
}
.sub-content.active::-webkit-scrollbar,
.sub-content-right.active::-webkit-scrollbar {
    display: none; /* Chrome/Safari/WebKit: rejtett csúszka */
}

/* Info nézet stílusa */
.info-description-view {
    display: none;
    padding: 0 10px 20px 0;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    flex: 1;
}

.sub-content.showing-info > *:not(.info-description-view) {
    display: none !important;
}

.sub-content.showing-info .info-description-view {
    display: block;
}

.info-description-view p { margin-bottom: 12px; }
.info-description-view ul { padding-left: 20px; margin-bottom: 12px; }
.info-description-view li { margin-bottom: 6px; }
.info-description-view strong { color: #0056b3; }

/* Lábléc */
footer {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 30000;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.data-ribbon {
    display: flex;
    height: 36px;
    background: rgba(0, 86, 179, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
    padding: 0;
    gap: 0;
    font-size: 12px;
    color: #444;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Információs ablak stílusai */
.info-window {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    width: 280px;
    max-width: calc(100vw - 70px); /* Megakadályozza a jobb oldali gombok lefedését */
    background: rgba(240, 242, 245, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    flex-direction: column;
    overflow: hidden;
}

.info-window.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.info-window-tabs {
    display: flex;
    background: #e9ecef;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    scrollbar-width: none;
}
.info-window-tabs::-webkit-scrollbar { display: none; }

.info-tab {
    padding: 8px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    flex: 1;
    min-width: 0;
}

.info-tab.active {
    border-bottom-color: #0056b3;
    background: rgba(255, 255, 255, 0.5);
}

.info-tab img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.info-tab.active img {
    opacity: 1;
    filter: invert(26%) sepia(68%) saturate(2676%) hue-rotate(201deg) brightness(96%) contrast(101%);
}

/* Funkció sáv körhinta stílusai */
#ribbon-carousel-container {
    max-width: none;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

#ribbon-carousel {
    display: flex;
    gap: 8px;
    padding: 0 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    cursor: grab;
    height: 100%;
    align-items: center;
}

#ribbon-carousel::-webkit-scrollbar { display: none; }
#ribbon-carousel.grabbing { cursor: grabbing; }

/* Tab átrendezés vizuális visszajelzései */
.info-tab.dragging-tab {
    opacity: 0.4;
    background: rgba(0, 86, 179, 0.1);
}
.info-tab {
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.info-tab.active.no-filter img {
    filter: none;
}

.ribbon-snap-btn.no-active-bg.active {
    background: #fff;
}

.info-window-body {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 5px;
}

.info-window-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #333;
    min-width: 0;
}

.info-window-content .data-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    padding: 2px 4px;
    border-radius: 4px;
}

.info-window-content .data-item b {
    color: #0056b3;
    font-size: 11px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.info-window-content .data-item span {
    text-overflow: ellipsis;
    overflow: hidden;
}

.info-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    justify-content: center;
    transition: background 0.2s;
    border-radius: 4px;
}
.info-expand-btn:hover { background: rgba(0,0,0,0.05); }
.info-expand-btn img { width: 20px; height: 20px; opacity: 0.6; }

.info-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.info-nav-btn:hover { background: rgba(0,0,0,0.05); }
.info-nav-btn:disabled { opacity: 0.2; cursor: not-allowed; }
.info-nav-btn img { width: 24px; height: 24px; }

.data-item {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.data-item b {
    color: #0056b3;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.ribbon-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 5px;
}

.ribbon-snap-btn {
    display: none;
    padding: 0 12px;
    height: 24px;
    margin-left: 0;
    border: 1px solid #0056b3;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ribbon-snap-btn img {
    width: 14px;
    height: 14px;
}

.ribbon-snap-btn.active {
    background: #ffc107;
    border-color: #e0a800;
    color: #000;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#ribbon-main-icon {
    width: 20px;
    height: 20px;
}

.ribbon-view-selector {
    position: absolute;
    bottom: 35px;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.ribbon-selector-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    gap: 8px;
    cursor: pointer;
    border-radius: 3px;
    white-space: nowrap;
}

.ribbon-selector-item:hover { background: #f0f2f5; }
.ribbon-selector-item img { width: 18px; height: 18px; }

.footer-main {
    height: 65px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-left {
    flex: 1;
    min-width: 0;
}

.footer-logo {
    height: 40px;
}

/* Körhinta */
#carousel-container {
    max-width: none;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

#carousel {
    display: flex;
    gap: 5px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE, Edge */
    white-space: nowrap;
    cursor: grab;
    justify-content: center;
}

#carousel.grabbing {
    cursor: grabbing;
}

#carousel.grabbing .carousel-item {
    cursor: grabbing;
}

#carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.carousel-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.carousel-item:hover {
    transform: scale(1.1);
}

.carousel-item.selected {
    background: #0056b3;
    border-color: #004494;
}

.carousel-item.selected .carousel-icon {
    filter: invert(1) hue-rotate(180deg) brightness(3);
}

.carousel-icon {
    width: 28px;
    height: 28px;
    pointer-events: none;
}

#carousel-label {
    font-weight: bold;
    color: #333;
    display: none;
}

/* Lábléc jobb oldali gombok */
.footer-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.footer-btn img {
    width: 24px;
    height: 24px;
}

.footer-btn:hover {
    background: #e9ecef;
}

.footer-btn-user {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #0056b3;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    cursor: pointer;
    background-size: 24px 24px;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    user-select: none;
    padding: 0;
}

.maplibregl-ctrl-group button.active,
.maplibregl-ctrl-group button.geolocation-active {
    background-color: #e6f2ff !important;
}

/* --- RÉTEGEK PANEL SPECIÁLIS BEÁLLÍTÁSAI --- */

#layers-section.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 0;
}
#layers-section.active::-webkit-scrollbar { display: none; }

#dynamic-layers-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* A belső tartalom görget, nem a csoportok listája */
    min-height: 0;
}

.group-content::-webkit-scrollbar {
    width: 8px;
}
.group-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.group-content::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 4px;
}
.group-content::-webkit-scrollbar-thumb:hover {
    background: #004494;
}

.dynamic-layers-list::-webkit-scrollbar {
    width: 8px;
}
.dynamic-layers-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.dynamic-layers-list::-webkit-scrollbar-thumb {
    background: #0056b3;
    border-radius: 4px;
}
.dynamic-layers-list::-webkit-scrollbar-thumb:hover {
    background: #004494;
}

.accordion-group {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-bottom: 1px solid #ddd;
    opacity: 1;
    transition: opacity 0.2s ease;
    cursor: grab;
}

.accordion-group.dragging {
    opacity: 0.5;
    background: #e6f2ff;
}

/* A nyitott állapot kényszeríti a kitöltést */
.accordion-group.open {
    flex: 0 1 auto; /* A nyitott csoport kitölti a rendelkezésre álló helyet */
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.group-header {
    background-color: #f1f1f1;
    padding: 8px 10px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    cursor: grab;
    transition: background-color 0.2s;
}

.group-header:hover {
    background-color: #e9ecef;
}

.group-header:active {
    cursor: grabbing;
}

.drag-handle-icon {
    cursor: move;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0;
    display: none !important;
}

.group-name {
    flex-grow: 1;
    text-align: left;
    user-select: none;
}

.accordion-toggle-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    pointer-events: auto;
}

/* Harmonika belső tartalma */
.group-content {
    display: none;
    padding: 0;
    overflow-y: auto; /* A rétegek listája itt lesz görgethető */
    flex: 1;
    min-height: 0;
}

.accordion-group.open .group-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Réteg harmonika stílusok */
.layer-accordion {
    border-top: 1px solid #e8e8e8;
}

.layer-accordion:first-child {
    border-top: none;
}

.layer-accordion-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: transparent;
    cursor: grab;
    transition: background-color 0.2s;
}

.layer-accordion-header:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.layer-accordion-header:active {
    cursor: grabbing;
}

.layer-accordion.dragging {
    opacity: 0.5;
    background: #e6f2ff;
    cursor: grabbing;
}

.layer-accordion.open {
    background-color: #F8FAFC;
}

.layer-toggle-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
    pointer-events: auto;
}

.layer-accordion .layer-name {
    flex-grow: 1;
    font-size: 12px;
    line-height: 1.3;
    user-select: none;
}

.layer-accordion .visibility-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.layer-accordion .visibility-toggle img {
    width: 22px;
    height: 22px;
}

.layer-accordion-content {
    padding: 10px 15px;
    background: transparent;
    border-top: 1px solid #eee;
    display: none; /* Alapból rejtett */
    align-items: center;
}

.layer-accordion.open .layer-accordion-content {
    display: flex; /* Megjelenik, ha nyitva van */
}

.opacity-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    flex-grow: 1;
    height: 30px;
    background: #E2E8F0; /* Alapértelmezett, ha a JS még nem futott le */
    cursor: pointer;
    accent-color: #0084C7;
    /* A háttérszín (sáv) méretének és pozíciójának korlátozása */
    background-size: 100% 4px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 2px;
}

/* Visibility specific progress color */
.alpha-slider {
    accent-color: #E2E8F0;
}

.opacity-slider:focus {
    outline: none;
}

/* Track styling - Thinner and cleaner */
.opacity-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: transparent; /* Mobil fix: az input háttere látszódjon */
    border-radius: 2px;
}

/* Visibility specific track color */
.alpha-slider::-webkit-slider-runnable-track {
    background: transparent;
}

.opacity-slider::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #E2E8F0;
    border-radius: 2px;
}

.alpha-slider::-moz-range-track {
    background: #0084C7;
}

/* Thumb styling - Clean white circle with shadow */
.opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #0084C7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    margin-top: -6px; /* Centers thumb vertically: (track_height/2)-(thumb_height/2) */
    transition: transform 0.1s ease;
}

.opacity-slider::-moz-range-thumb {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #0084C7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.opacity-slider::-moz-range-progress {
    background-color: #0084C7;
    height: 4px;
    border-radius: 2px;
}

/* Visibility specific moz-progress color */
.alpha-slider::-moz-range-progress {
    background-color: #E2E8F0;
}

.fade-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Nyomvonalak panel stílusa */
#lines-section.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#lines-section.active::-webkit-scrollbar { display: none; }

#alignments-list, #surfaces-list {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    padding-right: 5px;
}

#alignments-list::-webkit-scrollbar, #surfaces-list::-webkit-scrollbar { width: 8px; }
#alignments-list::-webkit-scrollbar-track, #surfaces-list::-webkit-scrollbar-track { background: #f1f1f1; }
#alignments-list::-webkit-scrollbar-thumb, #surfaces-list::-webkit-scrollbar-thumb { background: #0056b3; border-radius: 4px; }
#alignments-list::-webkit-scrollbar-thumb:hover, #surfaces-list::-webkit-scrollbar-thumb:hover { background: #004494; }

.alignment-item {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.alignment-item:hover { background-color: #f8f9fa; }
.alignment-item.selected {
    background-color: #e6f2ff;
    border-left: 4px solid #0056b3;
}

/* Felületek panel stílusa */
#surfaces-section.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#surfaces-section.active::-webkit-scrollbar { display: none; }

.surface-item {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.surface-item:hover { background-color: #f8f9fa; }
.surface-item.selected {
    background-color: #e6f2ff;
    border-left: 4px solid #0056b3;
}

.search-container {
    position: relative;
    margin-bottom: 10px;
}

#alignment-search, #surface-search, #point-filter-input {
    width: 100%;
    padding: 8px 30px 8px 10px; /* Hely a törlés gombnak */
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Globális fókusz stílus az összes beviteli mezőhöz a keret hibák javítására */
input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 2.5px rgba(0, 86, 179, 0.3) !important;
}

/* Kivétel a csúszkákhoz, ahol a box-shadow nem esztétikus */
input[type="range"]:focus {
    box-shadow: none !important;
}

.clear-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #888;
}

/* Info box stílusa */
.info-box {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    font-size: 0.9em;
}

.force-pointer .maplibregl-canvas {
    cursor: pointer !important;
}

/* Új input sor stílusok (Nyomvonalak panel) */
.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.input-icon {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.input-wrapper-right {
    position: relative;
    flex-grow: 1;
}

.input-wrapper-right input {
    width: 100%;
    padding: 8px 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Hibaüzenet stílusa */
.error-message {
    color: #d9534f;
    font-size: 13px;
    min-height: 20px;
    margin-top: 10px;
    text-align: center;
}

.error-text {
    color: #d9534f !important;
}

.volume-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Pontok panel stílusa */
#points-section.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#points-section.active::-webkit-scrollbar { display: none; }

.points-header {
    display: flex;
    background-color: #f1f1f1;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.points-list {
    flex: 1;
    overflow-y: auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.points-nav {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: #dbe4f0;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.points-nav button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #0056b3;
    padding: 0 10px;
}

.points-nav button:hover {
    color: #003d80;
}

#points-page-label {
    font-weight: bold;
    color: #333;
}

.points-row {
    display: flex;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.points-row:hover { background-color: #f8f9fa; }
.points-row.selected {
    background-color: #e6f2ff;
    border-left: 4px solid #0056b3;
}

.point-cell {
    flex: 1; /* Alapértelmezett 10% */
    text-align: center;
    padding: 8px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    border-right: 1px solid #eee;
    transition: flex 0.3s ease;
}

.points-header .point-cell {
    background-color: #e9ecef;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

/* Kijelölt oszlop fejléce */
.points-header .point-cell.selected-header {
    background-color: #0056b3;
    color: white;
}

.points-footer .column-label {
    font-size: 13px;
}

.lines-footer .column-label {
    font-size: 13px;
}

.points-footer, .lines-footer {
    background-color: #f1f1f1;
    border-top: 2px solid #ccc;
    padding-bottom: 10px;
    margin-top: 10px;
}

.column-label {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #555;
    background-color: transparent;
}

.filter-controls { margin-top: 0; padding: 0 10px; }
#point-filter-select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }

.lines-footer {
    margin-top: 20px;
}

#point-filter-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    color: #6c757d;
}

.coord-content-wrapper {
    flex: 1;
}

#measure-section label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.input-wrapper input {
    width: 100%;
    padding: 8px 10px; /* Eltávolítva a jobb oldali extra padding */
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.input-clear-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    display: none;
}

#btn-measure-coord-delete, #btn-measure-coord-search {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#btn-measure-coord-delete {
    background-color: #dc3545;
    color: white;
}

#btn-measure-coord-delete:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

#btn-measure-coord-search {
    background-color: #0056b3;
    color: white;
}

#btn-measure-coord-search:hover {
    background-color: #004494;
}

#measure-coord-error-msg {
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 14px;
    min-height: 20px;
}

#lines-search-btn {
    margin-top: 20px;
}

#lines-clear-btn {
    width: 100%;
    justify-content: center; /* From original inline style */
    background-color: #dc3545; /* Red for active */
    color: white;
    font-weight: bold; /* Same as measure delete button */
    margin-top: 10px; /* To match the spacing of the measure buttons */
    border: none; /* Override footer-btn border */
    border-radius: 4px; /* Override footer-btn border-radius */
    padding: 10px; /* Override footer-btn padding */
    cursor: pointer; /* Override footer-btn cursor */
}

#lines-clear-btn:disabled {
    background-color: #e9ecef; /* Gray for inactive */
    color: #6c757d;
    cursor: not-allowed;
}

/* --- FELHASZNÁLÓI FIÓK PANEL STÍLUSAI --- */

.user-view {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.3s ease;
}

.user-view.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.profile-pic-wrapper {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-pic-wrapper:hover {
    transform: scale(1.05);
}

.profile-pic-large {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #0056b3;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    background-size: 40px;
    background-position: center;
    background-repeat: no-repeat;
    text-transform: uppercase;
    user-select: none;
}

#user-view-photo .profile-pic-large {
    font-size: 42px;
}

.profile-camera-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    border-radius: 50%;
    padding: 4px;
    width: 24px;
    height: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.profile-name {
    margin-top: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.profile-email {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.profile-role {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.user-panel-top-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    margin: 0 40px;
}

.header-email-centered {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.user-action-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 25px; /* Lekerekített gombok */
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    font-size: 14px;
    color: #333;
}

.user-action-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-action-btn.danger {
    color: #dc3545;
    border-color: #f5c6cb;
    font-weight: bold;
}

.user-action-btn img {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    opacity: 0.7;
}

.user-action-btn.primary {
    justify-content: center;
    border: 1px solid #dadce0;
    font-weight: 500;
    margin-bottom: 20px;
    width: auto;
    padding: 8px 20px;
}

.user-action-btn.danger-filled {
    background-color: #dc3545;
    color: white;
    border: none;
    justify-content: center;
    width: auto;
    padding: 8px 20px;
    margin-bottom: 20px;
}

.user-action-btn.danger-filled img {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.view-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.back-btn img {
    width: 20px;
    height: 20px;
}

.view-title {
    font-size: 16px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #555;
}

.save-btn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.save-btn:hover {
    background-color: #004494;
}

.photo-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.photo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    width: 100px;
}

.delete-account-link {
    display: block;
    text-align: center;
    color: #999;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.profile-separator-line {
    border-top: 1px solid #f0f0f0; /* Az elválasztó vonal */
    margin-top: 20px; /* Távolság a "Fiók törlése" linktől */
    width: 100%;
}

.delete-account-link:hover {
    color: #dc3545;
    text-decoration: underline;
}

.photo-btn:hover {
    background-color: #f8f9fa;
}

.photo-btn img {
    width: 32px;
    height: 32px;
}

/* Mérés panel stílusai */
.measure-controls {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.measure-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    color: #555;
    font-size: 11px;
}

.measure-btn img {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.measure-btn:hover {
    background: #e9ecef;
}

.measure-btn.active {
    background: #e6f2ff;
    border-color: #0056b3;
    color: #0056b3;
}

.measure-btn.active img {
    opacity: 1;
    filter: invert(26%) sepia(68%) saturate(2676%) hue-rotate(201deg) brightness(96%) contrast(101%);
}

/* --- TÉRKÉPEK PANEL --- */
#maps-section {
    display: none; /* Alapból rejtett, az .active class mutatja meg */
}

#maps-section.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 10px;
}
#maps-section.active::-webkit-scrollbar { display: none; }

.maps-toggle-container {
    display: flex;
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 4px;
    flex-shrink: 0;
}

.map-toggle-btn {
    flex: 1;
    padding: 6px 10px;
    border: none;
    background-color: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: background-color 0.2s, color 0.2s;
    font-size: 13px;
}

.map-toggle-btn.active {
    background-color: #ffffff;
    color: #0056b3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.maps-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.maps-panel-header h3 {
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
    color: #333;
    font-family: inherit;
}

.header-btn:hover {
    background: #e9ecef;
}

.storage-panel-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

#add-map-btn,
#discard-maps-btn,
#save-maps-btn,
#ftp-server-btn,
#add-file-btn {
    padding: 5px 8px 5px 5px;
    gap: 4px;
    font-size: 12px;
}

.footer-button-group {
    display: flex;
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.footer-button-group .footer-btn {
    background: transparent;
    border: none;
    border-radius: 0;
    flex: 1;
    justify-content: center;
}

.footer-button-group .footer-btn:hover:not(:disabled) {
    background: #e9ecef;
}

.footer-button-group .vertical-separator {
    height: 20px;
    align-self: center;
    margin: 0;
}

#add-map-btn,
#discard-maps-btn,
#save-maps-btn,
#synology-upload-btn,
#add-file-btn {
    flex: 1;
    justify-content: center;
}

#maps-list-container,
#shared-maps-container {
    flex: 1;
    overflow-y: auto;
    padding: 2px;
    margin: -2px;
    min-height: 120px;
}

#maps-list-container::-webkit-scrollbar,
#shared-maps-container::-webkit-scrollbar { width: 8px; }
#maps-list-container::-webkit-scrollbar-track,
#shared-maps-container::-webkit-scrollbar-track { background: #f1f1f1; }
#maps-list-container::-webkit-scrollbar-thumb,
#shared-maps-container::-webkit-scrollbar-thumb { background: #0056b3; border-radius: 4px; }
#maps-list-container::-webkit-scrollbar-thumb:hover,
#shared-maps-container::-webkit-scrollbar-thumb:hover { background: #004494; }

.maps-panel-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.no-maps-message {
    text-align: center;
    color: #666;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.map-accordion {
    border-bottom: 1px solid #ddd;
    background-color: #fff;
    transition: background-color 0.3s;
    position: relative;
}

.map-accordion.active-map {
    background-color: #e6f2ff;
}

.map-accordion-header {
    display: grid;
    grid-template-columns: 24px 1fr auto 24px;
    align-items: center;
    padding: 8px 5px;
    gap: 10px;
}

.map-accordion-toggle {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    transform: rotate(0deg);
}

.map-accordion.open .map-accordion-toggle {
    transform: rotate(180deg);
}

.map-name-input {
    border: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    font-weight: normal;
    padding: 2px 5px;
    border-radius: 3px;
    width: 100%;
}

.map-name-input:hover {
    border-color: #ccc;
}

.map-name-input:focus {
    outline: none;
    background: white !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 2.5px rgba(0, 86, 179, 0.3) !important;
}

/* Keresőmező alapértelmezett díszítéseinek eltávolítása Chrome-ban a térkép neveknél */
.map-name-input[type="search"]::-webkit-search-decoration,
.map-name-input[type="search"]::-webkit-search-cancel-button,
.map-name-input[type="search"]::-webkit-search-results-button,
.map-name-input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}

.map-status-radio {
    cursor: pointer;
}

.map-accordion-content {
    display: none;
    padding: 10px 5px;
    background-color: #fdfdfd;
}

.map-accordion.open .map-accordion-content {
    display: block;
}

.map-file-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.map-file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background-color: #f1f1f1;
    border-radius: 3px;
    font-size: 12px;
}

.map-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.map-delete-btn:hover {
    opacity: 1;
}

.map-delete-btn img {
    width: 16px;
    height: 16px;
}

.add-file-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding: 0;
}

.add-file-row .footer-btn {
    flex-shrink: 0;
}

.add-file-select {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 0;
}

/* Térkép kiválasztó ikonok és stílusok */
.map-icon-container {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Narancssárga módosítás jelző pont a térkép ikonján */
.map-icon-container.dirty::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 8px;
    height: 8px;
    background-color: #ff9800; /* Orange */
    border-radius: 50%;
    border: 1.5px solid #fff;
    z-index: 5;
}

.map-icon-svg {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s;
}

.map-checkbox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s;
}

.map-accordion-header:hover .map-checkbox,
.map-accordion.selected .map-checkbox {
    opacity: 1;
}

.map-accordion-header:hover .map-icon-svg,
.map-accordion.selected .map-icon-svg {
    opacity: 0;
}

.map-accordion.selected {
    background-color: #e6f2ff !important;
}

.map-accordion.active-map {
    background-color: #e8f5e9; /* Eltérő szín az aktív térképnek (zöldes árnyalat) */
}

@keyframes highlight-new-item {
    from { background-color: #e6f2ff; }
    to { background-color: inherit; }
}

.highlight-new {
    animation: highlight-new-item 2s ease-out;
}

/* --- TÁRHELY PANEL STÍLUSAI --- */

#storage-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 120px;
    padding-right: 2px;
}

#storage-list-container::-webkit-scrollbar { width: 8px; }
#storage-list-container::-webkit-scrollbar-track { background: #f1f1f1; }
#storage-list-container::-webkit-scrollbar-thumb { background: #0056b3; border-radius: 4px; }
#storage-list-container::-webkit-scrollbar-thumb:hover { background: #004494; }

.storage-category-header {
    display: flex;
    align-items: center;
    background-color: #e9ecef;
    padding: 8px 10px;
    background-color: #f8f9fa; /* Enyhe háttér a jobb elválasztásért */
    padding: 10px 12px;
    font-weight: bold;
    font-size: 14px;
    margin: 10px 0px 0;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    color: #333;
}

.accordion-group.open {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.storage-category-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.storage-empty-msg {
    padding: 5px 10px;
    font-style: italic;
    color: #888;
    font-size: 12px;
}

/* New Storage Item Styles matching the video */
.storage-file-item-new {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.2s;
    height: 34px; /* More compact */
}

.storage-file-item-new:hover {
    background-color: #f8f9fa;
}

.storage-file-item-new.selected {
    background-color: #e6f2ff;
}

/* Icon Container */
.storage-file-item-new .file-icon-container {
    width: 24px;
    height: 24px;
    margin-right: 10px; /* Icon slightly more to the left */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.storage-file-item-new .file-icon-draft {
    width: 20x; /* Kisebb ikon */
    height: 20px; /* Kisebb ikon */
    opacity: 0.6;
    transition: opacity 0.2s;
}

.storage-file-item-new .file-checkbox {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s;
}

/* Checkbox visibility logic */
.storage-file-item-new:hover .file-checkbox,
.storage-file-item-new.selected .file-checkbox {
    opacity: 1;
}

.storage-file-item-new:hover .file-icon-draft,
.storage-file-item-new.selected .file-icon-draft {
    opacity: 0;
}

/* Filename */
.storage-file-item-new .file-name-span {
    flex: 1;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

/* Menu Button */
.storage-file-item-new .file-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.2s, background-color 0.2s;
    flex-shrink: 0;
}

.storage-file-item-new:hover .file-menu-btn,
.storage-file-item-new.selected .file-menu-btn {
    opacity: 1;
}

.storage-file-item-new .file-menu-btn:hover {
    background-color: #e0e0e0;
}

.storage-file-item-new .file-menu-btn img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* Context Menu */
.storage-context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 5px 0;
    z-index: 30000;
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.context-menu-item {
    padding: 8px 15px 8px 12px; /* Icon slightly more to the left */
    cursor: pointer;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.1s;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-menu-item img {
    opacity: 0.7;
}

.context-menu-separator {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

/* Storage File Details Inline Panel */
.storage-details-container {
    background-color: #fcfcfc;
    padding: 12px 30px 12px 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    font-size: 13px;
    color: #555;
    animation: fadeIn 0.2s ease-in-out;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.storage-details-row {
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
}

.storage-details-row:last-child {
    margin-bottom: 0;
}

.storage-details-label {
    font-weight: 600;
    min-width: 90px;
    color: #444;
    font-size: 12px;
}

.storage-details-value {
    color: #333;
    flex: 1;
    word-break: break-all;
    font-weight: 400;
}

.storage-details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.storage-details-close:hover {
    opacity: 1;
}

/* Selection Header */
.storage-selection-header {
    display: flex;
    flex-direction: column;
    background-color: #e6f2ff;
    /* A lenti border-bottom helyettesíti a korábbi margót egy elválasztóval */
    border-bottom: 3px solid rgba(0,0,0,0.05);
}

.selection-row-1 {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 13px;
    color: #0056b3;
}

.selection-row-2 {
    display: flex;
    align-items: center;
    padding: 8px 8px;
    cursor: pointer;
    gap: 10px;
    font-size: 13px;
    color: #333;
}

.selection-row-2:hover {
    background-color: rgba(0,0,0,0.02);
}

.selection-row-2 .file-icon-container {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-row-2 .file-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.vertical-separator {
    width: 1px;
    height: 16px;
    background-color: #ccc;
    margin: 0 5px;
}

/* --- MINŐSÍTÉSEK PANEL --- */
.range-slider {
    position: relative;
    height: 30px;
    margin-bottom: 20px;
    margin-top: 30px; /* Hely a buborékoknak */
    user-select: none;
    touch-action: none; /* Megakadályozza a görgetést a csúszka területén vonszolás közben */
    /* Margins handled by inline style in HTML for flex layout */
}

.range-track-bg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0; right: 0;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.range-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: #28a745;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: grab;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    touch-action: none; /* Biztosítja a vízszintes vonszolás zavartalanságát */
}

.range-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}

.range-tooltip {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    font-weight: bold;
}

.rating-mode-selector {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.rating-mode-selector label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rating-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin: -15px 5px 15px 5px;
    font-size: 11px;
    color: #555;
}

/* A slider alatti csúszkák töltsék ki a helyet */
#rating-sliders-container input[type=range] {
    flex: 1;
    width: auto;
}

.color-popup {
    position: fixed; /* Fixed, hogy a viewport-hoz képest pozícionáljuk */
    background: white;
    border: 1px solid #ccc;
    padding: 5px;
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.color-popup button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    text-align: left;
}

.color-popup button:hover {
    background: #e9ecef;
}

/* Zoom szint kijelző stílusa */
.zoom-level-control {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Multi-select list styles */
.multi-select-container {
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 162px; /* 120px lista + ~42px lábléc (padding + gombok) */
}

.multi-select-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 120px;
    background: #fff;
}

/* Ratings Panel flexible layout */
#ratings-process-panel, #ratings-view-panel {
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.form-group-flexible {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 185px; /* 162px konténer + ~23px a "Felmérés:" felirat és margója */
}

.multi-select-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-select-item:hover { background-color: #f8f9fa; }
.multi-select-item.selected { background-color: #e6f2ff; color: #0056b3; font-weight: bold; }

.maplibregl-popup-content {
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    font-family: sans-serif;
    max-width: 300px !important;
}

/* Dragging label style */
.drag-label-popup .maplibregl-popup-content {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #0056b3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    pointer-events: none;
}
.drag-label-popup .maplibregl-popup-tip {
    display: none;
}

.popup-content h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.popup-content p {
    margin: 5px 0;
    font-size: 13px;
}

.popup-content p b {
    color: #333;
}

.rating-popup .rating-details {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.rating-popup .rating-details summary {
    cursor: pointer;
    font-weight: bold;
    color: #0056b3;
    outline: none;
}

.rating-popup .details-content {
    padding-top: 10px;
}

.rating-popup .details-content h4 {
    margin: 10px 0 5px 0;
    font-size: 14px;
    color: #333;
}

.rating-popup .details-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}
.multi-select-footer {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
    flex-shrink: 0; /* A gombok sosem nyomódnak össze */
}

.small-btn { padding: 4px 8px; font-size: 11px; width: auto; }

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-btn:hover { background: #e9ecef; }
.icon-btn img { width: 18px; height: 18px; }
.input-with-icon .add-file-select { flex-grow: 1; width: 100%; }

/* --- FELTÖLTÉS UI --- */
.upload-container {
    background-color: #e6f2ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #0056b3;
    display: flex;
    display: flex; /* Ensure it's a flex container */
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;
}

.upload-file-list::-webkit-scrollbar {
    width: 6px;
}

.upload-file-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.upload-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.upload-header img {
    width: 16px;
    height: 16px;
    /* Kék színűre színezés filterrel */
    filter: invert(26%) sepia(68%) saturate(2676%) hue-rotate(201deg) brightness(96%) contrast(101%);
}

.upload-content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.upload-filename {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    flex: 1;
    min-width: 0;
}

.upload-percent {
    font-weight: bold;
    min-width: 35px;
    text-align: right;
}

.upload-percent.success {
    color: #28a745;
}

.upload-percent.process {
    color: #0056b3;
}

.upload-percent.error-text {
    color: #dc3545;
}

.progress-track {
    width: 100%;
    height: 4px;
    background-color: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.progress-fill {
    height: 100%;
    background-color: #0056b3;
    width: 0%;
    transition: width 0.2s ease;
}

/* Indeterminate (csíkos/mozgó) állapot */
.progress-fill.indeterminate {
    width: 30%;
    animation: indeterminate-slide 1.5s infinite ease-in-out;
}

@keyframes indeterminate-slide {
    0% { margin-left: -30%; }
    100% { margin-left: 100%; }
}

/* Hiba állapot a feltöltésnél */
.upload-container.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.upload-container.error .upload-header img {
    /* Piros színre színezés filterrel */
    filter: invert(16%) sepia(50%) saturate(3000%) hue-rotate(345deg) brightness(90%) contrast(100%);
}

.upload-container.error .progress-fill {
    background-color: #dc3545;
}

/* Rétegek Popup stílusok */
.layers-popup-container {
    max-height: 250px;
    overflow-y: auto;
}

.popup-feature-item {
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

.popup-feature-item:hover {
    background-color: #f0f2f5;
}


/* --- FTP PANEL STÍLUSOK --- */
.ftp-login-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 5px;
}

.ftp-login-container .form-group {
    margin-bottom: 0;
}

.ftp-login-container label {
    font-weight: bold;
    font-size: 13px;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.ftp-login-container input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.ftp-scroll-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.ftp-list-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    gap: 10px;
}

.ftp-list-item:hover { background-color: #f8f9fa; }

.ftp-list-item.selected {
    background-color: #e6f2ff;
    outline: 1px solid #0056b3;
}

.ftp-list-item span {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* FTP specifikus felülbírálás: hover esetén is maradjon látható az ikon */
.storage-file-item-new.ftp-item:hover .file-icon-draft {
    opacity: 0.6 !important;
}

/* --- CUSTOM MODAL STÍLUSOK (minta.png alapján) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 40000;
    backdrop-filter: blur(2px);
}

.modal-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    width: calc(100% - 40px);
    max-width: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.25s ease-out;
}

@media (max-width: 800px) {
    .modal-container {
        width: calc(100% - 80px); /* Kicsit keskenyebb mobilon, hogy ne érjen a széléig */
        max-height: 80vh; /* Magasság korlátozása, hogy látszódjon a háttér alul-felül */
    }
}

/* --- JELSZÓ LÁTHATÓSÁG KAPCSOLÓ STÍLUSAI --- */
.password-input-wrapper {
    position: relative;
    display: flex; /* Hogy az input és a gomb vízszintesen igazodjon */
    align-items: center;
    width: 100%;
}

.password-input-wrapper input {
    flex-grow: 1; /* Az input foglalja el a rendelkezésre álló helyet */
    padding-right: 40px; /* Hely a kapcsoló gombnak */
}

.password-toggle-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Biztosítja, hogy az input felett legyen */
}

.password-toggle-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.password-toggle-btn:hover img {
    opacity: 1;
}

@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: #1F2937;
    font-weight: bold;
}

.modal-brand-logo-wrap {
    text-align: center;
    margin-bottom: 15px;
}

.modal-brand-logo {
    max-width: 160px;
    height: auto;
    width: 100%;
}

.modal-container.consent-modal-active .modal-header h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.modal-body {
    overflow-y: auto;
    margin-bottom: 25px;
    padding: 4px; /* Hely biztosítása minden oldalon a kijelölési árnyéknak */
    margin: -4px -4px 21px -4px; /* Negatív margó a vizuális eltolódás ellen a padding kompenzálására */
}

.modal-container.consent-modal-active .modal-body {
    margin-bottom: 36px;
}

.modal-body p {
    margin: 0;
    font-size: 16px;
    color: #6c757d;
    line-height: 1.5;
}

.modal-body .consent-modal-intro {
    margin: 0 0 10px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 12px;
}

.modal-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.modal-btn.primary { background-color: #0056b3; color: white; }
.modal-btn.primary.danger { background-color: #ff0000; }
.modal-btn.secondary { background-color: white; color: #333; border: 1px solid #ddd; }
.modal-btn.secondary:hover { background-color: #f8f9fa; }

#modal-confirm-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.modal-btn.primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.consent-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.consent-modal-item {
    padding: 14px 0;
    background: none;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #e8e8e8;
}

.consent-modal-item:first-child {
    padding-top: 0;
}

.consent-modal-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.consent-modal-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.consent-modal-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: calc((1.5em - 18px) / 2);
    cursor: pointer;
}

.consent-modal-label-text {
    line-height: 1.5;
    color: #555;
}

.consent-modal-label-text a {
    color: #0056b3;
    text-decoration: none;
}

.consent-modal-label-text a:hover {
    text-decoration: underline;
}

.consent-modal-meta {
    font-size: 13px;
    color: #666;
}

.consent-modal-error {
    margin: 12px 0 0;
    font-size: 13px;
    color: #c0392b;
}

.consent-modal-confirm {
    padding: 12px 24px;
    border-radius: 8px;
}

.consent-modal-cancel {
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 12px 20px;
    border-radius: 8px;
    color: #888;
    font-weight: 500;
    box-shadow: none;
}

.consent-modal-cancel:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #666;
}

/* --- ALKALMAZÁS BLOKKOLÓ ÉS SPINNER --- */
#app-blocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 249, 250, 0.85);
    z-index: 20000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Tooltip for copy action */
.copy-tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    white-space: nowrap;
}

/* Jogi linkek a profil panel alján */
.legal-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding: 10px 0 0 0;
    border-top: none;
    gap: 8px;
    font-size: 13px;
}

.legal-links a {
    color: #666; /* Lágyabb szín a szöveges linkekhez */
    text-decoration: none;
}

.legal-links a:hover {
    text-decoration: underline;
}

.spinner {
    width: 375px; /* Megnövelt szélesség a felirat miatt (2.5x magasság) */
    height: 150px;
    max-width: 90%; /* A térkép szélességéhez igazodva */
    max-height: 90%; /* A térkép magasságához igazodva */
    object-fit: contain;
}

/* --- RESPONSIVE BEÁLLÍTÁSOK SZŰK KIJELZŐHÖZ --- */
@media (max-width: 800px) {
    /* Lábléc elemek elrejtése */
    .footer-logo, 
    .footer-right {
        display: none !important;
    }

    /* Térképen lévő gomb megjelenítése */
    #user-btn-map {
        display: block !important;
    }

    /* Panelek overlay módba állítása */
    .side-panel {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: 100%;
        border-radius: 15px 15px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 20001;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        margin: 0;
    }

    .side-panel.panel-open {
        transform: translateY(0);
        width: 100% !important;
    }

    .side-panel.panel-collapsed {
        transform: translateY(100%) !important;
        width: 100% !important;
    }

    /* Csak bizonyos eszközöknél mutatjuk a foggantyút és a gombot */
    .side-panel.has-mobile-drawer .mobile-drag-handle {
        display: flex;
    }

    .side-panel.has-mobile-drawer.panel-collapsed .mobile-panel-toggle {
        display: flex;
    }

    .side-panel.panel-collapsed .mobile-drag-handle {
        display: none;
    }

    /* Láthatósági ikonok kényszerítése mobilon a Térképek panelen */
    .map-file-row .map-delete-btn img {
        opacity: 1 !important;
    }

    /* Gombok lejjebb tolása, hogy a fogantyú alá kerüljenek */
    .side-panel.has-mobile-drawer .panel-header-actions, 
    .side-panel.has-mobile-drawer .panel-info-btn, 
    .side-panel.has-mobile-drawer .panel-close-btn {
        top: 45px !important;
    }

    /* Belső tartalom térközének csökkentése */
    .side-panel.has-mobile-drawer .panel-content {
        padding-top: 50px !important;
    }

    /* Információs ablak hézagának eltüntetése összecsukva */
    .info-window:not(.visible) {
        display: none !important;
    }

    /* Ne méretezze át a térképet, ha nyílik a panel */
    #main-content {
        position: relative;
        display: block; /* Flex helyett block, hogy az abszolút panelek jól viselkedjenek */
        padding: 0 !important; /* Panel a sávok tetejétől induljon */
    }

    /* Lábléc konténerek margóinak és közeinek törlése a széltől-szélig hatáshoz */
    .footer-main {
        padding: 0 !important;
    }

    .footer-left {
        gap: 0 !important;
    }

    /* MapLibre vezérlők (pl. Teljes Terjedelem) eltolása a profil gomb alá */
    .maplibregl-ctrl-top-right {
        margin-top: 50px !important;
    }

    #carousel {
        justify-content: flex-start;
        padding: 5px 20px;
    }

    /* A Teljes terjedelem gomb méretének igazítása a profil gombhoz (40px) */
    .maplibregl-ctrl-group button {
        width: 40px !important;
        height: 40px !important;
    }

    .maplibregl-ctrl-group button img {
        width: 24px !important;
        height: 24px !important;
    }

    /* Attribútumok ablak tördelése mobil eszközökön */
    .custom-attribution-links {
        white-space: normal !important;
        width: 200px;
        text-align: right;
        padding: 5px 35px 5px 12px !important;
        line-height: 1.5;
        border-radius: 10px 0 0 10px;
    }

    .opacity-slider::-webkit-slider-thumb {
        height: 20px;
        width: 20px;
        margin-top: -6.5px; /* (track_height/2)-(thumb_height/2) = (4/2)-(17/2) */
    }

    .opacity-slider::-moz-range-thumb {
        height: 20px;
        width: 20px;
    }
}

/* Segédosztály az UI blokkolásához feltöltés vagy kritikus folyamatok közben */
.ui-disabled {
    pointer-events: none !important;
    opacity: 0.5 !important;
}

/* --- Policy Page Common Styles (BFSZ, Adatvédelem, Impresszum) --- */
body.policy-page { /* Add this class to the body of policy pages */
    background: #f0f2f5;
    padding: 40px 20px;
    overflow-y: auto !important;
    height: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.policy-container { 
    background: white; 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    line-height: 1.6; 
    color: #333;
}
.policy-container h1 { color: #0056b3; border-bottom: 2px solid #0056b3; padding-bottom: 10px; font-size: 24px; }
.policy-container h2 { color: #000; margin-top: 35px; font-size: 20px; border-left: 4px solid #0056b3; padding-left: 15px; }
.policy-container h3 { color: #0056b3; margin-top: 25px; font-size: 18px; }
.policy-container h4 { color: #333; margin-top: 20px; font-size: 16px; }
.policy-container p { margin-bottom: 15px; }
.policy-container ul { padding-left: 20px; margin-bottom: 15px; }
.policy-container li { margin-bottom: 8px; }
.policy-container .back-link { display: inline-block; margin-bottom: 25px; color: #0056b3; text-decoration: none; font-weight: bold; }
.policy-container .back-link:hover { text-decoration: underline; }
.policy-container hr { border: 0; border-top: 1px solid #eee; margin: 30px 0; }
.policy-container strong { color: #222; }

.policy-footer { /* For BFSZ specific footer */
    margin-top: 30px;
    font-size: 13px;
    color: #666;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.legal-links-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px; /* Gap between links */
    flex-grow: 1; /* Allow content to grow */
}

.legal-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.legal-nav-btn img {
    width: 20px; /* Adjust size as needed */
    height: 20px;
    opacity: 0.7;
}

.legal-nav-btn:hover img {
    opacity: 1;
}

/* Custom Attribution Control */
.custom-attribution-ctrl {
    margin: 0 10px 10px 0;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    pointer-events: auto;
}

.custom-attribution-button {
    width: 24px;
    height: 24px;
    background-color: #ffffff !important;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: serif;
    font-weight: bold;
    font-style: italic;
    font-size: 16px;
    color: #333;
    z-index: 2;
    opacity: 1 !important;
    transition: background-color 0.2s;
}

.custom-attribution-button:hover {
    background-color: #f2f2f2 !important;
    opacity: 1 !important;
}

.custom-attribution-links {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 3px 30px 3px 12px;
    border-radius: 15px;
    font-size: 11px;
    margin-right: -24px;
    white-space: nowrap;
    display: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 1;
}

.custom-attribution-ctrl.expanded .custom-attribution-links {
    display: block;
}

.custom-attribution-links a { color: #0056b3; text-decoration: none; }
.custom-attribution-links a:hover { text-decoration: underline; }

/* Biztosítjuk, hogy a térkép vezérlők (Saját pozíció, Teljes terjedelem, Attribútumok) az összevetés felett maradjanak */
.maplibregl-control-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 11 !important; /* Magasabb, mint az összevetés container 10-es z-indexe */
}

/* Összevetés panel: Felcserélés gomb magasságának csökkentése */
#compare-swap-btn {
    padding: 8px 15px; /* Kisebb padding a magasság csökkentéséhez */
}

/* Összevetés panel: Csúszka fogójának átlátszóvá tétele */
.maplibregl-compare-slider-button {
    background-color: transparent !important; /* Átlátszó háttér */
}
