/* =========================================================
   1. FONTS & ROOT VARIABLES
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');

:root {
    --color-main: #4db691;
    --color-main-hover: #5cd9ad;
    --color-bg: #202228;
    --color-red: #ff4242;
    --color-red-hover: #ff5c5c;
    --color-1: #25272e;
    --color-2: #2e4940;
}

/* =========================================================
   2. BASE & RESETS
   ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    font-family: 'Titillium Web', sans-serif;
}

html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background-color: #1a1c21;
    color: white;
}

a {
    text-decoration: none;
}

/* Hide Spinners on Number Inputs */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* =========================================================
   3. UTILITIES & SHARED CLASSES
   ========================================================= */
.glass { 
    background: rgba(32, 34, 40, 0.85); 
    backdrop-filter: blur(16px); 
    border: 1px solid rgba(77, 182, 145, 0.2); 
}

.mb-8 { margin-bottom: 2rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem; align-items: stretch; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-1 { grid-column: span 1 / span 1; }

/* =========================================================
   4. TYPOGRAPHY & GLOBAL ICONS
   ========================================================= */
.nav-text {
    display: none !important; /* Hidden globally to favor icons */
}

.nav-icon {
    display: block !important;
    width: 22px;
    height: 22px;
}

.mobile-only-icon {
    display: none; /* Only visible on mobile devices */
}

/* =========================================================
   5. BUTTONS
   ========================================================= */
.btn {
    padding: 0.625rem 1.5rem;
    border-radius: 1rem;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-main);
    color: var(--color-bg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover { background-color: var(--color-main-hover); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-main);
    color: white;
}
.btn-outline:hover { border-color: #888; }

.btn-submit {
    width: 100%;
    padding: 1.25rem;
    background-color: var(--color-main);
    color: black;
    border-radius: 1rem;
    font-weight: 900;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: 0.3s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-submit:hover { background-color: var(--color-main-hover); }

.btn-reset {
    width: 100%;
    padding: 1rem 0 0 0;
    font-size: 10px;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}
.btn-reset:hover { color: var(--color-main-hover); }

.btn-action {
    padding: 0.625rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-action svg { width: 1rem; height: 1rem; }

.btn-edit { background-color: var(--color-main); color: black; }
.btn-edit:hover { background-color: var(--color-main-hover); }

.btn-delete { background-color: var(--color-red); color: white; }
.btn-delete:hover { background-color: var(--color-red-hover); color: white; }

.btn-icon-outline {
    background-color: rgba(77, 182, 145, 0.1);
    color: var(--color-main);
    border: 1px solid rgba(77, 182, 145, 0.3);
    padding: 1.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.btn-icon-outline:hover { background-color: var(--color-main); color: black; }
.btn-icon-outline svg { width: 1.5rem; height: 1.5rem; }

/* =========================================================
   6. MAP & LEAFLET OVERRIDES
   ========================================================= */
#map { 
    position: absolute; 
    inset: 0; 
    z-index: 1; 
    background: #000; 
}

.picking-mode #map { cursor: crosshair !important; }

.leaflet-popup-content-wrapper { 
    background: var(--color-1) !important; 
    backdrop-filter: blur(12px); 
    color: white !important; 
    border: 1px solid var(--color-main); 
    border-radius: 1.5rem !important; 
    padding: 0 !important; 
    overflow: hidden; 
    width: 320px !important; 
}

.leaflet-popup-tip { background: var(--color-1) !important; }
.leaflet-popup-content { margin: 0 !important; width: 320px !important; }

.popup-content { padding: 1.5rem; text-align: left; }
.popup-title { font-size: 1.2em; font-weight: bold; text-transform: uppercase; letter-spacing: -0.05em; color: white; margin-bottom: 0.25rem; line-height: 1.2; }
.popup-distance { margin-top: 0.5rem; display: inline-block; padding: 0.25rem 0.5rem; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--color-main); border-radius: 0.25rem; font-weight: bold; font-style: italic; font-family: monospace; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }

.tx-icon-png { 
    width: 32px; 
    height: 32px; 
    background: url('/img_assets/tx.png') no-repeat center;
    background-size: contain; 
    transition: all 0.3s ease;
}

.tx-active .tx-icon-png { 
    background: url('/img_assets/tx-selected.png') no-repeat center;
    background-size: contain; 
}

.antenna-marker { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: rgba(255, 255, 255, 0.2); 
    border: 2px solid white; 
    border-radius: 50%; 
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); 
    cursor: grab; 
}

/* Floating Cancel Picking Button */
.btn-cancel-picking {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 50px;
    z-index: 9999;
    display: none; /* Shown via JS class */
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-cancel-picking:hover { background: var(--color-red-hover); border-color: var(--color-red-hover); }
body.picking-mode .btn-cancel-picking { display: flex; }

/* =========================================================
   7. MAIN NAVIGATION
   ========================================================= */
.main-nav {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.logo-container { display: flex; }
.nav-logo { height: 2.5rem; width: auto; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Nav Icon Buttons Constraint */
.nav-actions .btn {
    padding: 10px !important;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px; 
}

.nav-actions .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
    cursor: pointer;
}
.nav-actions .nav-link:hover { color: var(--color-main); }

/* =========================================================
   8. FILTER PANEL
   ========================================================= */
.filter-panel {
    position: fixed;
    top: 7rem;
    left: 1.5rem;
    z-index: 1900;
    width: 20rem;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: left;
    box-sizing: border-box;
    margin-top: 1.5rem;
}

#filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    transition: margin-bottom 0.3s ease;
}

.panel-title {
    font-size: 10px;
    font-weight: bold;
    color: var(--color-main);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin: 0;
}

#filter-content {
    max-height: 800px; 
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-input { 
    width: 100%;
    font-family: 'Titillium Web', sans-serif; 
    background: rgba(0,0,0,0.3); 
    border: 1px solid rgba(77, 182, 145, 0.2); 
    padding: 0.75rem; 
    border-radius: 0.75rem;
    font-size: 11px; 
    color: white; 
    outline: none; 
    transition: 0.3s; 
    box-sizing: border-box;
}
.filter-input:focus { border-color: var(--color-main); }

/* =========================================================
   9. LAYER BOX
   ========================================================= */
.layer-box {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 2000;
    display: flex;
    padding: 0.25rem;
    background-color: var(--color-bg);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    gap: 0.3rem;
}

.btn-layer {
    padding: 0.75rem 1.5rem;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    background: transparent;
    color: #64748b;
}
.btn-layer.active { background-color: rgba(255, 255, 255, 0.1); color: var(--color-main); }
.btn-layer:hover:not(.active) { color: #64748b; background-color: var(--color-1); }

/* =========================================================
   10. SIDEBAR
   ========================================================= */
#sidebar { 
    position: fixed; 
    top: 0; 
    right: 0; 
    bottom: 0; 
    width: 33vw; 
    z-index: 4000; 
    transform: translateX(100%); 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    background: var(--color-1); 
    border-left: 1px solid rgba(255, 255, 255, 0.05); 
    display: flex;
    flex-direction: column;
    text-align: left;
}

#sidebar.open { transform: translateX(0); }

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--color-bg);
}

.sidebar-title {
    font-weight: bold;
    color: var(--color-main);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin: 0;
}

.btn-close, .btn-modal-close, .viewer-close {
    color: #888;
    transition: 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.btn-close { font-size: 2.25rem; font-weight: 300; line-height: 1; color: white; }
.btn-modal-close { margin-left: auto; display: flex; }
.btn-close:hover, .btn-modal-close:hover, .viewer-close:hover { color: var(--color-red); }

#sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2.5rem;
}
#sidebar-content::-webkit-scrollbar { width: 4px; }
#sidebar-content::-webkit-scrollbar-thumb { background: var(--color-2); border-radius: 10px; }

/* Sidebar Internal Components */
.tx-header-wrap { display: flex; align-items: center; justify-content: space-between; }
.tx-title { font-size: 2rem; font-weight: bold; text-transform: uppercase; letter-spacing: -0.05em; line-height: 0.85; color: white; text-align: left; word-break: break-word; margin: 0; }
.tx-actions { display: flex; gap: 0.5rem; flex-shrink: 0; padding-top: 0.25rem; }
.tx-meta { font-family: monospace; font-size: 11px; font-weight: bold; margin-bottom: 2.5rem; margin-top: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tx-coord-link { padding: 0.25rem 0.5rem; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--color-main); border-radius: 0.25rem; transition: 0.3s; text-decoration: none; }
.tx-coord-link:hover { background-color: var(--color-main); color: black; }
.tx-dist-badge { padding: 0.25rem 0.5rem; background-color: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--color-main); border-radius: 0.25rem; }

