:root {
    --panel-bg: rgba(28, 28, 28, 0.8);
    --primary-dark: #00585b;
    --primary-bright: #00ccad;
    --light-bg: #eceffi;
    --accent-orange: #ff6d00;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    /* cursor: url('/images/cursor.svg'), auto !important; */
}

body {
    position: relative;
    background: black;
}

#cesiumContainer {
    position: absolute;
    top: 0;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 1;
}

.cesium-viewer,
.cesium-viewer canvas,
.cesium-widget,
.cesium-widget canvas {
    width: 100% !important;
    height: 100vh !important;
}

.menu-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
}

.button-container {
    background: var(--panel-bg) !important;
    padding: 0px 24px;
    border-radius: 10px;
    gap: 10px;
    display: flex;
    flex-direction: row;
    width: 600px;
}

/* When panel is active, remove top border radius */
.menu-panel.panel-open .button-container {
    border-radius: 0 0 10px 10px !important;
}

.menu-btn {
    background: var(--primary-dark);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
}

.menu-btn:hover {
    background: var(--primary-bright);
    color: #00585b;
}

.menu-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.panel-container {
    position: absolute;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    overflow: hidden;
    z-index: 998;
    pointer-events: none;
}

.content-panel {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px 10px 0 0;
    opacity: 0;
    transform: translate(0, 0);
    pointer-events: none;
    height: 0;
    padding: 0 15px;
    overflow: hidden;
    transition: transform 0.3s linear, opacity 0.3s linear, height 0.3s linear, padding 0.3s linear;
}

.content-panel.active {
    opacity: 1;
    transform: translate(0, 0);
    pointer-events: auto;
    height: auto;
    padding: 15px;
}

.content-panel.closing {
    transform: translate(0, 100%);
    opacity: 0;
}

/* Ensure panel is always displayed but invisible when not active */
.content-panel {
    display: block !important;
}

.panel-content {
    display: none;
}

.panel-content.active {
    display: block;
}

.views-container,
.models-container,
.projects-container,
.tileset-container {
    margin-bottom: 15px;
}

.views-header,
.models-header,
.projects-header,
.tileset-header,
.menu-content-header,
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.add-view-btn,
.add-model-btn,
.add-project-btn,
.add-tileset-btn {
    background: var(--primary-dark);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
}

.add-view-btn:hover,
.add-model-btn:hover,
.add-project-btn:hover,
.add-tileset-btn:hover {
    background: var(--primary-bright);
    color: #00585b;
}

.views-list,
.models-list,
.projects-list,
.tileset-list,
.tags-list,
.gisData-list {
    /* Remove max-height and overflow-y so sections expand naturally */
    min-height: 32px;
}

/* --- UNIFIED LINE ITEM STYLES --- */
.project-item,
.view-item,
.model-item,
.tag-item,
.gis-data-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
    height: auto !important;
    max-height: none !important;
}
.project-item:hover,
.view-item:hover,
.model-item:hover,
.tag-item:hover,
.gis-data-item:hover {
    background: rgba(55, 55, 55, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}
.project-name,
.view-text,
.model-text,
.tag-text,
.gis-data-item span {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
}
.project-input,
.view-input,
.model-input,
.tag-input,
.gis-data-item input {
    background: rgba(25, 25, 25, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    width: 100%;
    font-size: 0.95em;
}

.view-item .view-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.view-item button,
.model-item button,
.tileset-item button {
    background: var(--primary-dark);
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.view-item button:hover,
.model-item button:hover,
.tileset-item button:hover {
    background: var(--primary-bright);
    color: #00585b;
}

.remove-btn {
    background: rgba(255, 0, 0, 0.3);
    border: none;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 0.5);
}

.menu-container,
.settings-container {
    margin-bottom: 15px;
}

.menu-content,
.settings-content {
    margin-top: 10px;
}

/* Logout button styles */
#logoutBtn {
    background: var(--primary-dark, #00585b);
    color: #fff;
    height: 44px;
    font-size: 15px;
    padding: 10px 22px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 400;
    font-family: inherit;
    margin-bottom: 10px;
}

#logoutBtn:hover,
#logoutBtn:active {
    background: var(--primary-bright, #00ccad);
    color: #111;
}

#logoutBtn:active {
    transform: translateY(1px);
}

.project-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.project-item:hover .project-buttons {
    opacity: 1;
}

.project-buttons button {
    background: var(--primary-dark);
    color: #fff;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.project-buttons button:hover {
    background: var(--primary-bright);
    color: #00585b;
}

.project-buttons .delete-project {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

.project-buttons .delete-project:hover {
    background: rgba(220, 53, 69, 0.4);
    color: #fff;
}

.no-projects-message {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 0.9em;
}

#settingsCogBtn {
    background: transparent;
    border: none;
    color: white;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 20px;
    display: inline-block;
    margin-left: 8px;
    outline: none;
}
#settingsCogBtn:hover, #settingsCogBtn:focus {
    background: rgba(255,255,255,0.12);
}

