/* ======================================
   Theme System - CSS Custom Properties
   ====================================== */

:root {
    /* Dark Mode (Default) */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #ebebeb;
    --text-heading: #3aa1ff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #8a8a8a;
    --border-color: #404040;
    --sidebar-bg: rgba(45, 45, 45, 0.98);
    --sidebar-bg-gradient: linear-gradient(135deg, rgba(45, 45, 45, 0.98) 0%, rgba(35, 35, 35, 0.98) 100%);
    --info-box-bg: #2d3e50;
    --info-box-bg-gradient: linear-gradient(135deg, #2d3e50 0%, #1e2a3a 100%);
    --info-box-text: #e0e0e0;
    --input-bg: #3a3a3a;
    --input-border: #505050;
    --button-bg: #404040;
    --button-hover: #505050;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* Light Mode */
body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e0e0e0;
    --text-primary: #212121;
    --text-heading: #1976D2;
    --text-secondary: #616161;
    --text-tertiary: #9e9e9e;
    --border-color: #e0e0e0;
    --sidebar-bg: rgba(255, 255, 255, 0.98);
    --sidebar-bg-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.98) 100%);
    --info-box-bg: #e3f2fd;
    --info-box-bg-gradient: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    --info-box-text: #424242;
    --input-bg: #ffffff;
    --input-border: #d0d0d0;
    --button-bg: #f0f0f0;
    --button-hover: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ======================================
   MAP.PHP INLINE STYLE REPLACEMENTS
   ====================================== */

/* Welcome Section */
.welcome-title {
    color: #1976D2;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Info Box Component (Base) */
.info-box {
    padding: 22px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid;
    transition: all 0.3s ease;
}

.info-box:hover {
    transform: translateY(-2px);
}

/* Info Box Variants - Blue (default/info) */
.info-box--blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #2196F3;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.15);
}

.info-box--blue:hover {
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.25);
}

/* Info Box Variants - Orange (support/donation) */
.info-box--orange {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: #FF9800;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.15);
}

.info-box--orange:hover {
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.25);
}

/* Info Box Variants - Purple (community) */
.info-box--purple {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-left-color: #9C27B0;
    box-shadow: 0 3px 10px rgba(156, 39, 176, 0.15);
}

.info-box--purple:hover {
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.25);
}

/* Info Box Variants - Green (thanks/success) */
.info-box--green {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left-color: #4CAF50;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.15);
    padding: 18px;
}

/* Info Box Variants - Red (danger/devtools) */
.info-box--red {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left-color: #e74c3c;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.15);
}

.info-box--red:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.25);
}

/* Info Box Variants - Yellow (what's new/changes) */
.info-box--yellow {
    background: #f0f8ff;
    border-left-color: #4a90e2;
    border-width: 2px;
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.15);
}

.info-box--yellow:hover {
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.25);
}

/* Info Box Alignment */
.info-box--center {
    text-align: center;
}

/* Info Box Title */
.info-box__title {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
}

.info-box__title .material-symbols-outlined {
    font-size: 24px;
}

.info-box__title--center {
    justify-content: center;
}

/* Color variants for titles */
.info-box--blue .info-box__title,
.sidebar-pane .info-box--blue .info-box__title {
    color: #1976D2;
}

.info-box--orange .info-box__title,
.sidebar-pane .info-box--orange .info-box__title {
    color: #F57C00;
}

.info-box--purple .info-box__title,
.sidebar-pane .info-box--purple .info-box__title {
    color: #7B1FA2;
}

.info-box--green .info-box__title,
.sidebar-pane .info-box--green .info-box__title {
    color: #1b5e20;
}

.info-box--red .info-box__title,
.sidebar-pane .info-box--red .info-box__title {
    color: #c0392b;
}

.info-box--yellow .info-box__title,
.sidebar-pane .info-box--yellow .info-box__title {
    color: #2c5aa0;
}

/* Info Box Text */
.info-box__text {
    margin: 12px 0 18px 0;
    font-size: 14px;
    line-height: 1.6;
}

.info-box__text--small {
    font-size: 13px;
    margin: 10px 0 14px 0;
    line-height: 1.5;
}

.info-box--green .info-box__text {
    margin: 5px 0;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.6;
}

/* Color variants for text */
.info-box--blue .info-box__text,
.sidebar-pane .info-box--blue .info-box__text {
    color: #212121;
}

.info-box--orange .info-box__text,
.sidebar-pane .info-box--orange .info-box__text {
    color: #212121;
}

.info-box--purple .info-box__text,
.sidebar-pane .info-box--purple .info-box__text {
    color: #212121;
}

.info-box--green .info-box__text,
.sidebar-pane .info-box--green .info-box__text {
    color: #1b5e20;
}

.info-box--red .info-box__text,
.sidebar-pane .info-box--red .info-box__text {
    color: #212121;
}

.info-box--yellow .info-box__text,
.sidebar-pane .info-box--yellow .info-box__text {
    color: #212121;
}

/* Info Box Highlight/Warning Badge */
.info-box__highlight {
    display: inline-block;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #E65100;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    border-left: 3px solid #FF9800;
    margin: 8px 0;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.15);
}

/* Info Box List */
.info-box__list,
.sidebar-pane .info-box__list {
    margin: 0;
    padding-left: 22px;
    line-height: 1.4;
    color: #424242;
}

.info-box--blue .info-box__list strong,
.sidebar-pane .info-box--blue .info-box__list strong {
    color: #1976D2;
}

.info-box--blue .info-box__list .material-symbols-outlined,
.sidebar-pane .info-box--blue .info-box__list .material-symbols-outlined {
    font-size: 16px;
    vertical-align: middle;
    color: #2196F3;
}

/* Info Box Special Elements */
.info-box--orange img[type="image"] {
    transition: transform 0.3s ease;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.info-box--orange img[type="image"]:hover {
    transform: scale(1.08);
}

.info-box--green .info-box__text .material-symbols-outlined {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 6px;
    color: #4CAF50;
}

/* Discord Link (Community Box specific) */
.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(88, 101, 242, 0.3);
}

.discord-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4);
}

.discord-icon {
    width: 22px;
    height: 22px;
    background-color: white;
}

/* Version Info */
.version-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    color: #666;
    font-size: 14px;
}

.version-info p {
    margin: 5px 0;
}

.version-info .clickable {
    cursor: pointer;
    transition: color 0.2s;
}

.version-info .clickable:hover {
    color: #2196F3;
}

.version-info .disclaimer {
    margin: 15px 0 5px 0;
    font-style: italic;
    font-size: 12px;
}

/* Legend Section */
.legend-divider {
    border: none;
    border-top: 2px solid rgba(33, 150, 243, 0.3);
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(33, 150, 243, 0.2);
}

.legend-section {
    line-height: 1.6;
}

.legend-section-title {
    color: #2196F3;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: 0.5px;
}

.legend-subsection-title {
    color: #2196F3;
    font-size: 17px;
    font-weight: 600;
    margin: 15px 0 10px 0;
}

/* Map Controls */
.map-controls-group {
    display: flex;
    gap: 10px;
}

.map-select-wrapper {
    position: relative;
}

.map-clear-button {
    display: none;
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    z-index: 10;
}

/* Community Resources Section */
.resources-section-title {
    margin-bottom: 15px;
    color: #2196F3;
}

.discord-community-link {
    display: block;
    margin-bottom: 10px;
    text-align: center;
    background: #5865F2;
}

.discord-community-link .discord-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-color: white;
}

.discord-community-link-text {
    font-weight: 600;
    vertical-align: middle;
}

.resource-links-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.resource-link {
    display: block;
    padding: 10px 12px;
    box-sizing: border-box;
}

.resource-link .material-symbols-outlined {
    font-size: 18px;
    vertical-align: middle;
}

.resource-link .material-symbols-outlined.wiki {
    color: #2196F3;
}

.resource-link .material-symbols-outlined.reddit {
    color: #FF4500;
}

.resource-link .material-symbols-outlined.tracker {
    color: #FF9800;
}

.resource-link .material-symbols-outlined.calculator {
    color: #124d07;
}

.resource-link-text {
    vertical-align: middle;
}

.resource-link .discord-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Feedback Section */
.feedback-center {
    text-align: center;
    margin: 15px 0 20px 0;
}

.feedback-button {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
}

.feedback-text {
    margin-top: 18px;
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.feedback-discord-link {
    color: #5865F2;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.feedback-discord-link:hover {
    border-color: #5865F2;
}

.feedback-discord-link .discord-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Settings Appearance Section */
.appearance-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.theme-toggle-container {
    margin-bottom: 15px;
}

.theme-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.theme-help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

/* Dev Mode Tools */
.dev-box {
    background: rgba(46, 204, 113, 0.1);
    border: 2px solid #2ecc71;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.dev-box-title {
    margin-top: 0;
    color: #27ae60;
    font-size: 14px;
    border-bottom: 2px solid #2ecc71;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.dev-input-group {
    margin-bottom: 10px;
}

.dev-input-label {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.dev-input {
    width: 100%;
    padding: 6px;
    border: 1px solid #2ecc71;
    border-radius: 4px;
    box-sizing: border-box;
}

.dev-ore-count-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dev-ore-count-input {
    flex: 1;
    padding: 6px;
    border: 1px solid #2ecc71;
    border-radius: 4px;
}

.dev-checkbox-label {
    font-size: 13px;
    white-space: nowrap;
}

.dev-spawn-range-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 24px;
}

.dev-spawn-range-label {
    font-size: 13px;
}

.dev-spawn-range-input {
    padding: 6px;
    border: 1px solid #2ecc71;
    border-radius: 4px;
    width: 60px;
}

.dev-ore-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
}

.dev-button {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

/* What's New Section */
.whats-new-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border: 2px solid #4a90e2;
    border-radius: 5px;
}

.whats-new-title {
    margin-top: 0;
    color: #2c5aa0;
}

.whats-new-subtitle {
    color: #2c5aa0;
    margin-bottom: 5px;
    margin-top: 15px;
}

.whats-new-update {
    margin: 5px 0;
    padding: 10px;
    background-color: #e7f9e7;
    border-left: 4px solid #4caf50;
    border-radius: 3px;
}

.whats-new-reminder {
    margin: 5px 0;
    padding: 10px;
    background-color: #fff9e6;
    border-left: 4px solid #ff9800;
    border-radius: 3px;
}

.whats-new-tip {
    margin: 5px 0;
    padding: 10px;
    background-color: #e6f0ff;
    border-left: 4px solid #0059ff;
    border-radius: 3px;
}

.whats-new-archive {
    margin: 5px 0;
    padding: 10px;
    background-color: #e7cdffff;
    border-left: 4px solid #7605dfff;
    border-radius: 3px;
}

.whats-new-feature {
    margin: 5px 0;
    padding: 10px;
    background-color: #cde4ffff;
    border-left: 4px solid #0538dfff;
    border-radius: 3px;
}

.whats-new-details {
    margin-top: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
}

.whats-new-summary {
    cursor: pointer;
    font-weight: bold;
    color: #2c5aa0;
    padding: 5px;
}

.whats-new-details-content {
    margin-top: 10px;
}

.whats-new-discord-link {
    color: #1256d8;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.whats-new-discord-link:hover {
    color: #0d47a1;
}

.whats-new-room-name {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background-color: rgba(88, 101, 242, 0.16);
    border: 1px solid rgba(88, 101, 242, 0.35);
    color: #2f4ad0;
    font-weight: 700;
}

