/* Minimalist Flat Design System for NetherMap */

:root {
    --bg-primary: #130505;
    --bg-secondary: #323338;
    --color-accent: #3b82f6;
    --text-primary: #F2EBDD;
    --text-secondary: #d1d5db;
    --border-color: #323338;
}
/* Removed global * reset to prevent navbar layout issues */

.page-map {
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Map Canvas */
#mapCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
    cursor: grab;
}

#mapCanvas:active {
    cursor: grabbing;
}

/* Flat UI Components Base */
.flat-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Search bar on the Top Left */
.search-container {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 100;
    width: 320px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    outline: none;
}

/* Search results dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 101;
}

.search-results.hidden {
    display: none !important;
}

.search-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.15s ease;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    opacity: 0.85;
    background: var(--bg-secondary);
}

.search-item:active {
    opacity: 0.7;
}

.search-item .name {
    font-weight: 500;
    color: var(--text-primary);
}

.search-item .category {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
}

.search-item .coords {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Left Details Sidebar Panel */
.details-panel {
    position: absolute;
    top: 88px;
    left: 24px;
    width: 320px;
    z-index: 100;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.details-panel.hidden {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.details-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.details-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#detailName {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.coords-tag {
    font-size: 11px;
    font-family: monospace;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--color-accent);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    transition: opacity 0.15s ease;
    line-height: 1;
}

.close-btn:hover {
    opacity: 0.85;
}

.close-btn:active {
    opacity: 0.7;
}

.badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-block;
}

.details-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.owner-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 8px;
}

.avatar-head {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.owner-info {
    display: flex;
    flex-direction: column;
}

.owner-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.owner-role {
    font-size: 11px;
    color: var(--text-secondary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 500;
}

/* Bottom Left Coordinates Tracker */
.coords-overlay {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 13px;
    pointer-events: none;
}

.coord-label {
    color: var(--color-accent);
    font-weight: bold;
}

/* Bottom Right Controls Overlay */
.controls-overlay {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    opacity: 0.85;
    background: var(--bg-secondary);
}

.control-btn:active {
    opacity: 0.7;
}

/* Force full screen map page with visible header and no scrollbars */
html, body.page-map {
    overflow: hidden !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-map {
    display: flex;
    flex-direction: column;
}

body.page-map .page-wrapper {
    display: flex;
    flex-direction: column;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.page-map .site-header {
    display: flex !important;
    flex-shrink: 0 !important;
}

body.page-map main {
    flex: 1 !important;
    height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.page-map .map-section,
body.page-map .map-wrapper {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.page-map .minimal-footer {
    display: none !important;
}

/* Scrollbar styling for dropdowns and sidebars only */
.search-results::-webkit-scrollbar,
.details-panel::-webkit-scrollbar {
    width: 6px;
}
.search-results::-webkit-scrollbar-track,
.details-panel::-webkit-scrollbar-track {
    background: transparent;
}
.search-results::-webkit-scrollbar-thumb,
.details-panel::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 3px;
}
.search-results::-webkit-scrollbar-thumb:hover,
.details-panel::-webkit-scrollbar-thumb:hover {
    opacity: 0.8;
}

/* Top Right Dimension Toggle */
.dimension-toggle-container {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
}

.dimension-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dimension-btn:hover {
    color: var(--text-primary);
}

.dimension-btn.active {
    background: var(--color-accent);
    color: var(--text-primary);
}