#settingsPanel {
    background: var(--panel-bg) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    color: #f3f3f3 !important;
    font-family: Arial, sans-serif !important;
    padding: 18px 24px !important;
    margin-right: 5px !important;
    margin-top: 10px !important;
    transform: scaleY(0.9);
    transform-origin: top right;
    border: none !important;
    max-width: 340px;
}

#settingsPanel.active {
    display: block;
}

#settingsPanel .content {
    margin-top: 20px;
}

/* Settings Button and Panel Styles */
#settingsButton.active {
    background-color: rgba(48, 51, 54, 0.8);
    border-color: #759dc0;
    box-shadow: 0 0 8px #fff;
}

.cesium-panel {
    position: absolute;
    right: 5px;
    background: rgba(38, 38, 38, 0.95);
    border: 1px solid #444;
    border-radius: 4px;
    color: #edffff;
    padding: 10px;
    font-family: sans-serif;
    max-width: 300px;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cesium-panel-content {
    padding: 10px;
}

.cesium-panel-content h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 1px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: left;
}

.setting-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-item-full {
    /*margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); */
}

.logout-button {
    width: 100%;
    background: var(--accent-orange, #ff6d00);
    color: var(--light-bg);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-button:hover {
    background: #ff8c1a;
    transform: translateY(-1px);
}

.logout-button:active {
    transform: translateY(1px);
}

.logout-button i {
    font-size: 16px;
}

.setting-item label {
    margin-right: 10px;
    font-size: 14px;
}

.setting-item select {
    background: rgba(28, 28, 28, 0.9);
    color: #fff;
    border: 1px solid #444;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 14px;
    width: 180px;
}

.setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-orange, #ff6d00);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-orange, #ff6d00);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.menu-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2em;
    min-width: 2em;
    max-width: 2em;
    height: 2em;
    font-size: 0.92em;
    font-weight: bold;
    color: rgba(255,255,255,0.7);
    background: rgba(30,30,30,0.85);
    border-radius: 50%;
    box-shadow: 2px 3px 10px 2px rgba(0,0,0,0.45) inset, 0 0 0 2px rgba(255,255,255,0.04) inset;
    letter-spacing: 0.5px;
    margin: 0 6px 0 0;
    vertical-align: middle;
    pointer-events: none;
    text-align: center;
    padding: 0;
}

.menu-btn-text {
    position: relative;
    z-index: 2;
    margin-top: 0;
}

.menu-panel.panel-open .button-container .menu-btn:first-child {
    border-top-left-radius: 0 !important;
}
.menu-panel.panel-open .button-container .menu-btn:last-child {
    border-top-right-radius: 0 !important;
}

#currentProjectName {
    position: fixed;
    top: 0px;
    left: 5px;
    transform: none;
    z-index: 2000;
    font-size: 2.1rem;
    font-weight: bold;
    color: rgba(255,255,255,0.5);
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    letter-spacing: 1px;
    pointer-events: none;
    user-select: none;
    margin: 0;
    padding: 0 5px;
    text-align: left;
}

.delete-project {
    background: rgba(220, 53, 69, 0.3) !important;
}
.delete-project:hover {
    background: rgba(220, 53, 69, 0.5) !important;
}

.tag-buttons {
    display: flex;
    gap: 5px;
}
.tag-item button {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.tag-item button:hover {
    background: rgba(0, 0, 0, 0.5);
}
.tag-name {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    overflow: visible;
    max-width: 400px;
    flex: 1 1 0;
}
.tag-text {
    display: block;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    white-space: normal;
    word-break: break-word;
    max-width: 400px;
    overflow-wrap: break-word;
}
.tag-item .delete-tag {
    background: rgba(220, 53, 69, 0.3) !important;
}
.tag-item .delete-tag:hover {
    background: rgba(220, 53, 69, 0.5) !important;
}

.cesium-infoBox {
    right: 10px !important;
    margin-right: 3px !important;
    border-radius: 12px !important;
    transform: scaleY(0.9);
    transform-origin: top right;
    box-shadow: none !important;
    background: var(--panel-bg) !important;
    height: 80vh !important;
    max-height: 80vh !important;
    overflow: auto !important;
}

.cesium-infoBox-description {
    height: 100% !important;
}

.cesium-infoBox-description table tr:first-child th,
.cesium-infoBox-description table tr:first-child td {
    padding-top: 20px !important;
}
.cesium-infoBox-description table th, .cesium-infoBox-description table td {
    padding-top: 8px !important;
}

.cesium-infoBox-title, .cesium-infoBox-header {
    border-top-right-radius: 12px !important;
    min-height: 28px !important;
    font-size: 1.3em !important;
    line-height: 1.3em !important;
    padding: 12px 18px 10px 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.cesium-infoBox-title {
    font-weight: 600 !important;
    flex: 1 1 auto;
    text-align: center;
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    pointer-events: none;
    letter-spacing: 0.5px;
    color: #fff;
}
.cesium-infoBox-camera, .cesium-infoBox-camera svg, .cesium-infoBox-camera svg path {
    width: 50px !important;
    height: 32px !important;
    font-size: 1.3em !important;
    min-width: 50px !important;
    min-height: 32px !important;
    vertical-align: middle;
    margin-left: 0px;
    position: relative;
    pointer-events: auto;
    color: #bbb;
    fill: #bbb;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
    transition: color 0.15s, fill 0.15s;
}
.cesium-infoBox-camera:hover, .cesium-infoBox-camera:focus,
.cesium-infoBox-camera svg:hover, .cesium-infoBox-camera svg:focus,
.cesium-infoBox-camera svg path:hover, .cesium-infoBox-camera svg path:focus {
    color: #fff !important;
    fill: #fff !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
}
.cesium-infoBox-fa-close {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 1.3em;
    color: #bbb;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    opacity: 0.85;
    transition: color 0.15s, opacity 0.15s;
}
.cesium-infoBox-fa-close:hover, .cesium-infoBox-fa-close:focus {
    color: #fff !important;
    opacity: 1;
    background: none !important;
    border: none !important;
}

#transform-mode-controls {
    background: var(--panel-bg) !important;
}

/* Sidebar layout for left column navigation */
#sidebar {
    position: relative;
    top: 0;
    left: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: 2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(-100%); /* Start collapsed */
}