/* Mini Info Box Component - Minimalistic styling for small info boxes */
.mini-info-box {
    margin: 5px 0 10px 0;
    padding: 10px;
    border-left: 4px solid;
    border-radius: 3px;
    transition: all 0.2s ease;
}

/* Mini Info Box Variants */
.mini-info-box--success {
    background-color: #e7f9e7;
    border-left-color: #4caf50;
}

.mini-info-box--warning {
    background-color: #fff9e6;
    border-left-color: #ff9800;
}

.mini-info-box--info {
    background-color: #e6f0ff;
    border-left-color: #0059ff;
}

.mini-info-box--feature {
    background-color: #cde4ffff;
    border-left-color: #0538dfff;
}

.mini-info-box--archive {
    background-color: #e7cdffff;
    border-left-color: #7605dfff;
}

.whats-new-icon {
    font-size: 16px;
    vertical-align: middle;
}

.whats-new-icon.green {
    color: #4CAF50;
}

.whats-new-icon.yellow {
    color: #FFC107;
}

/* Display Settings */
.display-setting-label {
    display: flex;
    align-items: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    margin-bottom: 10px;
}

.display-setting-label:hover {
    background: rgba(33, 150, 243, 0.05);
}

.display-setting-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.display-setting-description {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* Map Controls Container - Bottom Right */
.map-controls-container {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

/* Coordinate Display */
.coordinate-display {
    min-width: 90px;
    display: none;
    /* Hidden by default, shown via JS */
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 5px;
    box-shadow: 0 2px 5px var(--shadow-color);
    font-family: monospace;
    font-size: 14px;
    opacity: 0.90;
    pointer-events: none;
    text-align: center;
}

/* Custom Zoom Control */
.custom-zoom-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: auto;
}

.zoom-button {
    width: 34px;
    height: 34px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: all 0.2s ease;
    opacity: 0.90;
    pointer-events: auto;
}

.zoom-button:hover {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 3px 8px var(--shadow-color);
}

.zoom-button:active {
    transform: scale(0.95);
}

.zoom-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zoom-button:disabled:hover {
    transform: none;
}

body {
    padding: 0;
    margin: 0;
    overflow: hidden;
}

/* Material Symbols Global Styling */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    vertical-align: middle;
    display: inline-block;
}

/* Material symbols in headings */
h2 .material-symbols-outlined,
h3 .material-symbols-outlined,
h4 .material-symbols-outlined {
    font-size: 1em;
    vertical-align: middle;
}

.discord-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    background-color: #5865F2;

    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13.545 2.907a13.2 13.2 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.2 12.2 0 0 0-3.658 0 8 8 0 0 0-.412-.833.05.05 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.04.04 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032q.003.022.021.037a13.3 13.3 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019q.463-.63.818-1.329a.05.05 0 0 0-.01-.059l-.018-.011a9 9 0 0 1-1.248-.595.05.05 0 0 1-.02-.066l.015-.019q.127-.095.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.05.05 0 0 1 .053.007q.121.1.248.195a.05.05 0 0 1-.004.085 8 8 0 0 1-1.249.594.05.05 0 0 0-.03.03.05.05 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.2 13.2 0 0 0 4.001-2.02.05.05 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.03.03 0 0 0-.02-.019m-8.198 7.307c-.789 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612m5.316 0c-.788 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612"/></svg>');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;

    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13.545 2.907a13.2 13.2 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.2 12.2 0 0 0-3.658 0 8 8 0 0 0-.412-.833.05.05 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.04.04 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032q.003.022.021.037a13.3 13.3 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019q.463-.63.818-1.329a.05.05 0 0 0-.01-.059l-.018-.011a9 9 0 0 1-1.248-.595.05.05 0 0 1-.02-.066l.015-.019q.127-.095.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.05.05 0 0 1 .053.007q.121.1.248.195a.05.05 0 0 1-.004.085 8 8 0 0 1-1.249.594.05.05 0 0 0-.03.03.05.05 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.2 13.2 0 0 0 4.001-2.02.05.05 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.03.03 0 0 0-.02-.019m-8.198 7.307c-.789 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612m5.316 0c-.788 0-1.438-.724-1.438-1.612s.637-1.613 1.438-1.613c.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612"/></svg>');
    mask-repeat: no-repeat;
    mask-size: contain;
}


html,
body,
#map {
    height: 100%;
    font: 10pt "Helvetica Neue", Arial, Helvetica, sans-serif;
    background-image: url("../back.jpg");
    background-repeat: no-repeat;
    background-size: cover;
}

/* Sidebar styling to match ol3-sidebar appearance */
.sidebar {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
}

.sidebar-tabs {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%) !important;
    z-index: 2501 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    border-radius: 0 !important;
}

.sidebar-left {
    left: 0 !important;
    z-index: 2501 !important;
}

.sidebar-right {
    right: 6px !important;
}

/* Leaflet Sidebar Base Styles */
.sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    z-index: 2000;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}

.sidebar.collapsed {
    width: 40px;
}

@media (min-width: 768px) {
    .sidebar:not(.collapsed) {
        top: 10px;
        bottom: 10px;
        transition: width 500ms;
        border-radius: 0;
        width: 450px;
    }
}

.sidebar-left {
    left: 0;
}

@media (min-width: 768px) {
    .sidebar-left {
        left: 10px;
    }
}

.sidebar-right {
    right: 0;
}

@media (min-width: 768px) {
    .sidebar-right {
        right: 10px;
    }
}

.sidebar-tabs {
    top: 0;
    bottom: 0;
    height: 100%;
    background-color: rgb(63, 110, 172);
}

.sidebar-left .sidebar-tabs {
    left: 0;
}

.sidebar-right .sidebar-tabs {
    right: 0;
}

