/* Map view page styling */
#controlsSidebar {
    position: absolute;
    z-index: 4;
    top: 16px;
    left: 16px;
    width: 350px;
    max-width: calc(100% - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

@media (max-width: 767.98px) {
    #controlsSidebar {
        top: 8px;
        left: 8px;
        width: 92%;
    }

    #assetDetailCard {
        width: 95% !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.sidebar-header-text h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.sidebar-header-text p {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
}

.sidebar-search {
    padding: 12px 16px;
    background: #fff;
    display: flex;
    gap: 8px;
}

.sidebar-search input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    background: #f9fafb;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.sidebar-search .btn {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
}

.sidebar-search .btn:hover {
    background: #fff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.sidebar-filter {
    border-bottom: 1px solid #e5e7eb;
}

.filter-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #fff;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
}

.filter-header:hover {
    background: #f9fafb;
}

.filter-body {
    padding: 12px 16px;
    max-height: 300px;
    overflow-y: auto;
}

.filter-body .form-check {
    margin-bottom: 8px;
    padding-left: 24px;
}

.filter-body .form-check-input {
    margin-top: 2px;
}

.filter-body .form-check-label {
    font-size: 13px;
    color: #374151;
}

.filter-body .form-check .form-check {
    margin-left: 16px;
    font-size: 12px;
}

.sidebar-results {
    padding: 16px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.results-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.results-count {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 12px;
}

.results-search {
    margin-bottom: 12px;
}

.results-search input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    background: #f9fafb;
}

.results-search input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.results-list {
    max-height: 280px;
    overflow-y: auto;
}

.asset-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.asset-item:hover {
    background: #f3f4f6;
}

.asset-item .icon {
    color: #6b7280;
    font-size: 16px;
    flex-shrink: 0;
}

.asset-item .name {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #374151;
}

.asset-item .more {
    color: #9ca3af;
    font-size: 16px;
    flex-shrink: 0;
}

.filter-body::-webkit-scrollbar,
.results-list::-webkit-scrollbar {
    width: 6px;
}

.filter-body::-webkit-scrollbar-track,
.results-list::-webkit-scrollbar-track {
    background: #f9fafb;
}

.filter-body::-webkit-scrollbar-thumb,
.results-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

#map {
    height: 100vh;
}

.file-preview-item {
    transition: transform 0.2s ease;
}

.file-preview-item:hover {
    transform: scale(1.05);
}

.doc-item-icon {
    color: #dc3545;
}

.doc-item-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.image-preview-overlay {
    transition: opacity 0.2s ease;
}

#blackMenu {
    position: fixed;
    z-index: 998;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#blackMenu.show {
    opacity: 1;
    visibility: visible;
}

#navBarMaps {
    position: fixed;
    z-index: 999;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
}

#navBarMaps.show {
    left: 0;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.menu-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-header img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.menu-header-text h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.menu-header-text p {
    margin: 0;
    font-size: 11px;
    color: #6b7280;
}

.menu-close {
    padding: 4px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.menu-close:hover {
    color: #1f2937;
}

.menu-section {
    padding: 16px;
}

.menu-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
}

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

.menu-item-icon {
    color: #6b7280;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.menu-item-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.menu-item-arrow {
    color: #9ca3af;
    font-size: 16px;
}

.map-type-control {
    position: absolute;
    z-index: 5;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.map-type-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #1f2937;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.map-type-toggle:hover {
    background-color: #111827;
}

.map-type-menu {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    display: none;
    min-width: 160px;
}

.map-type-menu.show {
    display: block;
}

.map-type-option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #1f2937;
    cursor: pointer;
}

.map-type-option:hover,
.map-type-option.active {
    background-color: #f3f4f6;
}