#sidebar.expanded {
    transform: translateX(0);
}

body #sidebarToggle.sidebar-collapse-btn {
    position: fixed;
    top: 50%;
    left: 50px;
    transform: translate(-100%, -50%);
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1em;
    padding: 28px 0 28px 0;
    background: rgba(24, 25, 28, 0.95);
    border: none;
    border-radius: 0 6px 6px 0;
    color: #aaa;
    cursor: pointer;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    z-index: 3000;
    transition: left 0.3s ease-in-out, background 0.3s, color 0.3s;
}

@media (min-width: 1920px) {
    #sidebarToggle.sidebar-collapse-btn { left: 480px; }
}
@media (max-width: 1280px) {
    #sidebarToggle.sidebar-collapse-btn { left: 320px; }
}

body #sidebar.expanded ~ #sidebarToggle.sidebar-collapse-btn {
    left: calc(max(min(20vw, 480px), 320px) + 50px);
    transition: left 0.3s ease-in-out;
}

body #sidebar.collapsed ~ #sidebarToggle.sidebar-collapse-btn {
    left: 0;
}

body #sidebar.expanded {
    transform: translateX(0);
}

body #sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar-collapse-btn i {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20, 20, 20, 0.92);
    /* overflow: hidden; */
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
.sidebar-header:hover {
    background: #23242a;
}
.sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: var(--primary-bright, #00ccad);
    opacity: 0.8;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
.sidebar-header:hover > span {
    color: var(--primary-bright, #00ccad);
    opacity: 1;
}

.sidebar-title {
    color: var(--primary-bright, #00ccad) !important;
}

/* Override all settings sidebar header span colors to primary bright */
#settingsSidebar .sidebar-header > span {
    color: #00ccad !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

#settingsSidebar .sidebar-header:hover > span {
    color: #00ccad !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

/* Additional overrides for any nested elements */
#settingsSidebar .sidebar-section .sidebar-header > span,
#settingsSidebar .sidebar-section.collapsed .sidebar-header > span,
#settingsSidebar .sidebar-section.expanded .sidebar-header > span {
    color: #00ccad !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}
.sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    margin-left: 0;
    margin-right: 0;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100% !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100% !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}


.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100vw !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100vw !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}

.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100vw !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100vw !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}

.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100vw !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100vw !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}

.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100vw !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100vw !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}

.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100vw !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100vw !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}

.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
    gap: 0;
}
.sidebar-header .add-view-btn,
.sidebar-header .add-model-btn,
.sidebar-header .add-project-btn,
.sidebar-header .add-tag-btn,
.sidebar-header .add-tileset-btn {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.1em;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
}
.sidebar-header .add-view-btn:hover,
.sidebar-header .add-model-btn:hover,
.sidebar-header .add-project-btn:hover,
.sidebar-header .add-tag-btn:hover,
.sidebar-header .add-tileset-btn:hover {
    color: #fff;
}
.sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover {
    color: #fff;
}
.sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
.sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
.sidebar-content {
    /* Remove max-height and overflow-y so sections expand naturally */
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
.sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
/* Custom scrollbar for dark theme */
#sidebar, .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}
/* Remove old bottom menu styles if needed */
.menu-panel, .button-container, .content-panel, .panel-container {
    display: none !important;
}

#currentProjectName {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    text-align: left;
    pointer-events: auto;
    user-select: auto;
}

/* Remove any other width adjustments for Cesium container */
.cesium-viewer {
    width: 100vw !important;
    height: 100vh !important;
}

.cesium-viewer canvas {
    width: 100vw !important;
    height: 100vh !important;
}

#cesiumContainer.sidebar-collapsed {
    /* Remove this class entirely as we don't need it anymore */
    display: none;
}

.model-buttons,
.view-buttons,
.project-buttons,
.gis-data-item .model-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