.sidebar-tabs,
.sidebar-tabs>ul {
    position: absolute;
    width: 40px;
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.sidebar-tabs>li,
.sidebar-tabs>ul>li {
    width: 100%;
    height: 40px;
    color: #ecf0f1;
    font-size: 12pt;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-tabs>li:hover,
.sidebar-tabs>ul>li:hover {
    color: #fff;
    background-color: #3498db;
    transform: translateX(2px);
}

.sidebar-tabs>li.active,
.sidebar-tabs>ul>li.active {
    color: #fff;
    background-color: #2196F3;
    box-shadow: inset 3px 0 0 #64b5f6;
}

.sidebar-tabs>li.disabled,
.sidebar-tabs>ul>li.disabled {
    color: rgba(51, 51, 51, 0.4);
}

.sidebar-tabs>li.disabled:hover,
.sidebar-tabs>ul>li.disabled:hover {
    background: transparent;
}

.sidebar-tabs>li.disabled>a,
.sidebar-tabs>ul>li.disabled>a {
    cursor: default;
}

.sidebar-tabs>li>a,
.sidebar-tabs>ul>li>a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 40px;
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.sidebar-tabs>ul+ul {
    bottom: 0;
}

.sidebar-content {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--sidebar-bg-gradient);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1;
}

.sidebar-left .sidebar-content {
    left: 40px;
    right: 0;
}

.sidebar-right .sidebar-content {
    left: 0;
    right: 40px;
}

.sidebar.collapsed>.sidebar-content {
    overflow-y: hidden;
}

.sidebar-pane {
    display: none;
    left: 0;
    right: 0;
    box-sizing: border-box;
    padding: 0;
    height: 100%;
    overflow-y: auto;
    padding-bottom: 40px;
    /* Space for credits */
}

.sidebar-pane.active {
    display: flex;
    flex-direction: column;
    padding: 0 20px 70px 20px;
    /* Extra bottom padding for credits */
}

/* Sidebar Credits */
.sidebar-credits {
    position: absolute;
    bottom: 0;
    left: 40px;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: var(--text-tertiary);
    padding: 5px 0px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-credits a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-credits a:hover {
    color: #2196F3;
}

@media (min-width: 768px) {
    .sidebar:not(.collapsed) {
        min-width: 450px;
    }
}

.sidebar-header {
    margin: -10px -20px 20px -20px;
    height: 50px;
    padding: 0 20px;
    line-height: 50px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-right .sidebar-header {
    padding-left: 40px;
}

.sidebar-close {
    position: absolute;
    top: 0;
    width: 50px;
    height: 50px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Material Symbols in sidebar close */
.sidebar-close .material-symbols-outlined {
    line-height: 50px;
    vertical-align: middle;
    color: white;
    font-size: 28px;
    transition: transform 0.3s ease;
}

.sidebar-close:hover .material-symbols-outlined {
    transform: scale(1.15);
}

.sidebar-left .sidebar-close {
    right: 0;
}

.sidebar-right .sidebar-close {
    left: 0;
}

.sidebar-left~.sidebar-map {
    margin-left: 40px;
}

@media (min-width: 768px) {
    .sidebar-left~.sidebar-map {
        margin-left: 0;
    }
}

.sidebar-right~.sidebar-map {
    margin-right: 40px;
}

@media (min-width: 768px) {
    .sidebar-right~.sidebar-map {
        margin-right: 0;
    }
}

@media (min-width: 768px) {
    .sidebar-left~.sidebar-map .leaflet-left {
        transition: left 500ms;
        left: 460px;
    }
}

@media (min-width: 768px) {
    .sidebar-left.collapsed~.sidebar-map .leaflet-left {
        left: 50px;
    }
}

@media (min-width: 768px) {
    .sidebar-right~.sidebar-map .leaflet-right {
        transition: right 500ms;
        right: 460px;
    }
}

@media (min-width: 768px) {
    .sidebar-right.collapsed~.sidebar-map .leaflet-right {
        right: 50px;
    }
}

.legend {
    line-height: 18px;
    color: #FFFFFF;
    background-color: dimgrey;
    border-radius: 25px 0px 0px 25px;
    border: 2px solid #000;
    box-shadow: 10px 10px 15px #000;
    padding: 20px;
    width: 150px;
    height: 150px;
    text-align: left;
    line-height: 16px;
    vertical-align: middle;
}

.legend i {
    color: #FFFFFF;
    vertical-align: middle;
    color: white;
    margin-bottom: 6px;
}

.legend2 {
    line-height: 18px;
    color: #FFFFFF;
    background-color: dimgrey;
    border-radius: 25px 0px 0px 25px;
    border: 2px solid #000;
    box-shadow: 10px 10px 15px #000;
    padding: 20px;
    width: 10px;
    height: 10px;
    text-align: left;
    line-height: 16px;
    vertical-align: middle;
}

.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    max-height: 10%;
    width: 100%;
    background-color: grey;
    color: white;
    text-align: center;
}

#header {
    display: flex;
    position: fixed;
    top: 0;
    width: 100%;
    height: 45px;
    padding: 0 10px;
    background: #2f3136;
    box-shadow: 0 1px 0 rgb(4 4 5 / 20%), 0 1.5px 0 rgb(6 6 7 / 5%), 0 2px 0 rgb(4 4 5 / 5%);
    overflow: hidden;
    z-index: 2500 !important;
}

.leaflet-tooltip.my-labels {
    background-color: transparent;
    border: transparent;
    box-shadow: none;
    color: #FFF;
    -webkit-text-stroke: 4px black;
    paint-order: stroke fill;
    font-size: 16px;
}

form1 {
    background-color: #8C8C8C;
    border-radius: 10px;
    font-family: Avenir;
    padding: 20px;
    width: 200px;
}

.demo-3 .main h2:after,
.demo-3 .main h3:after,
.demo-3 .main h4:after {
    position: absolute;
    content: "";
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 2px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5),
        0 1px 1px rgba(255, 255, 255, 0.3);
}

.demo-3 .main h2:after {
    background: #0AF;
}

.demo-3 .main h3:after {
    background: #3BF;
}

.demo-3 .main h4:after {
    background: #6Cf;
}

.demo-3 .main h1 {
    font-size: 36px;
    line-height: 40px;
    margin: 1em 0 .6em 0;
    font-weight: normal;
    color: white;
    font-family: 'Hammersmith One', sans-serif;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    color: #6Cf;
}

.demo-3 .main h2 {
    margin: 1em 0 .6em 0;
    padding: 0 0 0 20px;
    font-weight: normal;
    color: white;
    font-family: 'Hammersmith One', sans-serif;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    font-size: 24px;
    line-height: 40px;
}

.demo-3 .main h3 {
    margin: 1em 0 .6em 0;
    padding: 0 0 0 20px;
    font-weight: normal;
    color: white;
    font-family: 'Hammersmith One', sans-serif;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    font-size: 24px;
    line-height: 40px;
    font-family: 'Questrial', sans-serif;
}

.demo-3 .main h4 {
    margin: 1em 0 .6em 0;
    padding: 0 0 0 20px;
    font-weight: normal;
    color: white;
    font-family: 'Hammersmith One', sans-serif;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
    position: relative;
    font-size: 18px;
    line-height: 20px;
    font-family: 'Questrial', sans-serif;
}

.leaflet-overlay-pane {
    z-index: 601;
}

.leaflet-tooltip-pane {
    z-index: 599;
}

.leaflet-marker-pane {
    z-index: 600;
}

/* Hide Leaflet attribution */
.leaflet-control-attribution {
    display: none !important;
}

img.icon {
    height: 18px;
    vertical-align: bottom;
}

.sidebar-tabs .fa {
    vertical-align: middle;
    color: white;
}

/* Material Symbols styling for sidebar tabs */
.sidebar-tabs .material-symbols-outlined {
    vertical-align: middle;
    color: white;
    font-size: 20px;
    line-height: 40px;
    display: inline-block;
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

.icarus-grid-tile {
    box-sizing: border-box;
    color: #FFFFFF;
    outline: #707070 solid 1px;
    padding: 2px 4px !important;
    -webkit-text-stroke: 4px black;
    paint-order: stroke fill;
}

.leaflet-zoom-level-0 .icarus-grid-native-zoom-2 .icarus-grid-tile {
    font-size: 56px;
    outline-width: 3px;
}

.leaflet-zoom-level-1 .icarus-grid-native-zoom-2 .icarus-grid-tile {
    font-size: 42px;
    outline-width: 2px;
}

.leaflet-zoom-level-2 .icarus-grid-native-zoom-2 .icarus-grid-tile {
    font-size: 28px;
    outline-width: 1px;
}

.leaflet-zoom-level-3 .icarus-grid-native-zoom-2 .icarus-grid-tile {
    font-size: 14px;
    outline-width: 1px;
}

.leaflet-zoom-level-4 .icarus-grid-native-zoom-2 .icarus-grid-tile {
    font-size: 7px;
    outline-width: 1px;
}

.leaflet-zoom-level-5 .icarus-grid-native-zoom-2 .icarus-grid-tile {
    font-size: 4px;
    outline-width: 1px;
}

.leaflet-zoom-level-0 .icarus-grid-native-zoom-4 .icarus-grid-tile {
    font-size: 84px;
    outline-width: 5px;
}

.leaflet-zoom-level-1 .icarus-grid-native-zoom-4 .icarus-grid-tile {
    font-size: 70px;
    outline-width: 4px;
}

.leaflet-zoom-level-2 .icarus-grid-native-zoom-4 .icarus-grid-tile {
    font-size: 56px;
    outline-width: 3px;
}

.leaflet-zoom-level-3 .icarus-grid-native-zoom-4 .icarus-grid-tile {
    font-size: 42px;
    outline-width: 2px;
}

.leaflet-zoom-level-4 .icarus-grid-native-zoom-4 .icarus-grid-tile {
    font-size: 28px;
    outline-width: 1px;
}

.leaflet-zoom-level-5 .icarus-grid-native-zoom-4 .icarus-grid-tile {
    font-size: 14px;
    outline-width: 1px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.legend-item img {
    vertical-align: middle;
    width: 36px;
    flex-shrink: 0;
}

.popup-dov-container {
    display: flex;
    gap: 0;
    background: transparent;
}

.leaflet-popup-content:has(.popup-dov-container) {
    margin: 5px;
}

.popup-dov-select {
    list-style-type: none;
    padding: 2px 2px 2px 2px;
    margin: 0;
    min-width: 140px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    overflow: hidden;
}

.popup-dov-select li {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 2px 6px 2px 6px;
    margin-right: 2px;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    color: #424242;
    font-weight: 500;
}

.popup-dov-select li:hover {
    background: rgba(33, 150, 243, 0.08);
    transform: translateX(2px);
}

.popup-dov-select li img {
    height: 20px;
    width: 20px;
    object-fit: contain;
}


/* Drill Selection Section */
.popup-dov-drill-section {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    padding: 6px 1px 6px 6px;
    margin: 0;
    justify-content: center;
    min-width: 40px;
    /* background: var(--bg-secondary); */
}

.popup-dov-drill-title {
    font-size: 9px;
    font-weight: 600;
    color: #757575;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
}

.popup-dov-drill-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.popup-dov-drill-option {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
}

.popup-dov-drill-option:hover {
    background: rgba(33, 150, 243, 0.1);
    border-color: rgba(33, 150, 243, 0.3);
    transform: scale(1.1);
}

.popup-dov-drill-option.selected {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-dov-drill-option.selected:hover {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    transform: scale(1.1);
}

.popup-dov-drill-option.disabled {
    cursor: not-allowed !important;
}

/* Drill Overlay Icon Styling */
.drill-overlay {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 2px;
    line-height: 1;
}

.drill-biofuel {
    /* color: #53f551 !important; */
    color: #4CAF50 !important;
}

.drill-electric {
    /* color: #f3ec5b !important; */
    color: #FFC107 !important;
}

/* Cave ore drill overlay */
.cave-ore-drill-overlay.drill-biofuel {
    color: #4CAF50;
}

.cave-ore-drill-overlay.drill-electric {
    color: #FFC107;
}

.popup-dov-drill-option .material-symbols-outlined {
    font-size: 20px;
}

/* Ore marker with drill overlay */
.ore-marker-with-drill {
    background: transparent;
    border: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: linear-gradient(135deg, #d0d0d0 0%, #e0e0e0 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 13px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.15);
}

input:checked+.slider {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: rgba(33, 150, 243, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 10px rgba(33, 150, 243, 0.4);
}

input:checked+.slider::before {
    transform: translateX(18px);
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

input:disabled+.slider {
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
    cursor: not-allowed;
    opacity: 0.5;
    border-color: rgba(0, 0, 0, 0.05);
}

input:disabled:checked+.slider {
    background: linear-gradient(135deg, #90a4ae 0%, #78909c 100%);
}

.filterRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.filterRow:hover {
    background: rgba(33, 150, 243, 0.08);
    border-color: rgba(33, 150, 243, 0.2);
}

.filterRow.alt-row {
    background: rgba(0, 0, 0, 0.04);
}

.filterRow.alt-row:hover {
    background: rgba(33, 150, 243, 0.08);
}

.filterRow img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.filterRow span {
    font-size: 15px;
    flex: 1;
    color: #424242;
    font-weight: 500;
}


/* Custom Marker Icon Grid */
.icon-grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* gap: 6px; */
    margin-bottom: 8px;
}

.icon-grid-item {
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 3px;
    transition: border-color 0.2s ease;
}

.icon-grid-item.selected {
    border: 2px solid #2196F3;
}

.icon-grid-item:hover {
    border-color: rgba(33, 150, 243, 0.5);
}

/* Hidden color input for custom color picker */
.custom-color-input {
    display: none;
}

.icon-grid-item .mi {
    text-shadow: 0 0 5px #020202;
    filter: none;
    color: var(--mi-color) !important;
}

.mi-divicon {
    background: transparent;
    border: none;
    box-shadow: none;
}

.mi-wrapper {
    position: relative;
    pointer-events: none;
}

.mi {
    font-family: 'Material Symbols Outlined';
    font-variation-settings: 'OPSZ' 40, 'wght' 400, 'FILL' 1, 'GRAD' 0;

    font-size: var(--mi-size, 36px);
    line-height: 1;
    display: inline-block;
    color: var(--mi-color, #1976d2);
    user-select: none;
    -webkit-user-select: none;

    filter: drop-shadow(3px 3px 0px black);
}

.leaflet-marker-icon.mi-divicon:hover .mi {
    filter: brightness(1.2);
}

/* Filter Section Styling */
.filter-section {
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 2px solid rgba(33, 150, 243, 0.1);
}

.filter-section:last-child {
    border-bottom: none;
}

.section-header-with-icon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-right: 10px;
}

.filter-section-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
    color: #1976D2;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    margin-bottom: 5px;
}

/* Unified Icon Button Class */
.icon-button,
.reset-filters-btn,
.share-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.icon-button:hover,
.reset-filters-btn:hover,
.share-icon-button:hover {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: white;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.share-icon-button:hover {
    transform: scale(1.08) translateY(-1px);
}

.icon-button .material-symbols-outlined,
.reset-filters-btn .material-symbols-outlined,
.share-icon-button .material-symbols-outlined {
    font-size: 20px;
    color: inherit;
}

/* Prometheus NULL Sector Spoiler Styling */
.filter-spoiler {
    margin-top: 10px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 4px;
    background: rgba(255, 152, 0, 0.05);
}

.filter-spoiler-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    font-weight: 600;
    color: #FF9800;
    transition: background 0.2s ease;
    list-style: none;
}

.filter-spoiler-header div span {
    color: #FF9800 !important;
}

.filter-spoiler-header::-webkit-details-marker {
    display: none;
}

.filter-spoiler-header:hover {
    background: rgba(255, 152, 0, 0.1);
}

.spoiler-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}

details[open] .spoiler-arrow {
    transform: rotate(180deg);
}

.filter-spoiler-content {
    padding: 10px 8px 5px 8px;
    border-top: 1px solid rgba(255, 152, 0, 0.2);
}

.icon-button:active,
.reset-filters-btn:active,
.share-icon-button:active {
    transform: scale(0.95);
}

/* Disabled state for icon buttons */
.icon-button.disabled,
.share-icon-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Styled Select Dropdown */
.select-wrapper {
    position: relative;
    margin-bottom: 8px;
    margin-top: 8px;
}

.styled-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #424242;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #757575;
    font-size: 14px;
    transition: all 0.3s ease;
}

.select-arrow.material-symbols-outlined {
    font-size: 22px;
}

.styled-select:hover {
    border-color: #2196F3;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.15);
}

.styled-select:hover+.select-arrow {
    color: #2196F3;
}

.styled-select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
    background: #fff;
}

.styled-select:focus+.select-arrow {
    color: #2196F3;
    transform: translateY(-50%) rotate(180deg);
}

.styled-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
    color: #9e9e9e;
}

/* Styled Buttons */
.styled-button {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--button-bg) 0%, var(--button-hover) 100%);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.styled-button:hover {
    background: linear-gradient(135deg, var(--button-hover) 0%, var(--bg-tertiary) 100%);
    border-color: #2196F3;
    color: #2196F3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.2);
}

.styled-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.styled-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.styled-button.primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: #fff;
    box-shadow: 0 3px 6px rgba(33, 150, 243, 0.3);
}