/* Sidebar Carousel */
.carousel-container { position: relative; width: 100%; height: 380px; border-radius: 1.5rem; overflow: hidden; border: 1px solid rgba(77, 182, 145, 0.1); margin-bottom: 1.5rem; }
.carousel-slide { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: opacity 0.3s; }
.carousel-container.group .btn-action { position: absolute; top: 1rem; right: 1rem; z-index: 110; opacity: 0; transition: opacity 0.3s; }
.carousel-container.group:hover .btn-action { opacity: 1; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.7); color: white; border: none; cursor: pointer; z-index: 100; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: 0.2s; }
.nav-btn:hover { background: var(--color-main-hover); }
.btn-prev { left: 20px; }
.btn-next { right: 20px; }

/* Sidebar Stations */
.btn-add-card { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 80px; background-color: transparent; border: 2px dashed rgba(255, 255, 255, 0.1); border-radius: 1.5rem; cursor: pointer; transition: 0.3s; font-weight: bold; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #888; margin-bottom: 2.5rem; text-decoration: none; box-sizing: border-box; }
.btn-add-card:hover { background-color: rgba(255, 255, 255, 0.05); color: var(--color-main); }
.btn-add-card.lg { min-height: 100px; margin-bottom: 0; }
.stations-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.stations-title { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.4em; color: #888; margin: 0; }
.stations-line { flex: 1; height: 1px; background-color: rgba(255, 255, 255, 0.1); }
.stations-list { display: flex; flex-direction: column; gap: 1rem; }
.station-card { background-color: #2b3a35; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 1.5rem; display: flex; align-items: stretch; position: relative; overflow: hidden; width: 100%; min-height: 100px; transition: 0.3s; box-sizing: border-box; }
.station-actions { position: absolute; top: 0.75rem; right: 0.75rem; display: flex; gap: 0.5rem; opacity: 0; transition: opacity 0.3s; z-index: 20; }
.station-card:hover .station-actions { opacity: 1; }
.station-logo-wrap { width: 6rem; flex-shrink: 0; background-color: var(--color-2); display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(255, 255, 255, 0.1); padding: 0.75rem 0.5rem; box-sizing: border-box; }
.station-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.station-name-wrap { flex-grow: 1; width: auto; display: flex; align-items: center; padding: 0 1.25rem; border-right: 1px solid rgba(255, 255, 255, 0.1); min-width: 0; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.station-name-btn { font-size: 1rem; font-weight: bold; color: white; transition: 0.3s; text-align: left; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: none; cursor: pointer; padding: 0; width: 100%; }
.station-name-btn:hover { color: var(--color-main); }
.station-pi { width: 4rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-right: 1px solid rgba(255, 255, 255, 0.1); background-color: var(--color-2); font-family: monospace; font-size: 0.875rem; font-weight: bold; color: var(--color-main); text-transform: uppercase; letter-spacing: -0.05em; text-align: center; box-sizing: border-box; }
.station-details { width: 100px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 1rem; border-right: 1px solid rgba(255, 255, 255, 0.1); text-align: center; box-sizing: border-box; }
.station-detail-item { font-size: 13px; font-weight: bold; color: #c9c9c9; margin-bottom: 0.375rem; line-height: 1; text-align: center; }
.station-detail-item:last-child { margin-bottom: 0; }
.station-freq-wrap { width: 6rem; flex-shrink: 0; flex-grow: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0; background-color: rgba(0, 0, 0, 0.4); box-sizing: border-box; }
.station-freq { font-size: 1.5rem; font-weight: bold; color: var(--color-main); line-height: 1; letter-spacing: -0.05em; margin: 0; }
.station-unit { font-size: 10px; font-weight: bold; color: #888; margin-top: 0.375rem; letter-spacing: 0.1em; text-align: center; }
.frequency-unit { display: flex; flex-direction: column; }

/* =========================================================
   11. MODALS & FORMS
   ========================================================= */
.modal { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(10, 11, 14, 0.9); 
    backdrop-filter: blur(12px); 
    z-index: 5000; 
    align-items: center; 
    justify-content: center; 
    padding: 1.5rem;
}
.modal.active { display: flex; }

.modal-content {
    position: relative;
    background-color: var(--color-bg);
    border: 1px solid rgba(77, 182, 145, 0.3);
    padding: 3rem;
    border-radius: 3.5rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: left;
    box-sizing: border-box;
}
.modal-content.lg { max-width: 32rem; }
.modal-content.xl { max-width: 42rem; }

.modal-title {
    font-weight: 900;
    color: var(--color-main);
    margin-top: 0;
    margin-bottom: 2.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 1.125rem;
    text-align: center;
}

.login_register-error {
    display: none;
    color: var(--color-red);
    background: rgba(255, 66, 66, 0.1);
    margin-bottom: 1rem;
    padding: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Modal Forms */
.form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    background-color: var(--color-1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 1rem;
    color: white;
    outline: none;
    box-sizing: border-box;
    transition: 0.3s;
    font-size: 1rem;
}
.form-input.text-xs, .form-select.text-xs, .form-textarea.text-xs { font-size: 0.75rem; }
.form-input.mono { font-family: monospace; }
.form-textarea { height: 6rem; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--color-main); }

.form-file { width: 100%; font-size: 0.75rem; color: #888; display: block; }
.form-file::file-selector-button {
    background-color: rgba(77, 182, 145, 0.1);
    color: var(--color-main);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    margin-right: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.form-file::file-selector-button:hover { background-color: rgba(77, 182, 145, 0.2); }

/* Admin Modal Specifics */
.admin-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.admin-list::-webkit-scrollbar { width: 4px; }
.admin-list::-webkit-scrollbar-thumb { background: var(--color-2); border-radius: 10px; }
.admin-user-row { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; background-color: rgba(255, 255, 255, 0.05); border-radius: 1rem; border: 1px solid rgba(255, 255, 255, 0.05); transition: 0.3s; }
.admin-user-row:hover { background-color: rgba(255, 255, 255, 0.08); }
.admin-user-name { color: white; font-weight: bold; font-size: 0.875rem; margin-bottom: 0.25rem; }
.admin-user-id { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.2em; }
.admin-select { background-color: var(--color-1); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--color-main); font-size: 10px; font-weight: bold; text-transform: uppercase; padding: 0.75rem; border-radius: 0.75rem; outline: none; cursor: pointer; transition: 0.3s; }
.admin-select:focus { border-color: var(--color-main); }

/* Full Screen Photo Viewer */
#photoViewer { display: none; position: fixed; inset: 0; z-index: 6000; background: rgba(0, 0, 0, 0.98); flex-direction: column; align-items: center; justify-content: center; cursor: default !important; padding: 2.5rem; }
#photoViewer img { max-width: 85%; max-height: 75%; border-radius: 15px; cursor: default !important; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.viewer-close { position: absolute; top: 2.5rem; right: 2.5rem; font-size: 3rem; font-weight: 300; line-height: 1; }
.viewer-meta { margin-top: 2rem; text-align: center; max-width: 42rem; }
.viewer-author { color: var(--color-main); font-weight: bold; text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.875rem; margin-bottom: 0.25rem; }
.viewer-date { color: rgba(255, 255, 255, 0.4); font-size: 16px; font-family: monospace; text-transform: uppercase; margin-bottom: 1rem; letter-spacing: 0.1em; }
.viewer-desc { color: rgba(255, 255, 255, 0.8); font-size: 0.875rem; line-height: 1.6; font-style: italic; border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 1rem; }
.full-viewer-btn { position: absolute; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.5); font-size: 3.75rem; padding: 1rem; background: none; border: none; cursor: pointer; transition: 0.3s; }
.full-viewer-btn:hover { color: white; }
.full-viewer-btn.prev { left: 2.5rem; }
.full-viewer-btn.next { right: 2.5rem; }

/* =========================================================
   12. MOBILE RESPONSIVE OVERRIDES
   ========================================================= */
@media (max-width: 768px) {
    
    /* Nav Bar (Top Pills) */
    .main-nav {
        width: auto !important; 
        left: 10px !important;
        right: 10px !important;
        top: 1rem !important; 
        z-index: 2000 !important; 
    }

    /* Filter Panel (Collapsible Bottom) */
    .filter-panel {
        width: auto !important; 
        left: 10px !important;
        right: 10px !important;
        top: 5.5rem !important; 
        z-index: 1900 !important; 
    }

    #filter-header {
        cursor: pointer;
        user-select: none;
    }

    #filter-header.mobile-collapsed {
        margin-bottom: 0;
    }

    .mobile-only-icon {
        display: block;   
        transition: transform 0.3s ease;
    }

    .mobile-only-icon.rotated {
        transform: rotate(-180deg);
    }

    #filter-content.mobile-collapsed {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        pointer-events: none;
    }

    #sidebar {
        background: transparent !important; 
        border: none !important;
        box-shadow: none !important;
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        height: 65vh; 
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); 
        z-index: 4000; 
        display: flex;
        flex-direction: column;
    }

    .sidebar-header {
        position: relative;
        padding: 1.75rem 1.5rem 1rem 1.5rem !important; 
        background-color: var(--color-bg) !important;
        /*border-radius: 24px 24px 0 0 !important;*/
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
    }

    .sidebar-header::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 10px;
    } */

    /* Content matches the header background for a seamless look */
    #sidebar-content {
        background-color: var(--color-bg) !important;
        padding-top: 1rem !important;
        padding-bottom: 5rem !important; 
    }

    .layer-box {
        left: 10px !important;
        bottom: 1rem !important;
    }
}