/* Force .model-item to match unified line item style */
.model-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6) !important;
    border-radius: 8px !important;
    color: #fff !important;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent !important;
    min-height: 44px;
    box-sizing: border-box;
}
.model-item:hover {
    background: rgba(55, 55, 55, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Match .model-name and .model-text to .project-name and .view-text */
.model-name,
.model-text {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    vertical-align: middle;
}

.model-buttons {
    display: flex;
    gap: 5px;
}

/* Unified .menu-toggle (three-dot menu) style for all line items */
.menu-toggle {
  background: none !important;
  border: none;
  color: #888 !important;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  transition: color 0.2s;
  z-index: 2;
}
.menu-toggle:focus,
.menu-toggle.active,
.menu-toggle:hover {
  background: none !important;
  color: #fff !important;
}

/* Shared menu styles for all list items */
.item-menu {
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    position: relative;
    justify-content: flex-end;
    height: 100%;
    min-width: 48px;
}
.item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: right center;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.2s;
    background: rgba(30,30,30,0.92);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    z-index: 1;
    gap: 6px;
    border: none;
}
.item-actions button,
.item-actions input[type="color"],
.item-actions .icon-tag,
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .ai-enhance-view,
.item-actions .ai-enhance-view i {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa !important;
    background: transparent !important;
    transition: color 0.15s;
}
.item-actions button:hover,
.item-actions input[type="color"]:hover,
.item-actions .icon-tag:hover,
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .ai-enhance-view:hover,
.item-actions .ai-enhance-view:hover i {
    color: #fff !important;
    background: transparent !important;
}
.item-menu.open .item-actions {
    transform: translateY(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}
.item-actions button, .item-actions input[type="color"], .item-actions .icon-tag {
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    font-size: 20px;
    padding: 0 8px;
    margin: 0 2px;
    background: #23242a;
    border: none;
    color: #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-actions button:hover, .item-actions input[type="color"]:hover, .item-actions .icon-tag:hover {
    background: #35363c;
    color: #fff;
}
/* Remove tint for delete/trash buttons in menu popups */
.item-actions .delete-project,
.item-actions .delete-model,
.item-actions .delete-tag,
.item-actions .delete-project i,
.item-actions .delete-model i,
.item-actions .delete-tag i {
    color: #aaa !important;
    background: transparent !important;
    filter: none !important;
    transition: color 0.15s;
}
.item-actions .delete-project:hover,
.item-actions .delete-model:hover,
.item-actions .delete-tag:hover,
.item-actions .delete-project:hover i,
.item-actions .delete-model:hover i,
.item-actions .delete-tag:hover i {
    color: #fff !important;
    background: transparent !important;
    filter: none !important;
}

.item-actions input[type="color"] {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    padding: 0px !important;
    margin: 10px !important;
    border-radius: 6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-actions .icon-tag {
    vertical-align: middle;
    align-self: center;
    height: 40px;
    height: 40px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body, #sidebar, .content-panel, .panel-container {
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  box-sizing: border-box;
}

#sidebarToggle.sidebar-collapse-btn {
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.1em;
    padding: 28px 0 28px 0;
}
#sidebarCurrentProjectName.sidebar-project-vertical {
    color: var(--primary-bright, #00ccad) !important;
    opacity: 0.5;
    letter-spacing: 0.05em;
    display: block;
    text-align: center;
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1.1;
    margin-bottom: 2px;
    white-space: pre;
    user-select: none;
    text-transform: uppercase;
}
#sidebarToggle.sidebar-collapse-btn:hover #sidebarCurrentProjectName.sidebar-project-vertical {
    opacity: 1;
    color: #fff;
}

.project-item:hover .project-name,
.view-item:hover .view-text,
.model-item:hover .model-text,
.tag-item:hover .tag-text,
.gis-data-item:hover span {
    color: #fff;
    opacity: 1;
}

.view-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
}
.view-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 65%;
    display: flex;
    align-items: center;
}
.view-text {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95em;
    color: #fff;
    opacity: 0.5;
    margin-right: 12px;
    transition: color 0.15s, opacity 0.15s;
    display: inline-block;
    vertical-align: middle;
}