.styled-button.primary:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    border-color: #1565C0;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(33, 150, 243, 0.4);
}

.styled-button.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-color: #d32f2f;
    color: #fff;
    box-shadow: 0 3px 6px rgba(244, 67, 54, 0.3);
}

.styled-button.danger:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-color: #c62828;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(244, 67, 54, 0.4);
}

.styled-button i {
    margin-right: 6px;
    vertical-align: middle;
}

.styled-button .material-symbols-outlined {
    font-size: 18px;
    margin-right: 4px;
    vertical-align: middle;
}

.styled-button .button-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
}

.styled-button.share-button {
    width: 100%;
    margin-top: 8px;
}

/* Button Groups */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/*.button-group .styled-button {*/
/*    width: 100%;*/
/*}*/

.button-group-horizontal {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.button-group-horizontal .styled-button {
    flex: 1;
}

/* Mobile responsive button groups */
@media (max-width: 767px) {
    .button-group-horizontal {
        flex-direction: column;
    }

    .button-group-horizontal .styled-button {
        flex: none;
        width: 100%;
    }
}

.button-group-horizontal .styled-button.danger {
    flex: 0 0 auto;
}

.old-button-group-horizontal-styled-button {
    flex: 1;
}

/* Filter Row Updates */
.filterRow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filterRow:hover {
    background-color: rgba(33, 150, 243, 0.05);
}

.filterRow.alt-row {
    background-color: rgba(0, 0, 0, 0.02);
}

.filterRow.alt-row:hover {
    background-color: rgba(33, 150, 243, 0.08);
}

.filterRow img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.filterRow span {
    font-size: 14px;
    flex: 1;
    color: #333;
}

.filterRow .switch {
    margin-left: auto;
    flex-shrink: 0;
}

/* Mission Info */
.miss {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 10px;
    padding: 10px;
    background: rgba(33, 150, 243, 0.05);
    border-left: 3px solid #2196F3;
    border-radius: 2px;
}

.mission-title {
    margin: 0;
}

/* Sidebar Content Adjustments */
.sidebar-content {
    overflow-y: auto;
}

/* Custom Scrollbar Styling */
.sidebar-content::-webkit-scrollbar {
    width: 10px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2196F3 0%, #1976D2 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1E88E5 0%, #1565C0 100%);
}

.sidebar-pane#options.active {
    display: flex !important;
    flex-direction: column;
    min-height: 100%;
}

.sidebar-pane#options.active .advanced-options-section {
    margin-top: auto;
    padding-top: 20px;
}

/* Custom Marker Popup Styling */
.custom-marker-popup {
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    min-width: 240px;
    max-width: 260px;
}

.popup-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 16px 0;
    padding: 0 0 10px 0;
    color: #1976D2;
    border-bottom: 3px solid #2196F3;
    /* background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(33, 150, 243, 0.02) 100%); */
    padding: 8px 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.popup-section {
    margin-bottom: 8px;
}

.popup-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #424242;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    color: #424242;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.popup-input:hover {
    border-color: #2196F3;
}

.popup-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
    background: #fff;
}

.popup-buttons {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.popup-button {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #424242;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.popup-button:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-color: #2196F3;
    color: #2196F3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.2);
}

.popup-button.primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: #fff;
    box-shadow: 0 3px 6px rgba(33, 150, 243, 0.3);
}

.popup-button.primary:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    border-color: #1565C0;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(33, 150, 243, 0.4);
}

.popup-button.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-color: #d32f2f;
    color: #fff;
    box-shadow: 0 3px 6px rgba(244, 67, 54, 0.3);
}

.popup-button.danger:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-color: #c62828;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(244, 67, 54, 0.4);
}

.popup-button.success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border-color: #388e3c;
    color: #fff;
    box-shadow: 0 3px 6px rgba(76, 175, 80, 0.3);
}

.popup-button.success:hover {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    border-color: #2e7d32;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(76, 175, 80, 0.4);
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 4px;
    max-width: 100%;
    box-sizing: border-box;
}

.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
    box-sizing: border-box;
    min-width: 0;
    box-shadow: 1px 1px 2px #00000036;
}

.color-swatch.custom {
    background: linear-gradient(135deg, #868686 0%, #dbdbdb 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-swatch.custom::after {
    content: '+';
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    margin: -10px;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.color-swatch.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px #2196F3, 0 3px 6px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* Custom Confirm Dialog */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.custom-confirm-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 320px;
    max-width: 500px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.custom-confirm-header {
    background: #2196F3;
    color: #fff;
    padding: 16px 20px;
}

.custom-confirm-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.custom-confirm-body {
    padding: 20px;
    color: #333;
}

.custom-confirm-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.custom-confirm-body input[type="text"] {
    margin-top: 12px;
}

.custom-confirm-body input[type="text"]:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.custom-confirm-buttons {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    justify-content: flex-end;
}

.custom-confirm-buttons .popup-button {
    padding: 8px 16px;
    font-size: 13px;
}

/* Custom confirm dialog warning/note box */
.custom-confirm-note {
    margin: 10px 0;
    padding: 10px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 3px;
    color: #856404;
}

/* ============================================================================
   SAVED MAPS MANAGEMENT
   ============================================================================ */

/* Saved Map Name Row */
.saved-map-name-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin: 12px 0;
}

.saved-map-name-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.saved-map-name-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.saved-map-name-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.saved-map-change-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #2196F3;
    background: #fff;
    border: 1px solid #2196F3;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.saved-map-change-btn i {
    font-size: 16px;
}

.saved-map-change-btn:hover {
    background: #2196F3;
    color: #fff;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

/* Shared Map Overlay */
.map-selector-wrapper {
    position: relative;
}

.shared-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.97);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

.shared-map-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    max-width: 100%;
    width: 100%;
}

.shared-map-overlay-content i {
    font-size: 28px;
    color: #ff9800;
    margin-bottom: 6px;
}

.shared-map-overlay-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.shared-map-overlay-content p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.shared-map-return-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #4CAF50;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shared-map-return-btn i {
    font-size: 16px;
    color: #fff;
    margin: 0;
}

.shared-map-return-btn:hover {
    background: #45a049;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

/* Saved Maps Dialog */
#savedMapsDialog {
    z-index: 10000 !important;
}

.saved-maps-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.saved-maps-header {
    background: #2196F3;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.saved-maps-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.saved-maps-close-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.saved-maps-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.saved-maps-close-btn i {
    font-size: 24px;
}

.saved-maps-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 200px;
}

.saved-maps-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.saved-maps-empty i {
    font-size: 48px;
    color: #bbb;
    margin-bottom: 12px;
}

.saved-maps-empty p {
    margin: 8px 0 0;
    font-size: 14px;
}

.saved-map-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.saved-map-row:hover {
    background: #f0f2f5;
    border-color: #2196F3;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

.saved-map-row.active {
    background: #e3f2fd;
    border-color: #2196F3;
}

.saved-map-row.unsaved-highlight {
    background: #fff8e1;
    border: 2px solid #ffa726;
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.2);
}

.saved-map-row.unsaved-highlight:hover {
    background: #fff3cd;
    border-color: #ff9800;
}

.saved-map-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.saved-map-name-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.saved-map-name-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.saved-map-name-input.unsaved {
    font-style: italic;
    color: #666;
}

.saved-map-name-limit {
    display: none;
    font-size: 12px;
    color: #f44336;
    margin-top: -2px;
}

.saved-map-name-limit.visible {
    display: block;
}

.saved-map-actions {
    display: flex;
    gap: 8px;
    position: relative;
}

.saved-map-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.saved-map-btn i {
    font-size: 16px;
}

.saved-map-btn.open {
    color: #2196F3;
    background: #fff;
    border-color: #2196F3;
    min-width: 96px;
    justify-content: center;
}

.saved-map-btn.open:hover {
    background: #2196F3;
    color: #fff;
}

.saved-map-btn.menu {
    color: #666;
    background: #fff;
    border-color: #bbb;
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
}

.saved-map-btn.menu:hover {
    background: #f3f4f6;
    border-color: #999;
    color: #444;
}

.saved-map-btn.menu i {
    margin: 0;
}

.saved-map-floating-menu {
    position: fixed;
    min-width: 170px;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    padding: 4px;
    z-index: 30050;
}

.saved-map-menu-item {
    width: 100%;
    border: none;
    border-radius: 4px;
    background: transparent;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #333;
}

.saved-map-menu-item i {
    font-size: 16px;
}

.saved-map-menu-item:hover {
    background: #f3f4f6;
}

.saved-map-menu-item.danger {
    color: #f44336;
}

.saved-map-menu-item.danger:hover {
    background: rgba(244, 67, 54, 0.08);
}

.saved-map-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.saved-map-menu-item:disabled:hover {
    background: transparent;
}

.saved-map-menu-item.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.saved-map-menu-item.is-disabled:hover {
    background: transparent;
}

.saved-map-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.saved-map-metadata {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
    padding-left: 12px;
}

.saved-map-timestamp {
    display: flex;
    align-items: center;
    gap: 4px;
}

.saved-map-timestamp i {
    font-size: 14px;
}

.saved-map-timestamp.deletion {
    color: #f44336;
    font-weight: 600;
}

.saved-maps-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.saved-maps-footer .popup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    box-sizing: border-box;
    white-space: nowrap;
}

.saved-maps-footer .popup-button.primary {
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.saved-maps-footer .popup-button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.35);
}

.saved-maps-footer .popup-button i {
    font-size: 18px;
}

.saved-maps-footer .popup-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
    border-color: #999;
}

/* Responsive Design */
@media (max-width: 600px) {
    .saved-maps-dialog {
        width: 95%;
        max-height: 90vh;
    }

    .saved-maps-footer {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .saved-maps-footer #addNewMapBtn {
        order: 1;
        flex: 1 1 100%;
        width: 100%;
    }

    .saved-maps-footer #addFromLinkBtn {
        order: 2;
        flex: 1 1 0;
        width: 50%;
    }

    .saved-maps-footer #addFromFileBtn {
        order: 3;
        flex: 1 1 0;
        width: 50%;
    }

    .saved-map-row-main {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-map-actions {
        width: 100%;
        justify-content: stretch;
    }

    .saved-map-btn {
        flex: 1;
        justify-content: center;
    }

    .saved-map-btn.menu {
        flex: 0 0 34px;
    }

    .saved-map-metadata {
        flex-direction: column;
        gap: 4px;
    }

    .saved-map-name-content {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-map-change-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Cave Popup Styling */
.cave-tooltip-popup .leaflet-popup-content {
    width: 250px !important;
}

.cave-popup-wrapper {
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    width: 250px;
}

.cave-popup-info {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    line-height: 1.4;
}

.cave-popup-status {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.cave-popup-status-buttons {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.cave-popup-status-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #424242;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.cave-popup-status-btn:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-color: #2196F3;
    color: #2196F3;
    /* transform: translateY(-1px); */
    box-shadow: 0 3px 6px rgba(33, 150, 243, 0.2);
}

.cave-popup-status-btn.active {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: #fff;
    box-shadow: 0 3px 6px rgba(33, 150, 243, 0.3);
}

.cave-popup-status-btn.active:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    /* transform: translateY(-1px); */
}

.cave-popup-deep-ores {
    margin-top: 8px;
}

.cave-popup-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cave-popup-clear-btn {
    padding: 4px 8px;
    font-size: 16px;
    margin-left: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(244, 67, 54, 0.05) 100%);
    border: 2px solid rgba(244, 67, 54, 0.4);
    border-radius: 6px;
    color: #f44336;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 32px;
    height: 28px;
}

.cave-popup-clear-btn:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-color: #d32f2f;
    color: #fff;
    /* transform: translateY(-1px); */
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.35);
}