/* Right-side settings sidebar */
#settingsSidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 20vw;
    min-width: 320px;
    max-width: 480px;
    background: rgba(24, 25, 28, 0.95);
    color: #f3f3f3;
    box-shadow: -2px 0 16px rgba(0,0,0,0.25);
    z-index: 2000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* Start collapsed */
}
#settingsSidebar.expanded {
    transform: translateX(0);
}
#settingsSidebar .sidebar-section {
    margin-bottom: 8px;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: margin-bottom 0.3s ease-in-out;
}
#settingsSidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    background: rgba(40,40,40,0.98);
    border-bottom: 1px solid #232323;
    color: #fff;
    user-select: none;
    transition: background 0.15s;
    gap: 10px;
    min-height: 56px;
    height: 56px;
}
#settingsSidebar .sidebar-header:hover {
    background: #23242a;
}
#settingsSidebar .sidebar-header > span {
    flex: 1 1 auto;
    text-align: left;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
}
#settingsSidebar .sidebar-header:hover > span {
    color: #fff;
    opacity: 1;
}
#settingsSidebar .sidebar-toggle {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#settingsSidebar .sidebar-toggle:hover {
    color: #fff;
}
#settingsSidebar .sidebar-toggle .fa-chevron-down {
    transition: transform 0.3s ease-in-out;
}
#settingsSidebar .sidebar-section.collapsed .sidebar-toggle .fa-chevron-down {
    transform: rotate(-90deg);
}
#settingsSidebar .sidebar-content {
    padding: 10px 18px 16px 18px;
    transition: all 0.3s ease-in-out;
    background: none;
}
#settingsSidebar .sidebar-section.collapsed .sidebar-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}
#settingsSidebarToggle.sidebar-collapse-btn.right {
    position: fixed;
    top: 50%;
    right: 50px;
    transform: translate(100%, -50%);
    width: 72px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 1.5em;
    padding: 28px 0 28px 0;
    background: rgba(24, 25, 28, 0.95);
    border: none;
    border-radius: 6px 0 0 6px;
    color: #aaa;
    cursor: pointer;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    z-index: 3000;
    transition: right 0.3s ease-in-out, background 0.3s, color 0.3s;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
#settingsSidebar.expanded ~ #settingsSidebarToggle.sidebar-collapse-btn.right {
    right: calc(max(min(20vw, 480px), 320px) + 50px);
    transition: right 0.3s ease-in-out;
}
#settingsSidebar.collapsed ~ #settingsSidebarToggle.sidebar-collapse-btn.right {
    right: 0;
}

/* Hide Cesium's default base layer picker dropdown */
.cesium-baseLayerPicker-dropDown, .cesium-baseLayerPicker-button {
    display: none !important;
}

/* Base Layer Grid Styles for Settings Sidebar */
.base-layer-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #f3f3f3;
    letter-spacing: 0.5px;
    text-align: left;
}
.base-layer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
}
.base-layer-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 8px 4px 4px 4px;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.base-layer-tile.selected {
    border: 2px solid #4fc3f7;
    box-shadow: 0 0 0 2px #4fc3f733;
}
.base-layer-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    margin-bottom: 4px;
    object-fit: cover;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.base-layer-name {
    font-size: 13px;
    color: #f3f3f3;
    text-align: center;
    margin-top: 2px;
    word-break: break-word;
}

#sidebar, .sidebar-content, #settingsSidebar, #settingsSidebar .sidebar-content {
    scrollbar-width: thin;
    scrollbar-color: #444 #232323;
}
#sidebar::-webkit-scrollbar, .sidebar-content::-webkit-scrollbar, #settingsSidebar::-webkit-scrollbar, #settingsSidebar .sidebar-content::-webkit-scrollbar {
    width: 8px;
    background: #232323;
}
#sidebar::-webkit-scrollbar-thumb, .sidebar-content::-webkit-scrollbar-thumb, #settingsSidebar::-webkit-scrollbar-thumb, #settingsSidebar .sidebar-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 6px;
}

.cesium-baseLayerPicker-button,
.cesium-viewer-toolbar .cesium-baseLayerPicker-dropDown {
    display: none !important;
}

/* Settings Sidebar - Larger labels and dropdowns */
#settingsSidebar .sidebar-section label,
#settingsSidebar .setting-item label,
#settingsSidebar select {
  font-size: 15px !important;
  font-weight: 600 !important;
}

.cesium-baseLayerPicker-dropDown, .cesium-baseLayerPicker-button {
    display: none !important;
}
.cesium-viewer-toolbar .cesium-baseLayerPicker-container {
    display: none !important;
}

/* --- Cesium: Hide base layer picker UI but keep functionality for sidebar --- */
.cesium-baseLayerPicker-dropDown,
.cesium-baseLayerPicker-button,
.cesium-viewer-toolbar .cesium-baseLayerPicker-container {
    display: none !important;
}

.cesium-baseLayerPicker-selected {
    display: none !important;
}

.cesium-toolbar-button .cesium-baseLayerPicker-selected,
.cesium-toolbar-button[title*="Bing Maps"],
.cesium-toolbar-button[data-bind*="toggleDropDown"] {
    display: none !important;
}

#settingsSidebarToggle.sidebar-collapse-btn.right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 0 28px 0;
    gap: 30px;
    min-height: 96px;
}

#settingsSidebarToggle .cesium-geocoder-searchButton {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-icon-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    margin: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-icon-btn:hover,
.sidebar-icon-btn:focus {
    color: #fff;
    background: rgba(80, 150, 255, 0.08);
}
#settingsSidebarToggle.sidebar-collapse-btn.right {
    gap: 24px;
    padding: 28px 0 28px 0;
    min-height: 200px;
}
#settingsSidebarToggle .fa-search,
#settingsSidebarToggle .fa-cog {
    font-size: 1em;
}