.cave-popup-ore-icons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-start;
}

.cave-popup-ore-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}

.cave-popup-ore-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 2px solid #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    position: relative;
}

.cave-popup-ore-circle:hover {
    transform: scale(1.15);
    border-color: #2196F3;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.35);
}

.cave-popup-ore-circle img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.cave-ore-drill-overlay {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    padding: 2px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cave-popup-ore-plus {
    font-size: 32px;
    font-weight: bold;
    color: #9e9e9e;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(158, 158, 158, 0.3);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cave-popup-ore-name {
    font-size: 9px;
    font-weight: 600;
    color: #333;
    text-align: center;
    text-transform: uppercase;
    width: 70px;
    line-height: 1.1;
    min-height: 18px;
    word-wrap: break-word;
}

/* Copy to Dev Marker Button */
.cave-popup-copy-dev-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    transition: all 0.2s ease;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.cave-popup-copy-dev-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.cave-popup-copy-dev-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cave-popup-copy-dev-btn i {
    margin-right: 4px;
    font-size: 10px;
}

/* Deep Ore Context Menu Selection Highlighting */
.popup-dov-select li.selected {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    font-weight: 700;
    color: #1976D2;
    box-shadow: inset 0 0 0 2px rgba(33, 150, 243, 0.3);
}

.popup-dov-select li.selected:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    transform: translateX(2px);
}

/* Ore Filter Button */
.ore-filter-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    margin-left: auto;
    margin-right: 8px;
    padding: 4px 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.ore-filter-btn .material-symbols-outlined {
    font-size: 20px;
    color: inherit;
    vertical-align: middle;
}

.ore-filter-btn:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.ore-filter-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

.ore-filter-btn.active:hover {
    background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.5);
}

.ore-filter-btn:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
    opacity: 0.5;
}

.ore-filter-btn:disabled:hover {
    background: #bdbdbd;
    transform: none;
    box-shadow: none;
}

/* Ore Filter Popup */
.ore-filter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.ore-filter-popup {
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 190px;
    max-height: 80vh;
    overflow-y: auto;
    pointer-events: all;
    padding: 8px;
}

.ore-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid #e0e0e0;
}

.ore-filter-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.ore-filter-close {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.ore-filter-close:hover {
    color: #333;
    background: #f0f0f0;
    border-radius: 4px;
}

.ore-filter-cave-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    margin-bottom: 6px;
    background: #f8f9fa;
    border-radius: 3px;
    cursor: pointer;
}

.ore-filter-cave-toggle:hover {
    background: #e9ecef;
}

.ore-filter-cave-toggle input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.ore-filter-cave-toggle label {
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.ore-filter-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.ore-filter-actions button {
    flex: 1;
    font-size: 10px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ore-filter-actions button:hover {
    background: #f5f5f5;
    border-color: #2196F3;
}

.ore-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.ore-filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ore-filter-item:hover {
    background: #f5f5f5;
}

.ore-filter-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.ore-filter-item img {
    height: 22px;
    object-fit: contain;
}

.ore-filter-item label {
    flex: 1;
    cursor: pointer;
    font-size: 13px;
    /* font-weight: 500; */
    color: #333;
    margin: 0;
}

/* Drill Filter Section */
.ore-filter-drill-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.ore-filter-drill-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: #616161;
    margin: 0 0 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ore-filter-drill-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

/* Ore Marker Highlighting */
.leaflet-marker-icon.ore-highlighted {
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.8)) drop-shadow(0 0 12px rgba(33, 150, 243, 0.6));
    z-index: 1000 !important;
}

.leaflet-marker-icon.ore-dimmed {
    opacity: 0.3;
    filter: grayscale(50%);
}


/* When both ore-highlighted and cave-has-ores are present, ore-highlighted wins */
.leaflet-marker-icon.ore-highlighted.cave-has-ores {
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.8)) drop-shadow(0 0 12px rgba(33, 150, 243, 0.6));
    z-index: 1000 !important;
}

/* Cave Ore Overlay Icons */
.cave-ore-overlay-container {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1px;
    padding: 2px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    /* pointer-events: none; */
    z-index: 10;
}

.cave-ore-overlay-wrapper {
    width: 20px;
    height: 20px;
    position: relative;
}

.cave-ore-overlay-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.cave-ore-overlay-drill {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    padding: 2px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Small indicator when ore overlay is hidden */
.cave-ore-indicator {
    position: absolute;
    top: -6px;
    right: -8px;
    /* width: 16px; */
    /* height: 16px; */
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); */
    /* pointer-events: none; */
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    /* color: #007FFF; */
    color: #FF8F00;
    /* color: #00ffea; */
}

/* Move leaflet notifications to the left to avoid covering state icon on desktop */
@media (min-width: 768px) {
    .leaflet-top.leaflet-right {
        right: 60px !important;
    }
}

/* On mobile, keep notifications in default position and ensure they appear over sidebar */
@media (max-width: 767px) {
    .leaflet-top.leaflet-right {
        z-index: 4000 !important;
        right: 5px !important;
    }

    .leaflet-notification {
        padding-left: 40px !important;
    }
}

/* Map State Icon */
.map-state-icon {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #4CAF50;
    cursor: help;
    z-index: 1000;
    box-shadow: 0 4px 15px var(--shadow-color), 0 2px 6px var(--shadow-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-state-icon:hover {
    transform: scale(1.12) translateY(-1px);
    box-shadow: 0 6px 24px var(--shadow-color), 0 3px 10px var(--shadow-color);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-color: rgba(76, 175, 80, 0.5);
}

.map-state-icon i {
    display: block;
}

/* Spinning animation for map state icon */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.map-state-icon .material-symbols-outlined {
    animation: none;
}

.map-state-icon .spinning {
    animation: spin 1s linear infinite;
}

/* Feedback Popup Notification */
.feedback-popup {
    position: fixed;
    left: 50px;
    bottom: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 320px;
    animation: slideInLeft 0.5s ease-out, pulse 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-popup-content {
    flex: 1;
}

.feedback-popup h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: bold;
}

.feedback-popup p {
    margin: 0;
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.4;
}

.feedback-popup-icon {
    font-size: 28px;
    animation: bounce 1.5s ease-in-out infinite;
}

.feedback-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.feedback-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.6);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Pulsing animation for feedback tab */
.feedback-tab-pulse {
    animation: tabPulse 2s ease-in-out infinite;
}

@keyframes tabPulse {

    0%,
    100% {
        background-color: rgba(255, 255, 255, 0.1);
    }

    50% {
        background-color: rgba(102, 126, 234, 0.3);
    }
}

/* Cave data notification animations */
@keyframes notificationSlideIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    to {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

/* Dev Tab Sections */
.dev-section {
    border-radius: 4px;
    padding: 12px 12px 12px 0;
    margin: 15px 0;
}

.dev-section summary {
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 5px;
    padding: 4px 20px;
    margin-left: -8px;
}

.dev-section summary .material-symbols-outlined {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Tooltip Options Section */
#tooltipSection {
    background: rgba(149, 165, 166, 0.1);
    border-left: 4px solid #95a5a6;
}

#tooltipSection summary {
    color: #7f8c8d;
}

#tooltipSection .filterRow {
    margin-top: 10px;
}

/* Cave Marker Section */
#caveMarkerSection {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
}

#caveMarkerSection summary {
    color: #3498db;
}

#myFormMarkerC {
    margin-top: 10px;
    padding: 0 12px;
}

#myFormMarkerC .form-row {
    margin-bottom: 15px;
}

#myFormMarkerC .toggle-label {
    font-weight: bold;
}

#copiedCaveInfo {
    margin-bottom: 15px;
}

.dev-marker-toggles {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 0 12px;
}

.dev-marker-toggles label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

.dev-marker-toggles input[type="checkbox"] {
    cursor: pointer;
}

.dev-coord-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.dev-coord-inputs>div {
    flex: 1;
    min-width: 80px;
}

.dev-coord-inputs label {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.dev-coord-inputs input {
    width: 100%;
    padding: 6px;
    border: 1px solid #3498db;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Cave Properties Box */
.cave-properties-box {
    background: rgba(46, 204, 113, 0.1);
    border: 2px solid #2ecc71;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.cave-properties-box h3 {
    margin-top: 0;
    color: #27ae60;
    font-size: 14px;
    border-bottom: 2px solid #2ecc71;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

.cave-properties-box>div {
    margin-bottom: 10px;
}

.cave-properties-box label {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}

.cave-properties-box select,
.cave-properties-box input[type="text"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #2ecc71;
    border-radius: 4px;
    box-sizing: border-box;
}

.cave-properties-box .flex-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cave-properties-box .flex-row input[type="text"] {
    flex: 1;
}

.cave-properties-box .flex-row label {
    white-space: nowrap;
    font-size: 13px;
}

.cave-properties-box .worm-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 24px;
}

.cave-properties-box .worm-inputs label {
    font-size: 13px;
}

.cave-properties-box .worm-inputs input {
    padding: 6px;
    border: 1px solid #2ecc71;
    border-radius: 4px;
    width: 60px;
}

.cave-properties-box .checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
}

/* Location Lookup Section */
#locationLookupSection {
    background: rgba(155, 89, 182, 0.1);
    border-left: 4px solid #9b59b6;
}

#locationLookupSection summary {
    color: #9b59b6;
    margin-bottom: 8px;
}

#locationLookupSection>div {
    margin-top: 10px;
    padding: 0 12px;
}

#locationLookupSection p {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

#locationLookupSection form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#locationLookupSection label {
    font-weight: bold;
}

#locationLookupSection input[type="text"] {
    padding: 6px;
    border: 1px solid #9b59b6;
    border-radius: 4px;
}

#locationLookupSection button {
    padding: 6px 15px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#locationLookupSection #results {
    margin-top: 10px;
}

/* Cave Search Section */
#caveSearchSection {
    background: rgba(230, 126, 34, 0.1);
    border-left: 4px solid #e67e22;
}

#caveSearchSection summary {
    color: #e67e22;
    margin-bottom: 8px;
}

#caveSearchSection>div {
    margin-top: 10px;
    padding: 0 12px;
}

#caveSearchSection p {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

#caveSearchSection form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

#caveSearchSection form:first-of-type {
    margin-bottom: 10px;
}

#caveSearchSection label {
    font-weight: bold;
}

#caveSearchSection input[type="text"] {
    padding: 6px;
    border: 1px solid #e67e22;
    border-radius: 4px;
}

#caveSearchSection button {
    padding: 6px 15px;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#caveSearchSection #caveResults {
    margin-top: 10px;
}

/* Generate Cave Code Section */
.generate-code-section {
    margin: 15px 0;
    padding: 8px;
    background: rgba(52, 73, 94, 0.05);
    border-radius: 4px;
    border: 1px solid #34495e;
}