.sidebar-geocoder-flyout {
    position: absolute;
    left: auto;
    right: 100%;
    top: 0;
    margin-right: 16px;
    z-index: 4000;
    background: rgba(30,30,30,0.98);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 8px 12px;
    display: none;
    transition: opacity 0.2s, transform 0.2s;
}
.sidebar-geocoder-flyout.open {
    display: block;
    opacity: 1;
    transform: translateX(-12px);
}

.cesium-geocoder {
    position: fixed !important;
    top: 50%;
    right: 90px;
    transform: translateY(-50%);
    z-index: 5000;
    background: rgba(30,30,30,0.98);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 8px 12px;
    display: none;
    transition: opacity 0.2s, transform 0.2s;
}
.cesium-geocoder.open {
    display: block;
}

.sidebar-flyout,
#locationFlyout {
    margin-right: 0 !important;
    background: rgba(24, 25, 28, 0.95) !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.sidebar-flyout {
    position: absolute;
    right: 100%;
    top: 0;
    margin-right: 16px;
    z-index: 4000;
    background: #222;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    padding: 16px 24px;
    display: none;
    min-width: 500px;
    min-height: 80px;
    color: #fff;
    font-size: 1.1em;
}
.sidebar-flyout.open {
    display: block;
}

#locationFlyout {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}
#locationFlyout.open {
    display: flex;
}

.cesium-viewer-geocoderContainer .cesium-geocoder-searchButton {
    display: none !important;
}

.cesium-viewer-geocoderContainer form {
    display: flex;
    align-items: center;
    width: 100%;
}
.cesium-geocoder-input {
    width: 100% !important;
    box-sizing: border-box !important;
    background: #23242a !important;
    border: 1.5px solid #3a3b40 !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-size: 0.85em !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border 0.18s, box-shadow 0.18s;
    padding-left: 12px !important;
}
.cesium-geocoder-input:focus {
    border: 1.5px solid #3a3b40 !important;
    box-shadow: none !important;
}
.cesium-geocoder-input::-webkit-search-cancel-button {
    appearance: none;
    height: 18px;
    width: 18px;
    background: url('data:image/svg+xml;utf8,<svg fill="%23bbb" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 8.586l4.95-4.95 1.414 1.414L11.414 10l4.95 4.95-1.414 1.414L10 11.414l-4.95 4.95-1.414-1.414L8.586 10l-4.95-4.95L5.05 3.636 10 8.586z"/></svg>') center/18px 18px no-repeat !important;
    background-color: transparent !important;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
}
.cesium-geocoder-input::-webkit-search-cancel-button:hover {
    background: url('data:image/svg+xml;utf8,<svg fill="%23fff" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 8.586l4.95-4.95 1.414 1.414L11.414 10l4.95 4.95-1.414 1.414L10 11.414l-4.95 4.95-1.414-1.414L8.586 10l-4.95-4.95L5.05 3.636 10 8.586z"/></svg>') center/18px 18px no-repeat !important;
}

#locationFlyout .cesium-viewer-geocoderContainer {
    width: 100%;
}
#locationFlyout .cesium-viewer-geocoderContainer form {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.cesium-geocoder-input::placeholder,
.cesium-geocoder-input::-webkit-input-placeholder,
.cesium-geocoder-input:-ms-input-placeholder {
    font-size: .85em !important;
    color: #bbb !important;
    opacity: 1 !important;
}

#locationFlyout.open ~ #settingsSidebarToggle .sidebar-icon-btn#searchSidebarBtn {
    color: #fff !important;
    background: rgba(80, 150, 255, 0.12) !important;
}
#locationFlyout.open ~ #settingsSidebarToggle.sidebar-collapse-btn.right {
    border-top-left-radius: 0 !important;
}

#settingsSidebarToggle.flyout-open .sidebar-icon-btn#searchSidebarBtn {
    color: #fff !important;
    background: none !important;
}
#settingsSidebarToggle.flyout-open {
    border-top-left-radius: 0 !important;
}

#settingsSidebarToggle.flyout-open .sidebar-icon-btn#searchSidebarBtn:hover,
#settingsSidebarToggle.flyout-open .sidebar-icon-btn#searchSidebarBtn:focus,
#settingsSidebarToggle.flyout-open .sidebar-icon-btn#searchSidebarBtn:active {
    background: none !important;
    color: #fff !important;
    outline: none !important;
}

#settingsSidebarToggle .sidebar-icon-btn#searchSidebarBtn:hover,
#settingsSidebarToggle .sidebar-icon-btn#searchSidebarBtn:focus,
#settingsSidebarToggle .sidebar-icon-btn#searchSidebarBtn:active {
    background: none !important;
    color: #fff !important;
    outline: none !important;
}

#settingsSidebarToggle .cesium-viewer-fullscreenContainer {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto !important;
    margin: 12px 0 0 0 !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