.generate-code-section summary {
    cursor: pointer;
    font-weight: bold;
    color: #34495e;
    font-size: 13px;
    padding: 4px;
}

.generate-code-section>div {
    margin-top: 8px;
    padding: 8px;
    font-size: 12px;
}

.generate-code-section p {
    color: #7f8c8d;
    margin: 0 0 8px 0;
}

.generate-code-section button {
    padding: 6px 12px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.generate-code-section #resultsC {
    margin-top: 8px;
}

.generate-code-section #resultsC .cave-sql-output {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.generate-code-section #resultsC .cave-sql-output strong {
    color: var(--text-heading);
}

/* Dev marker styling */
.dev-marker-icon {
    filter: drop-shadow(2px 5px 2px #222);
}

/* Map Tips Popup */
.map-tips-popup {
    position: fixed;
    background: white;
    border: 2px solid #2196F3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    min-width: 250px;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.map-tips-content {
    padding: 0;
}

.map-tips-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #2196F3;
    color: white;
    border-radius: 6px 6px 0 0;
}

.map-tips-header strong {
    font-size: 14px;
}

.map-tips-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.map-tips-close:hover {
    transform: scale(1.2);
}

.map-tips-body {
    padding: 15px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}

.map-tips-body p {
    margin: 0 0 8px 0;
}

.map-tips-body p:last-child {
    margin-bottom: 0;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Leaflet Notifications z-index fix */
.leaflet-top,
.leaflet-bottom {
    z-index: 10000 !important;
}

.leaflet-control-notifications {
    z-index: 10000 !important;
    pointer-events: none;
}

.leaflet-notification {
    z-index: 10000 !important;
    pointer-events: auto;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .feedback-popup {
        left: 10px;
        right: 10px;
        bottom: 60px;
        max-width: none;
    }

    #caveDataNotification {
        max-width: 90% !important;
        padding: 15px 20px !important;
    }

    .map-tips-popup {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%);
        max-width: calc(100vw - 40px);
    }

    /* Mobile notification adjustments */
    .leaflet-control-notifications {
        left: 10px !important;
        right: 10px !important;
        top: 10px !important;
    }

    .leaflet-notification {
        width: 100% !important;
        max-width: calc(100vw - 20px) !important;
        box-sizing: border-box;
    }

    /* Mobile popup adjustments to ensure they fit in viewport */
    .leaflet-popup {
        padding-right: 40px !important;
    }

    .leaflet-popup-content-wrapper {
        max-width: 280px !important;
        max-height: calc(100vh - 150px) !important;
        overflow-y: auto !important;
    }

    /* Fix close button position on mobile to account for popup padding */
    .leaflet-container a.leaflet-popup-close-button {
        right: 40px !important;
    }

    .cave-popup-wrapper {
        width: 250px !important;
    }

    .cave-tooltip-popup .leaflet-popup-content {
        width: 250px !important;
    }

    /* Ensure popup content is scrollable */
    .cave-popup-ore-icons {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* ======================================
   Theme-Specific Overrides
   ====================================== */

/* Sidebar pane text colors */
.sidebar-pane {
    color: var(--text-primary);
}

.sidebar-pane h2,
.sidebar-pane h3 {
    color: var(--text-heading);
}

.sidebar-pane h4,
.sidebar-pane p,
.sidebar-pane li,
.sidebar-pane span {
    color: var(--text-primary);
}

/* Info boxes - adjust for dark mode */
body:not(.light-mode) .sidebar-pane>div[style*="background: linear-gradient(135deg, #e3f2fd"] {
    background: var(--info-box-bg-gradient) !important;
}

body:not(.light-mode) .sidebar-pane>div[style*="background: linear-gradient(135deg, #e3f2fd"] * {
    color: var(--info-box-text) !important;
}

/* Warning/orange info boxes for dark mode */
body:not(.light-mode) .sidebar-pane>div[style*="background: linear-gradient(135deg, #fff3e0"] {
    background: linear-gradient(135deg, #3a2e1e 0%, #2e2419 100%) !important;
}

body:not(.light-mode) .sidebar-pane>div[style*="background: linear-gradient(135deg, #fff3e0"] * {
    color: #ffb74d !important;
}

/* Filter section borders */
.filter-section {
    border-bottom-color: var(--border-color);
}

/* ======================================
   MAP SELECTION & DROPDOWNS
   ====================================== */

/* Styled Select Dropdown - Dark Mode */
body:not(.light-mode) .styled-select {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .styled-select:hover {
    border-color: #2196F3;
    background: var(--bg-tertiary);
}

body:not(.light-mode) .styled-select:focus {
    background: var(--bg-tertiary);
}

body:not(.light-mode) .styled-select:disabled {
    background: var(--bg-primary);
    color: var(--text-tertiary);
    opacity: 0.5;
}

body:not(.light-mode) .select-arrow {
    color: var(--text-secondary);
}

body:not(.light-mode) .styled-select:hover+.select-arrow,
body:not(.light-mode) .styled-select:focus+.select-arrow {
    color: #2196F3;
}

/* ======================================
   BUTTONS & CONTROLS
   ====================================== */

/* Styled Buttons - Dark Mode */
body:not(.light-mode) .styled-button:not(.primary):not(.danger) {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .styled-button:not(.primary):not(.danger):hover {
    background: var(--bg-tertiary);
    border-color: #2196F3;
}

body:not(.light-mode) .styled-button:disabled {
    background: var(--bg-primary);
    color: var(--text-tertiary);
    opacity: 0.4;
}

/* Popup Buttons - Dark Mode */
body:not(.light-mode) .popup-button:not(.primary):not(.danger):not(.success) {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .popup-button:not(.primary):not(.danger):not(.success):hover {
    background: var(--bg-tertiary);
    border-color: #2196F3;
}

/* ======================================
   LEAFLET POPUPS & TOOLTIPS
   ====================================== */

/* Override Leaflet default popup styles */
body:not(.light-mode) .leaflet-popup-content-wrapper,
body:not(.light-mode) .leaflet-popup-tip {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 3px 14px rgba(85, 85, 85, 0.4) !important;
}

body:not(.light-mode) .leaflet-popup-content {
    color: var(--text-primary) !important;
}

body:not(.light-mode) .leaflet-popup-content h1,
body:not(.light-mode) .leaflet-popup-content h2,
body:not(.light-mode) .leaflet-popup-content h3,
body:not(.light-mode) .leaflet-popup-content h4,
body:not(.light-mode) .leaflet-popup-content p,
body:not(.light-mode) .leaflet-popup-content span,
body:not(.light-mode) .leaflet-popup-content div {
    color: var(--text-primary) !important;
}

/* Override for icon grid items to preserve --mi-color */
body:not(.light-mode) .leaflet-popup-content .icon-grid-item .mi {
    color: var(--mi-color) !important;
}

body:not(.light-mode) .leaflet-popup-tip {
    background-color: var(--bg-secondary) !important;
}

/* Map Tips Popup - Dark Mode */
body:not(.light-mode) .map-tips-popup {
    background: var(--bg-secondary);
    border-color: #1976D2;
}

body:not(.light-mode) .map-tips-header {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    color: #ffffff;
}

body:not(.light-mode) .map-tips-body {
    color: var(--text-primary);
}

body:not(.light-mode) .map-tips-body p {
    color: var(--text-primary);
}

body:not(.light-mode) .map-tips-close {
    color: #ffffff;
}

/* Cave Popup Specific Styling */
body:not(.light-mode) .cave-popup-wrapper {
    color: var(--text-primary);
}

body:not(.light-mode) .cave-popup-info,
body:not(.light-mode) .cave-popup-status {
    border-bottom-color: var(--border-color);
}

body:not(.light-mode) .cave-popup-status-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .cave-popup-status-btn:hover {
    background: var(--bg-secondary);
    border-color: #2196F3;
    color: #64b5f6;
}

body:not(.light-mode) .cave-popup-status-btn.active {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: #ffffff;
    box-shadow: 0 3px 6px rgba(33, 150, 243, 0.4);
}

body:not(.light-mode) .cave-popup-status-btn.active:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    border-color: #1565C0;
}

/* ======================================
   ORE SEARCH TOOL / FILTER POPUP
   ====================================== */

body:not(.light-mode) .ore-filter-popup {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

body:not(.light-mode) .ore-filter-header {
    border-bottom-color: var(--border-color);
}

body:not(.light-mode) .ore-filter-header h3 {
    color: var(--text-primary);
}

body:not(.light-mode) .ore-filter-close {
    color: var(--text-secondary);
}

body:not(.light-mode) .ore-filter-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

body:not(.light-mode) .ore-filter-cave-toggle {
    background: var(--bg-tertiary);
}

body:not(.light-mode) .ore-filter-cave-toggle:hover {
    background: var(--bg-primary);
}

body:not(.light-mode) .ore-filter-cave-toggle label {
    color: var(--text-primary);
}

/* ======================================
   MAP.PHP INLINE STYLE DARK MODE
   ====================================== */

/* Info Box Component - Dark Mode */
body:not(.light-mode) .info-box--blue {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-left-color: #1976D2;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
}

body:not(.light-mode) .info-box--blue:hover {
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

body:not(.light-mode) .info-box--blue .info-box__title {
    color: #64b5f6;
}

body:not(.light-mode) .info-box--blue .info-box__list {
    color: var(--text-secondary);
}

body:not(.light-mode) .info-box--blue .info-box__list strong {
    color: #64b5f6;
}

body:not(.light-mode) .info-box--blue .info-box__text {
    color: var(--text-primary);
}

/* Info Box - Orange (Support) - Dark Mode */
body:not(.light-mode) .info-box--orange {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-left-color: #F57C00;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
}

body:not(.light-mode) .info-box--orange:hover {
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

body:not(.light-mode) .info-box--orange .info-box__title {
    color: #ffb74d;
}

body:not(.light-mode) .info-box--orange .info-box__text {
    color: var(--text-primary);
}

/* Info Box - Purple (Community) - Dark Mode */
body:not(.light-mode) .info-box--purple {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2) 0%, rgba(156, 39, 176, 0.1) 100%);
    border-left-color: #9C27B0;
    box-shadow: 0 3px 10px rgba(156, 39, 176, 0.3);
}

body:not(.light-mode) .info-box--purple:hover {
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
}

body:not(.light-mode) .info-box--purple .info-box__title {
    color: #ba68c8;
}

body:not(.light-mode) .info-box--purple .info-box__text {
    color: var(--text-primary);
}

/* Info Box - Green (Thanks) - Dark Mode */
body:not(.light-mode) .info-box--green {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
    border-left-color: #4CAF50;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

body:not(.light-mode) .info-box--green .info-box__text {
    color: #81c784;
}

/* Info Box - Red (Dev/Danger) - Dark Mode */
body:not(.light-mode) .info-box--red {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(231, 76, 60, 0.1) 100%);
    border-left-color: #e74c3c;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

body:not(.light-mode) .info-box--red:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

body:not(.light-mode) .info-box--red .info-box__title {
    color: #ff6b6b;
}

body:not(.light-mode) .info-box--red .info-box__text {
    color: var(--text-primary);
}

/* Info Box - Yellow (What's New/Changes) - Dark Mode */
body:not(.light-mode) .info-box--yellow {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.2) 0%, rgba(74, 144, 226, 0.1) 100%);
    border-left-color: #4a90e2;
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
}

body:not(.light-mode) .info-box--yellow:hover {
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

body:not(.light-mode) .info-box--yellow .info-box__title {
    color: #64b5f6;
}

body:not(.light-mode) .info-box--yellow .info-box__text {
    color: var(--text-primary);
}

/* Info Box Highlight/Warning Badge - Dark Mode */
body:not(.light-mode) .info-box__highlight {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.25) 0%, rgba(255, 152, 0, 0.15) 100%);
    color: #ffb74d;
    border-left-color: #FF9800;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

/* Version Info - Dark Mode */
body:not(.light-mode) .version-info {
    border-top-color: var(--border-color);
    color: var(--text-secondary);
}

body:not(.light-mode) .version-info .clickable {
    color: var(--text-secondary);
}

body:not(.light-mode) .version-info .clickable:hover {
    color: #64b5f6;
}

/* Map Controls - Dark Mode */
body:not(.light-mode) .map-clear-button {
    color: var(--text-secondary);
}

/* Resource Links - Dark Mode */
body:not(.light-mode) .feedback-discord-link {
    color: #7289da;
}

body:not(.light-mode) .feedback-discord-link:hover {
    border-color: #7289da;
}

/* What's New Section - Dark Mode */
body:not(.light-mode) .whats-new-section {
    background-color: rgba(33, 150, 243, 0.1);
    border-color: #1976D2;
}

body:not(.light-mode) .whats-new-title {
    color: #64b5f6;
}

body:not(.light-mode) .whats-new-subtitle {
    color: #64b5f6;
}

body:not(.light-mode) .whats-new-update {
    background-color: rgba(76, 175, 80, 0.15);
    border-left-color: #4CAF50;
}

body:not(.light-mode) .whats-new-reminder {
    background-color: rgba(255, 152, 0, 0.15);
    border-left-color: #FF9800;
}

body:not(.light-mode) .whats-new-tip {
    background-color: rgba(33, 150, 243, 0.15);
    border-left-color: #2196F3;
}

body:not(.light-mode) .whats-new-archive {
    background-color: rgba(156, 39, 176, 0.15);
    border-left-color: #9C27B0;
}

body:not(.light-mode) .whats-new-feature {
    background-color: rgba(33, 150, 243, 0.15);
    border-left-color: #1976D2;
}

body:not(.light-mode) .whats-new-details {
    background-color: var(--bg-secondary);
}

body:not(.light-mode) .whats-new-summary {
    color: #64b5f6;
}

/* Display Settings - Dark Mode */
body:not(.light-mode) .display-setting-label:hover {
    background: rgba(33, 150, 243, 0.1);
}

body:not(.light-mode) .display-setting-description {
    color: var(--text-secondary);
}

body:not(.light-mode) .ore-filter-actions button {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body:not(.light-mode) .ore-filter-actions button:hover {
    background: var(--bg-secondary);
    border-color: #2196F3;
}

body:not(.light-mode) .ore-filter-item:hover {
    background: var(--bg-tertiary);
}

body:not(.light-mode) .ore-filter-item label {
    color: var(--text-primary);
}

body:not(.light-mode) .ore-filter-drill-section {
    border-top-color: var(--border-color);
}

body:not(.light-mode) .ore-filter-drill-section h4 {
    color: var(--text-secondary);
}

/* ======================================
   CUSTOM CONFIRM DIALOGS
   ====================================== */

body:not(.light-mode) .custom-confirm-dialog {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

body:not(.light-mode) .custom-confirm-header {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    color: #ffffff;
}

body:not(.light-mode) .custom-confirm-body {
    color: var(--text-primary);
}

body:not(.light-mode) .custom-confirm-body p {
    color: var(--text-primary);
}

body:not(.light-mode) .custom-confirm-body input[type="text"] {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

body:not(.light-mode) .custom-confirm-body input[type="text"]:focus {
    border-color: #2196F3;
    outline: none;
}

body:not(.light-mode) .custom-confirm-buttons {
    border-top-color: var(--border-color);
}

body:not(.light-mode) .custom-confirm-buttons .popup-button:not(.primary):not(.danger):not(.success) {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .custom-confirm-buttons .popup-button:not(.primary):not(.danger):not(.success):hover {
    background: var(--bg-tertiary);
    border-color: #2196F3;
    color: #64b5f6;
}

/* Custom confirm note - dark mode */
body:not(.light-mode) .custom-confirm-note {
    background-color: rgba(255, 193, 7, 0.15);
    border-left-color: #ffc107;
    color: #ffecb3;
}

/* ======================================
   SAVED MAPS MANAGEMENT - DARK MODE
   ====================================== */

body:not(.light-mode) .saved-map-name-row {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

body:not(.light-mode) .saved-map-name-label {
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-map-name-text {
    color: var(--text-primary);
}

body:not(.light-mode) .saved-map-change-btn {
    background: var(--bg-secondary);
    border-color: #2196F3;
    color: #64b5f6;
}

body:not(.light-mode) .saved-map-change-btn:hover {
    background: #2196F3;
    color: #ffffff;
}

body:not(.light-mode) .shared-map-overlay {
    background: rgba(30, 30, 30, 0.97);
}

body:not(.light-mode) .shared-map-overlay-content h4 {
    color: var(--text-primary);
}

body:not(.light-mode) .shared-map-overlay-content p {
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-maps-dialog {
    background: var(--bg-secondary);
}

body:not(.light-mode) .saved-maps-header {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
}

body:not(.light-mode) .saved-maps-body {
    background: var(--bg-secondary);
}

body:not(.light-mode) .saved-maps-empty {
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-maps-empty i {
    color: var(--border-color);
}

body:not(.light-mode) .saved-map-row {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

body:not(.light-mode) .saved-map-row:hover {
    background: var(--bg-primary);
    border-color: #2196F3;
}

body:not(.light-mode) .saved-map-row.active {
    background: rgba(33, 150, 243, 0.2);
    border-color: #2196F3;
}

body:not(.light-mode) .saved-map-row.unsaved-highlight {
    background: rgba(255, 167, 38, 0.15);
    border-color: #ffa726;
    box-shadow: 0 2px 8px rgba(255, 167, 38, 0.3);
}

body:not(.light-mode) .saved-map-row.unsaved-highlight:hover {
    background: rgba(255, 167, 38, 0.25);
    border-color: #ff9800;
}

body:not(.light-mode) .saved-map-name-input {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .saved-map-name-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

body:not(.light-mode) .saved-map-name-input.unsaved {
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-map-timestamp.deletion {
    color: #ef9a9a;
}

body:not(.light-mode) .saved-map-name-limit {
    color: #ef9a9a;
}

body:not(.light-mode) .saved-map-btn.open {
    background: var(--bg-secondary);
    border-color: #2196F3;
    color: #64b5f6;
}

body:not(.light-mode) .saved-map-btn.open:hover {
    background: #2196F3;
    color: #ffffff;
}

body:not(.light-mode) .saved-map-btn.menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-map-btn.menu:hover {
    background: var(--bg-tertiary);
    border-color: #7d7d7d;
    color: var(--text-primary);
}

body:not(.light-mode) .saved-map-floating-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

body:not(.light-mode) .saved-map-menu-item {
    color: var(--text-primary);
}

body:not(.light-mode) .saved-map-menu-item:hover {
    background: var(--bg-tertiary);
}

body:not(.light-mode) .saved-map-menu-item.danger {
    color: #ef9a9a;
}

body:not(.light-mode) .saved-map-menu-item.danger:hover {
    background: rgba(244, 67, 54, 0.18);
}

body:not(.light-mode) .saved-map-menu-item.is-disabled {
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-map-menu-item.is-disabled:hover {
    background: transparent;
}

body:not(.light-mode) .saved-map-metadata {
    color: var(--text-secondary);
}

body:not(.light-mode) .saved-maps-footer {
    border-top-color: var(--border-color);
}

body:not(.light-mode) .saved-maps-footer .popup-button:disabled {
    opacity: 0.4;
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* ======================================
   POPUP DOV (Ore Selection)
   ====================================== */

body:not(.light-mode) .popup-dov-container {
    background: var(--bg-secondary);
}

body:not(.light-mode) .popup-dov-select {
    background: var(--bg-secondary);
    border-right-color: var(--border-color);
}

body:not(.light-mode) .popup-dov-select li {
    color: var(--text-primary);
}

body:not(.light-mode) .popup-dov-select li:hover {
    background: var(--bg-tertiary);
}

body:not(.light-mode) .popup-dov-drill-section {
    /* background: var(--bg-tertiary); */
    border-left-color: var(--border-color);
}

body:not(.light-mode) .popup-dov-drill-title {
    color: var(--text-secondary);
}

body:not(.light-mode) .popup-dov-drill-option {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body:not(.light-mode) .popup-dov-drill-option:hover {
    background: var(--bg-tertiary);
    border-color: rgba(33, 150, 243, 0.4);
}

body:not(.light-mode) .popup-dov-drill-option.selected {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
    border-color: rgba(76, 175, 80, 0.6);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

body:not(.light-mode) .popup-dov-drill-option.selected:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.35) 0%, rgba(76, 175, 80, 0.25) 100%);
    border-color: rgba(76, 175, 80, 0.7);
}

/* ======================================
   MISSION SECTION
   ====================================== */

body:not(.light-mode) .miss {
    background: rgba(33, 150, 243, 0.15);
    border-left-color: #2196F3;
    color: var(--text-primary);
}

body:not(.light-mode) .sidebar-pane>div[style*="background: linear-gradient(135deg, #1e3a5f"] {
    background: linear-gradient(135deg, #1a2332 0%, #0f1a28 100%) !important;
}

body:not(.light-mode) .sidebar-pane>div[style*="border-left: 5px solid #2196F3"] {
    border-left-color: #2196F3 !important;
}

/* Custom Marker Popup */
body:not(.light-mode) .custom-marker-popup {
    color: var(--text-primary);
}

body:not(.light-mode) .popup-title {
    color: #64b5f6;
    /* background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(33, 150, 243, 0.1) 100%); */
    border-bottom-color: #1976D2;
}

body:not(.light-mode) .popup-label {
    color: var(--text-secondary);
}

body:not(.light-mode) .popup-input {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .popup-input:hover {
    border-color: #2196F3;
}

body:not(.light-mode) .popup-input:focus {
    background: var(--bg-tertiary);
    border-color: #2196F3;
}

body:not(.light-mode) .popup-buttons {
    border-top-color: var(--border-color);
}

body:not(.light-mode) .popup-button:not(.primary):not(.danger):not(.success) {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) .popup-button:not(.primary):not(.danger):not(.success):hover {
    background: var(--bg-tertiary);
    border-color: #2196F3;
    color: #64b5f6;
}

/* Primary and danger buttons keep their colors in dark mode */
body:not(.light-mode) .popup-button.primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: #fff;
}

body:not(.light-mode) .popup-button.primary:hover {
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    border-color: #1565C0;
    color: #fff;
}

body:not(.light-mode) .popup-button.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-color: #d32f2f;
    color: #fff;
}

body:not(.light-mode) .popup-button.danger:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-color: #c62828;
    color: #fff;
}

body:not(.light-mode) .popup-button.success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border-color: #388e3c;
    color: #fff;
}

body:not(.light-mode) .popup-button.success:hover {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    border-color: #2e7d32;
    color: #fff;
}

/* Scrollbar for dark mode */
body:not(.light-mode) .sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body:not(.light-mode) .sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1976D2 0%, #1565C0 100%);
    border-color: rgba(0, 0, 0, 0.3);
}

/* ======================================
   INPUT FIELDS
   ====================================== */

body:not(.light-mode) input[type="text"],
body:not(.light-mode) input[type="number"],
body:not(.light-mode) input[type="color"],
body:not(.light-mode) select,
body:not(.light-mode) textarea {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body:not(.light-mode) select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

body:not(.light-mode) input[type="text"]:focus,
body:not(.light-mode) input[type="number"]:focus,
body:not(.light-mode) select:focus,
body:not(.light-mode) textarea:focus {
    background-color: var(--bg-secondary);
    border-color: #2196F3;
}

body:not(.light-mode) input[type="text"]::placeholder,
body:not(.light-mode) textarea::placeholder {
    color: var(--text-tertiary);
}

/* Override inline styled inputs (like in dev cave editor) */
body:not(.light-mode) input[style*="border: 1px solid #2ecc71"],
body:not(.light-mode) select[style*="border: 1px solid #2ecc71"] {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body:not(.light-mode) input[style*="border: 1px solid #2ecc71"]:focus,
body:not(.light-mode) select[style*="border: 1px solid #2ecc71"]:focus {
    border-color: #2ecc71 !important;
    background-color: var(--bg-secondary) !important;
}

/* ======================================
   FILTER ROWS
   ====================================== */

body:not(.light-mode) .filterRow {
    background: rgba(255, 255, 255, 0.03);
}

body:not(.light-mode) .filterRow.alt-row {
    background: rgba(255, 255, 255, 0.05);
}

body:not(.light-mode) .filterRow:hover,
body:not(.light-mode) .filterRow.alt-row:hover {
    background: rgba(33, 150, 243, 0.15);
}

body:not(.light-mode) .filterRow span {
    color: var(--text-primary);
}

/* ======================================
   ICON BUTTONS (Unified)
   ====================================== */

body:not(.light-mode) .icon-button,
body:not(.light-mode) .reset-filters-btn,
body:not(.light-mode) .share-icon-button {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body:not(.light-mode) .icon-button:hover,
body:not(.light-mode) .reset-filters-btn:hover,
body:not(.light-mode) .share-icon-button:hover {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #1976D2;
    color: white;
}

/* ======================================
   CHECKBOXES & SWITCHES
   ====================================== */

body:not(.light-mode) input[type="checkbox"] {
    accent-color: #2196F3;
}

/* Labels next to checkboxes */
body:not(.light-mode) label {
    color: var(--text-primary);
}

/* ======================================
   MISC ELEMENTS
   ====================================== */

/* Filter section titles - keep blue in both themes */
.filter-section-title {
    color: #2196F3;
}

/* Theme toggle button styling */
#themeToggle {
    transition: all 0.3s ease;
}

#themeToggle:hover {
    transform: scale(1.02);
}

/* Color swatch borders for dark mode */
body:not(.light-mode) .color-swatch {
    border-color: var(--border-color);
}

body:not(.light-mode) .color-swatch:hover {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

body:not(.light-mode) .color-swatch.selected {
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px #2196F3, 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* ======================================
   CAVE POPUP ORE BUTTONS
   ====================================== */

body:not(.light-mode) .cave-popup-ore-circle {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body:not(.light-mode) .cave-popup-ore-circle:hover {
    background: var(--bg-tertiary);
    border-color: #2196F3;
}

body:not(.light-mode) .cave-popup-ore-name {
    color: var(--text-primary);
}

body:not(.light-mode) .cave-popup-ore-plus {
    color: var(--text-secondary);
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* ======================================
   SELECTED ORE IN ORE MENU (DOV Popup)
   ====================================== */

body:not(.light-mode) .popup-dov-select li.selected {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.25) 0%, rgba(33, 150, 243, 0.15) 100%);
    color: #64b5f6;
    box-shadow: inset 0 0 0 2px rgba(33, 150, 243, 0.4);
}

body:not(.light-mode) .popup-dov-select li.selected:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.35) 0%, rgba(33, 150, 243, 0.25) 100%);
}

/* ======================================
   WHAT'S NEW SECTION
   ====================================== */

body:not(.light-mode) #whatsNewSection {
    background-color: rgba(33, 150, 243, 0.1) !important;
    border-color: #2196F3 !important;
}

body:not(.light-mode) #whatsNewSection h2,
body:not(.light-mode) #whatsNewSection h3 {
    color: #64b5f6 !important;
}

body:not(.light-mode) #whatsNewSection p {
    color: var(--text-primary) !important;
}

body:not(.light-mode) #whatsNewSection strong {
    color: var(--text-primary) !important;
}

/* What's new colored boxes */
body:not(.light-mode) #whatsNewSection p[style*="background-color: #e7f9e7"] {
    background-color: rgba(76, 175, 80, 0.15) !important;
    border-left-color: #4caf50 !important;
}

body:not(.light-mode) #whatsNewSection p[style*="background-color: #fff9e6"] {
    background-color: rgba(255, 152, 0, 0.15) !important;
    border-left-color: #ff9800 !important;
}

body:not(.light-mode) #whatsNewSection p[style*="background-color: #e6f0ff"] {
    background-color: rgba(33, 150, 243, 0.15) !important;
    border-left-color: #2196F3 !important;
}

body:not(.light-mode) #whatsNewSection p[style*="background-color: #e7cdffff"] {
    background-color: rgba(118, 5, 223, 0.15) !important;
    border-left-color: #7605df !important;
}

body:not(.light-mode) #whatsNewSection p[style*="background-color: #cde4ffff"] {
    background-color: rgba(5, 56, 223, 0.15) !important;
    border-left-color: #0538df !important;
}

body:not(.light-mode) #whatsNewSection details {
    background-color: var(--bg-tertiary) !important;
}

body:not(.light-mode) #whatsNewSection summary {
    color: #64b5f6 !important;
}

body:not(.light-mode) #whatsNewSection ul li {
    color: var(--text-primary) !important;
}

body:not(.light-mode) #whatsNewSection .whats-new-discord-link {
    color: #8cc7ff !important;
    text-shadow: 0 0 6px rgba(33, 150, 243, 0.45);
}