#settingsSidebarToggle .cesium-viewer-fullscreenContainer .cesium-fullscreenButton {
    background: none !important;
    border: none !important;
    color: #ccc !important;
    cursor: pointer;
    padding: 8px !important;
    border-radius: 50% !important;
    transition: color 0.2s, background 0.2s;
    margin: 0 !important;
    outline: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.1em !important;
    min-width: 30px;
    min-height: 30px;
    box-shadow: none !important;
}
#settingsSidebarToggle .cesium-viewer-fullscreenContainer .cesium-fullscreenButton:hover,
#settingsSidebarToggle .cesium-viewer-fullscreenContainer .cesium-fullscreenButton:focus {
    color: #fff !important;
    background: rgba(80, 150, 255, 0.08) !important;
    border: none !important;
    box-shadow: none !important;
}

#settingsSidebarToggle .cesium-viewer-fullscreenContainer .cesium-svgPath-svg,
#settingsSidebarToggle .cesium-viewer-fullscreenContainer .cesium-svgPath-svg path,
#settingsSidebarToggle .cesium-viewer-fullscreenContainer .cesium-fullscreenButton i {
    fill: currentColor !important;
    color: inherit !important;
    font-size: 1.1em !important;
    width: 1em;
    height: 1em;
    display: block;
    margin: 0 auto;
}

#settingsSidebarFullscreenBtn,
#settingsSidebarFullscreenBtn:hover,
#settingsSidebarFullscreenBtn:focus,
#settingsSidebarFullscreenBtn:active,
#settingsSidebarCogBtn,
#settingsSidebarCogBtn:hover,
#settingsSidebarCogBtn:focus,
#settingsSidebarCogBtn:active {
    background: transparent !important;
    box-shadow: none !important;
}

.project-item.current {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-bright) 100%);
    color: #fff;
    border: 2px solid var(--primary-bright);
    box-shadow: 0 2px 8px rgba(0,255,170,0.12);
    opacity: 1;
}
.project-item.current .project-name {
    color: #eceff1;
}

.cesium-performanceDisplay {
    position: fixed !important;
    top: 12px !important;
    right: 18px !important;
    left: auto !important;
    z-index: 3001 !important;
    pointer-events: none;
}

.cesium-infoBox-fa-close {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 1.3em;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.cesium-infoBox-fa-close:hover {
    opacity: 1;
    color: var(--primary-bright, #00ccad);
}

.cesium-infoBox-iframe {
    margin-top: 60px !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: auto !important;
}

/* Account section buttons in settings sidebar */
#manageSubscriptionBtn,
#emailSupportBtn,
#logoutBtn {
    background: var(--primary-dark, #00585b);
    color: #fff;
    height: 44px;
    font-size: 15px;
    padding: 10px 22px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 400;
    font-family: inherit;
    margin-bottom: 10px;
}
#manageSubscriptionBtn:hover,
#manageSubscriptionBtn:active,
#emailSupportBtn:hover,
#emailSupportBtn:active,
#logoutBtn:hover,
#logoutBtn:active {
    background: var(--primary-bright, #00ccad);
    color: #111;
}

.toggle-tags-visibility-btn,
.toggle-models-visibility-btn,
.toggle-markups-visibility-btn,
.toggle-gisdata-visibility-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.1em;
    margin-left: 0;
    margin-right: 0;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toggle-tags-visibility-btn:hover,
.toggle-models-visibility-btn:hover,
.toggle-markups-visibility-btn:hover,
.toggle-gisdata-visibility-btn:hover {
    color: #fff;
}

/* Responsive transform controls toolbar for mobile */
@media (max-width: 600px) {
  #transform-mode-controls {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    gap: 6px !important;
    padding: 8px 4px !important;
  }
  #transform-mode-controls button {
    padding: 6px 8px !important;
    font-size: 13px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    width: auto !important;
    height: 36px !important;
    flex: 0 0 auto !important;
  }
  #transform-mode-controls button span.button-label {
    display: none !important;
  }
}

/* Shared modal content style for large AI modals */
.ai-modal-content-large {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(30, 30, 30, 0.97);
    border-radius: 18px;
    padding: 0 60px 36px 60px;
    max-width: 1200px;
    max-height: 96vh;
    overflow: hidden auto;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 8px 32px;
    color: rgb(243, 243, 243);
    min-width: 340px;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgb(68, 68, 68) rgb(35, 35, 35);
    position: relative;
}

/* Shared preview image style for AI modals */
.ai-modal-preview-img {
    max-width: 100%;
    max-height: 600px;
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: 8px;
    background: #181818;
    margin-bottom: 2px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* AI Guidance container for both modals */
.ai-guidance-container {
  width: 100%;
  margin: 0;
  padding: 18px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid #333;
  border-radius: 7px;
  background: rgba(30,30,30,0.97);
}

/* AI Guidance label/header for both modals */
.ai-guidance-label {
  font-size: 1.08em;
  font-weight: 600;
  color: #fff;
  margin: 14px 0 6px 0;
  letter-spacing: 0.2px;
  opacity: 0.92;
  text-align: left;
  padding-left: 18px;
}

/* Modal header for AI modals */
.ai-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding-bottom: 15px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
}

#settingsSidebarCogBtn .fa-cog {
    color: var(--primary-dark, #00585b) !important;
}
#settingsSidebarCogBtn:hover .fa-cog {
    color: var(--primary-bright, #00ccad) !important;
}