body:not(.light-mode) #whatsNewSection .whats-new-discord-link:hover {
    color: #bbdefb !important;
}

body:not(.light-mode) #whatsNewSection .whats-new-room-name {
    background-color: rgba(88, 101, 242, 0.25);
    border-color: rgba(129, 140, 248, 0.55);
    color: #d6deff;
}

/* Mini Info Box - Dark Mode */
body:not(.light-mode) .mini-info-box--success {
    background-color: rgba(76, 175, 80, 0.15) !important;
    border-left-color: #4caf50 !important;
}

body:not(.light-mode) .mini-info-box--warning {
    background-color: rgba(255, 152, 0, 0.15) !important;
    border-left-color: #ff9800 !important;
}

body:not(.light-mode) .mini-info-box--info {
    background-color: rgba(0, 89, 255, 0.15) !important;
    border-left-color: #0059ff !important;
}

body:not(.light-mode) .mini-info-box--feature {
    background-color: rgba(5, 56, 223, 0.15) !important;
    border-left-color: #0538df !important;
}

body:not(.light-mode) .mini-info-box--archive {
    background-color: rgba(118, 5, 223, 0.15) !important;
    border-left-color: #7605df !important;
}

body:not(.light-mode) .mini-info-box {
    color: var(--text-primary) !important;
}

body:not(.light-mode) .mini-info-box strong {
    color: var(--text-primary) !important;
}

/* ======================================
   FEEDBACK SECTION
   ====================================== */

/* Feedback section hover boxes */
body:not(.light-mode) .sidebar-pane#feedback div[style*="onmouseover"] {
    transition: all 0.3s ease !important;
}

body:not(.light-mode) .sidebar-pane#feedback h2,
body:not(.light-mode) .sidebar-pane#feedback h4 {
    color: #64b5f6 !important;
}

body:not(.light-mode) .sidebar-pane#feedback p,
body:not(.light-mode) .sidebar-pane#feedback li {
    color: var(--text-primary) !important;
}

body:not(.light-mode) .sidebar-pane#feedback strong {
    color: var(--text-primary) !important;
}

/* Feedback info box */
body:not(.light-mode) .sidebar-pane#feedback>div[style*="background: linear-gradient(135deg, #e3f2fd"] {
    background: var(--info-box-bg-gradient) !important;
}

/* Feedback orange box (DevTools) */
body:not(.light-mode) .sidebar-pane#feedback div[style*="background: linear-gradient(135deg, #fff3e0"] {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%) !important;
}

body:not(.light-mode) .sidebar-pane#feedback div[style*="background: linear-gradient(135deg, #fff3e0"] strong {
    color: #ffb74d !important;
}

/* Discord link */
body:not(.light-mode) .sidebar-pane#feedback a[style*="color: #5865F2"] {
    color: #7289da !important;
}

body:not(.light-mode) .sidebar-pane#feedback a[href*="discord"] {
    color: #7289da !important;
}

/* Support box at bottom */
body:not(.light-mode) .sidebar-pane#feedback>div[style*="background: linear-gradient(135deg, #fff3e0"]:last-of-type {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%) !important;
}

/* Wiki link */
body:not(.light-mode) .sidebar-pane#feedback a[href*="wiki"] {
    color: #64b5f6 !important;
}

/* ======================================
   HARDCODED BACKGROUNDS (Settings, etc)
   ====================================== */

/* Settings tab - Display Settings boxes with #f0f8ff background */
body:not(.light-mode) div[style*="background-color: #f0f8ff"] {
    background-color: rgba(33, 150, 243, 0.1) !important;
}

body:not(.light-mode) div[style*="background-color: #f0f8ff"] strong {
    color: var(--text-primary) !important;
}

body:not(.light-mode) div[style*="background-color: #f0f8ff"] div {
    color: var(--text-secondary) !important;
}

/* Settings h4 headings */
body:not(.light-mode) .sidebar-pane#settings h4 {
    color: var(--text-primary) !important;
}

body:not(.light-mode) .sidebar-pane#settings label {
    color: var(--text-primary) !important;
}

/* ======================================
   MAP STATUS ICON
   ====================================== */

/* Dark mode uses same theme-aware variables, no additional rules needed */

/* ======================================
   SWITCHES / TOGGLES
   ====================================== */

body:not(.light-mode) .slider {
    background: linear-gradient(135deg, #404040 0%, #505050 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

body:not(.light-mode) .slider::before {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
}

body:not(.light-mode) input:checked+.slider {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: rgba(33, 150, 243, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 12px rgba(33, 150, 243, 0.5);
}

body:not(.light-mode) input:checked+.slider::before {
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

body:not(.light-mode) input:disabled+.slider {
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    opacity: 0.4;
}

body:not(.light-mode) input:disabled:checked+.slider {
    background: linear-gradient(135deg, #546e7a 0%, #455a64 100%);
}

/* ======================================
   ORE FILTER BUTTON
   ====================================== */

body:not(.light-mode) .ore-filter-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
}

body:not(.light-mode) .ore-filter-btn.active:hover {
    background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
}

body:not(.light-mode) .ore-filter-btn:disabled {
    background: linear-gradient(135deg, #505050 0%, #404040 100%);
    opacity: 0.4;
}