#aiLibraryModalBtn {
    color: var(--primary-dark, #00585b) !important;
    background: none !important;
    border: none !important;
    transition: color 0.15s;
}
#aiLibraryModalBtn:hover {
    color: var(--primary-bright, #00ccad) !important;
}

/* Unified Settings Sidebar Toggle Colors */
.setting-item .switch .slider {
    background-color: #444;
    transition: .4s;
}
.setting-item .switch input:checked + .slider {
    background-color: var(--accent-orange, #ff6d00);
}
.setting-item .switch input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-orange, #ff6d00);
}
.setting-item .switch .slider:before {
    background-color: white;
}

@media (max-width: 700px) {
  .ai-library-grid {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
}

/* Responsive and rounded customInfoBox */
#customInfoBox {
  position: fixed;
  top: 70px;
  right: 24px;
  z-index: 5000;
  background: var(--panel-bg, #23242a);
  border-radius: 12px;
  border-top-left-radius: 12px; /* Ensures top left is rounded */
  box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 16px;
  padding: 0px;
  max-width: 525px;
  width: 100%;
  min-width: 0;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1.1em;
  overflow: hidden;
}

@media (max-width: 600px) {
  #customInfoBox {
    right: 0;
    left: 0;
    top: 0;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 0 16px 16px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    font-size: 1em;
  }
  #customInfoBoxHeader {
    min-height: 48px;
    padding: 12px 8px;
  }
  #customInfoBoxContent {
    padding: 8px 4px 6px;
  }
}

#customInfoBoxHeader {
  color: var(--primary-bright, #00ccad);
}

/* Custom scrollbar for general disclaimer modal */
#generalDisclaimerModalOverlay > div {
  scrollbar-width: thin;
  scrollbar-color: #444 #232323;
}
#generalDisclaimerModalOverlay > div::-webkit-scrollbar {
  width: 8px;
  background: #232323;
}
#generalDisclaimerModalOverlay > div::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 6px;
}

/* Center the gallery modal title and right-align the close button in the gallery modal only */
.ai-modal-header .gallery-modal-title {
  flex: 1;
  text-align: center;
}
.ai-modal-header .gallery-modal-close {
  margin-left: 18px;
}

#aiChatModal .ai-chat-area {
  scrollbar-width: thin;
  scrollbar-color: #444 #232323;
}
#aiChatModal .ai-chat-area::-webkit-scrollbar {
  width: 8px;
  background: #232323;
}
#aiChatModal .ai-chat-area::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 6px;
}

#aiChatModal .ai-chat-send-btn {
  background: var(--primary-dark, #00665a);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  flex-shrink: 0;
}
#aiChatModal .ai-chat-send-btn:hover, #aiChatModal .ai-chat-send-btn:focus {
  background: var(--primary-bright, #00ccad);
  color: #fff;
}

.tooltip {
    z-index: 99999 !important;
    background-color: #23242a !important;
    color: #fff !important;
    pointer-events: none !important;
}

/* Ensure tooltips are properly positioned and don't interfere with interactions */
.tooltip .tooltip-inner {
    background-color: #000000 !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    max-width: 300px !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}

/* Custom styling for AI enhancement button tooltips */
.tooltip.ai-enhance-tooltip {
    max-width: none !important;
    width: var(--tooltip-width) !important;
    text-align: center !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

.tooltip.ai-enhance-tooltip .tooltip-inner {
    max-width: 200px !important;
    width: auto !important;
    min-width: 0 !important;
    box-sizing: border-box;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center !important;
    padding: 8px 12px !important;
    background-color: #000000 !important;
    color: #fff !important;
}

/* Style for action button tooltips */
.tooltip.action-tooltip {
    margin-bottom: 4px !important;
}

.tooltip .tooltip-arrow, 
.tooltip.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
    border-top-color: #000000 !important;
    border-bottom-color: #000000 !important;
}

button[data-bs-custom-class="ai-enhance-tooltip"] {
    box-sizing: border-box;
}

.btn-24 {
  width: 24px;
  height: 24px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ref-add-btn {
  background: var(--primary-bright, #00ccad);
  color: #222;
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  margin-left: 8px;
}

.gis-data-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 6px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 8px;
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    min-height: 44px;
    box-sizing: border-box;
    height: auto !important;
    max-height: none !important;
}

.gis-data-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: auto !important;
    max-height: none !important;
}

.gis-data-name {
    font-size: 0.95em;
    color: #fff;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: auto !important;
    max-height: none !important;
    min-height: 1.2em !important;
    line-height: 1.2 !important;
}

.gis-data-details {
    font-size: 0.8em;
    color: #aaa;
    opacity: 0.7;
}

.gis-data-type {
    display: inline-block;
    background: var(--primary-dark, #00585b);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 500;
    margin-right: 6px;
}

.zoom-btn {
    background: var(--primary-dark, #00585b);
    color: #fff;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-right: 4px;
}

.zoom-btn:hover {
    background: var(--primary-bright, #00ccad);
    color: #111;
}
