/* Map.css - Clean, mobile-first styles for the ArcGIS Map page */

/* =============================================================================
   EMBED MODE STYLES (Clean, borderless map for embedding)
   ============================================================================= */

/* Embed mode: Hide all UI elements except the map */
.embed-mode .header {
    display: none !important;
}

.embed-mode .sidebar {
    display: none !important;
}

.embed-mode .map-status-overlay {
    display: none !important;
}

.embed-mode .boat-status-overlay {
    display: none !important;
}

.embed-mode .video-thumbnail {
    display: none !important;
}

.embed-mode .expanded-video-container {
    display: none !important;
}

.embed-mode .main-content-wrapper {
    min-height: 100vh;
}

.embed-mode .map-page-container {
    margin: 0;
    padding: 0;
    gap: 0;
    min-height: 100vh;
}

.embed-mode .left-column {
    gap: 0;
}

.embed-mode .map-section {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
}

.embed-mode .arcgis-map-wrapper {
    border-radius: 0;
    height: 100vh;
}

.embed-mode #viewDiv {
    height: 100vh !important;
}

/* Responsive embed mode adjustments */
@media (max-width: 768px) {
    .embed-mode .map-section {
        height: 100vh;
        min-height: 100vh;
    }
    
    .embed-mode .arcgis-map-wrapper {
        height: 100vh;
    }
}

/* Ensure embed mode iframe works well */
.embed-mode body {
    overflow: hidden;
}

/* =============================================================================
   MOBILE-FIRST BASE STYLES (Default: Mobile Layout)
   ============================================================================= */

/* Main content wrapper */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
}

/* Map page container - MOBILE DEFAULT: Stack vertically */
.map-page-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
    margin: 0 2%; /* 2% margin on left and right */
    padding: 0.5rem;
    gap: 0.5rem;
    overflow: visible;
    box-sizing: border-box;
}

/* Left column - contains video and map */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

/* Map section - MOBILE: Full width, 40% height */
.map-section {
    width: 100%;
    height: 40vh;
    min-height: 250px;
    flex-shrink: 0;
    /* padding-right: 2.5%; */
}

/* ArcGIS map wrapper */
.arcgis-map-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* Map div */
#viewDiv {
    width: 100%;
    height: 100%;
}

/* Sidebar (Grafana) - MOBILE: Full width, remaining height */
.sidebar {
    width: 100%;
    flex: 1;
    min-height: 0;
    height: 3000px;
    order: 2;
    background-color: #111217;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    /* padding-left: 2.5%; */
}





.sidebar iframe {
    width: calc(100% / 0.75);
    height: 4000px;
    border: none;
    display: block;
    overflow: hidden;
    transform: scale(0.75);
    transform-origin: top left;
}

/* Resize handle - HIDDEN on mobile */
.resize-handle {
    display: none;
}

/* =============================================================================
   MOBILE STYLES (1200px and below) - Explicit overrides
   ============================================================================= */

@media screen and (max-width: 1200px) {
    /* Ensure mobile layout is enforced */
    .map-page-container {
        flex-direction: column !important;
        height: calc(100vh - 120px) !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }
    
    /* Force header to single row layout */
    .header-top {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    /* Show hamburger menu for tablet and below */
    .hamburger-menu {
        display: flex !important;
        order: 3 !important;
    }
    
    /* Hide main navigation for tablet and below */
    .main-nav {
        display: none !important;
        order: 2 !important;
    }
    
    /* Tablet header adjustments */
    .header {
        min-height: 55px !important;
    }
    
    .header-top {
        padding: 10px 20px !important;
        min-height: 55px !important;
        max-height: 55px !important;
    }
    
    .header-logo {
        order: 1 !important;
        flex: 1 !important;
    }
    
    .header-logo h1 {
        font-size: 24px !important;
        color: #ffffff !important;
    }
    
    .header-logo img {
        height: 32px !important;
    }
    
    /* Map section - Mobile: Full width */
    .map-section {
        width: 100% !important;
        height: 40vh !important;
        min-height: 250px !important;
        flex: none !important;
        order: 1 !important;
    }
    
    /* Sidebar - Mobile: Full width, no constraints */
    .sidebar {
        width: 100% !important;
        flex: 1 !important;
        min-height: 0 !important;
        max-width: none !important;
        order: 2 !important;
    }
    
    /* Hide resize handle on mobile */
    .resize-handle {
        display: none !important;
    }
    
    /* Hide overlays on mobile to save screen space */
    .boat-status-overlay {
        display: none !important;
    }
    
    /* Full bleed override for specific views on mobile */
    .map-page-container.view-map,
    .map-page-container.view-dashboard {
        padding: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
    }
}

/* =============================================================================
   DESKTOP STYLES (1201px and above)
   ============================================================================= */

@media screen and (min-width: 1201px) {
    /* Switch to side-by-side layout */
    .map-page-container {
        flex-direction: row;
        padding: 1rem;
        gap: 1rem;
        height: calc(100vh - 120px);
    }
    
    /* Left column - DESKTOP: Fill remaining space (50% when sidebar is 50%) */
    .left-column {
        width: 50%;
        height: 100%;
        flex: 1;
        gap: 1rem;
    }
    
    /* Video container - DESKTOP: Take appropriate height */
    .expanded-video-container {
        height: 40vh;
        min-height: 250px;
        flex-shrink: 0;
    }
    
    /* Map section - DESKTOP: Fill remaining height */
    .map-section {
        width: 100%;
        height: 100%;
        min-height: auto;
        flex: 1;
    }
    
    /* Sidebar - DESKTOP: Responsive width with 50% max */
    .sidebar {
        width: 50%;
        height: calc(100vh - 120px);
        min-width: 300px;
        max-width: 50%;
        flex: none;
        overflow-x: hidden;
        overflow-y: auto;
        transition: all 0.3s ease;
    }
    
    /* Grafana full-page mode */
    .grafana-fullpage .sidebar {
        width: 100%;
        max-width: 100%;
        position: relative;
        background: var(--bg-primary);
        height: calc(100vh - 120px);
    }
    
    .grafana-fullpage .left-column {
        display: none;
    }
    
    .grafana-fullpage .map-page-container {
        overflow: hidden;
    }
    
    /* Close button for full-page Grafana view */
    .grafana-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 10000;
        background: var(--accent);
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transition: all 0.2s ease;
    }
    
    .grafana-close-btn:hover {
        background: var(--accent-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }
    
    /* Show resize handle on desktop */
    .resize-handle {
        display: block;
        position: absolute;
        left: -5px;
        top: 0;
        bottom: 0;
        width: 10px;
        cursor: col-resize;
        z-index: 1000;
        background: transparent;
        transition: background-color 0.2s ease;
        border-radius: 0 4px 4px 0;
    }
    
    .resize-handle:hover {
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(100, 255, 218, 0.3) 40%, 
            rgba(100, 255, 218, 0.3) 60%, 
            transparent 100%);
    }
    
    .resize-handle.dragging {
        background: linear-gradient(90deg, 
            transparent 0%, 
            rgba(100, 255, 218, 0.6) 40%, 
            rgba(100, 255, 218, 0.6) 60%, 
            transparent 100%);
    }
}

/* =============================================================================
   MOBILE HAMBURGER MENU & HEADER LAYOUT
   ============================================================================= */

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    order: 3;
}

/* CRITICAL: Mobile Header Layout - Force single row - Override ALL other styles */
@media screen and (max-width: 768px) {
    .header {
        min-height: 50px !important;
        max-height: 50px !important;
        overflow: visible !important;
    }
    
    .header-top {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 8px 15px !important;
        gap: 10px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        box-sizing: border-box !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        position: relative !important;
        background: inherit !important;
        border: none !important;
        text-align: left !important;
    }
    
    .header-top * {
        max-height: 50px !important;
        box-sizing: border-box !important;
    }
    
    .header-logo {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
        order: 1 !important;
        max-height: 50px !important;
        text-decoration: none !important;
    }
    
    .header-logo img {
        height: 28px !important;
        width: auto !important;
        flex-shrink: 0 !important;
        max-height: 28px !important;
    }
    
    .header-logo h1 {
        font-size: 20px !important;
        color: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
        flex-shrink: 1 !important;
        max-height: 50px !important;
        display: inline !important;
        float: none !important;
        clear: none !important;
        position: static !important;
    }
    
    .main-nav {
        display: none !important;
        order: 2 !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    .hamburger-menu {
        display: flex !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: center !important;
        order: 3 !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: 24px !important;
        height: 24px !important;
        max-height: 24px !important;
        flex-direction: column !important;
        justify-content: space-around !important;
        float: none !important;
        clear: none !important;
    }
}

@media screen and (max-width: 480px) {
    .header {
        min-height: 45px;
    }
    
    .header-top {
        padding: 6px 10px !important;
        min-height: 45px !important;
    }
    
    .header-logo img {
        height: 24px !important;
    }
    
    .header-logo h1 {
        font-size: 18px !important;
        color: #ffffff !important;
    }
    
    .hamburger-menu {
        width: 20px !important;
        height: 20px !important;
    }
}



.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--text-primary, #ffffff);
    border-radius: 3px;
    opacity: 1;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.hamburger-menu.open span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.hamburger-menu.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    padding-top: 80px;
}

.mobile-nav-overlay.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.mobile-nav-overlay .nav-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 20px !important;
    margin: 10px 0 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.15), rgba(100, 255, 218, 0.25)) !important;
    border: 1px solid rgba(100, 255, 218, 0.3) !important;
    backdrop-filter: blur(15px) !important;
    width: 80% !important;
    max-width: 300px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.mobile-nav-overlay .nav-link * {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.mobile-nav-overlay .nav-link:hover {
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.3), rgba(100, 255, 218, 0.4)) !important;
    border-color: rgba(100, 255, 218, 0.6) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.2) !important;
}

.mobile-nav-overlay .nav-link:hover * {
    color: #ffffff !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.mobile-nav-overlay .nav-link span:first-child {
    font-size: 28px !important;
    margin-bottom: 8px !important;
    filter: brightness(1.2) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.mobile-nav-overlay .nav-link span:last-child {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7) !important;
}

/* Mobile iframe styles - maintain 75% scaling with min-height */
@media screen and (max-width: 768px) {
    .main-content-wrapper {
        min-height: 3000px !important;
    }
    
    .map-page-container {
        min-height: 3000px !important;
    }
    
    .sidebar {
        min-height: 3000px !important;
    }
    
    .sidebar iframe {
        width: calc(100% / 0.75);
        height: 4000px;
        transform: scale(0.75);
        transform-origin: top left;
        overflow: hidden;
        min-height: 4000px !important;
    }
}

/* =============================================================================
   ULTRA-MOBILE STYLES (400px and below)
   ============================================================================= */

@media screen and (max-width: 400px) {
    .map-page-container {
        padding: 0.25rem;
        gap: 0.25rem;
        min-height: 3000px !important;
    }
    
    .map-section {
        height: 35vh;
        min-height: 200px;
    }
    
    .sidebar {
        flex: 1;
        min-height: 3000px !important;
    }
    
    /* Show hamburger menu on ultra-mobile */
    .hamburger-menu {
        display: flex !important;
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Hide main navigation on ultra-mobile */
    .main-nav {
        display: none !important;
    }
    
    /* Ultra-mobile header tweaks */
    .header {
        min-height: 40px;
    }
    
    .header-top {
        padding: 4px 8px !important;
        min-height: 40px !important;
    }
    
    .header-logo h1 {
        font-size: 16px !important;
        color: #ffffff !important;
    }
    
    .header-logo img {
        height: 20px !important;
    }
}

/* =============================================================================
   VIDEO OVERLAY STYLES
   ============================================================================= */

/* Combined Live Feed indicator */
.live-feed-combined {
    display: flex;
    align-items: center;
}

.live-feed-text {
    background: #ff0000;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    animation: blink 0.8s infinite;
    box-shadow: 0 1px 3px rgba(255, 0, 0, 0.4);
    border: 1px solid #cc0000;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-align: center;
    display: inline-block;
    line-height: 1.2;
}

@keyframes blink {
    0%, 60% { 
        opacity: 1; 
        background: #ff0000;
        box-shadow: 0 4px 8px rgba(255, 0, 0, 0.6);
    }
    61%, 100% { 
        opacity: 0.7; 
        background: #cc0000;
        box-shadow: 0 2px 4px rgba(255, 0, 0, 0.3);
    }
}

/* Video thumbnail */
.video-thumbnail {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 180px;
    height: 101px;
    z-index: 1000;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}

.video-thumbnail:hover {
    transform: scale(1.05);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.video-thumbnail:hover .play-overlay {
    background: rgba(0,0,0,0.9);
}

/* Mobile video adjustments */
@media screen and (max-width: 400px) {
    .video-thumbnail {
        width: 80px;
        height: 45px;
        right: 5px;
        top: 40px;
    }
    

    
    .play-overlay {
        width: 20px;
        height: 20px;
        font-size: 8px;
    }
}

/* =============================================================================
   EXPANDED VIDEO STYLES
   ============================================================================= */

.expanded-video-container {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    height: 40vh;
    min-height: 250px;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    min-height: 36px;
}

.video-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.video-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.video-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.expand-video-btn,
.close-video-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.expand-video-btn:hover,
.close-video-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: scale(1.1);
}

.expand-video-btn {
    font-size: 16px;
}

/* Video maximized state */
.video-maximized .expanded-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 90% !important;
    height: 100vh !important;
    z-index: 10000;
    background: var(--bg-primary);
    border-radius: 0;
    border: none;
}

.video-maximized .expanded-video-container .video-wrapper {
    height: calc(100vh - 40px); /* Subtract reduced header height */
}

.video-maximized .left-column {
    display: none;
}

.video-maximized .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 10% !important;
    height: 100vh !important;
    z-index: 9999;
    margin: 0;
}

.video-maximized .map-page-container {
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    height: calc(100% - 50px); /* Subtract header height */
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Mobile expanded video adjustments */
@media screen and (max-width: 400px) {
    .expanded-video-container {
        height: 35vh;
        min-height: 200px;
    }
    
    .video-header {
        padding: 4px 8px;
    }
    
    .video-header-left {
        gap: 8px;
    }
    
    .video-header h3 {
        font-size: 14px;
    }
    
    .live-feed-text {
        font-size: 9px;
        padding: 1px 4px;
        letter-spacing: 0.2px;
    }
    
    .expand-video-btn,
    .close-video-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
    
    .expand-video-btn {
        font-size: 14px;
    }
}

/* =============================================================================
   MAP OVERLAYS AND CONTROLS
   ============================================================================= */

/* GPS Status Overlay - Hidden by default */
.map-status-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(10, 25, 47, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    min-width: 200px;
    display: none;
}

/* Boat Status Overlay - Hidden */
.boat-status-overlay {
    display: none;
}

.overlay-title {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}



@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.refresh-icon.spinning {
    animation: rotate 1s linear infinite;
}

/* =============================================================================
   LOADING INDICATOR
   ============================================================================= */

.iframe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.iframe-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-secondary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================================================
   VIEW MODE CLASSES - Single Page Navigation
   ============================================================================= */

/* Default state - show everything (all view) */
.map-page-container.view-all .left-column,
.map-page-container.view-all .sidebar {
    display: flex;
}

/* Dashboard view - hide video and map, show only Grafana */
.map-page-container.view-dashboard .left-column {
    display: none;
}

.map-page-container.view-dashboard .sidebar {
    width: 100% !important;
    display: flex;
}

/* Mobile full bleed for dashboard view with min-height */
@media screen and (max-width: 768px) {
    .map-page-container.view-dashboard {
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        height: 3000px !important;
        min-height: 3000px !important;
    }
    
    .map-page-container.view-dashboard .sidebar {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        height: 3000px !important;
        min-height: 3000px !important;
    }
    
    .map-page-container.view-dashboard .sidebar iframe {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
}

@media screen and (max-width: 480px) {
    .map-page-container.view-dashboard {
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        height: 3000px !important;
        min-height: 3000px !important;
    }
    
    .map-page-container.view-dashboard .sidebar {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        height: 3000px !important;
        min-height: 3000px !important;
    }
    
    .map-page-container.view-dashboard .sidebar iframe {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* Video view - hide map and Grafana, show only video */
.map-page-container.view-video .map-section {
    display: none;
}

.map-page-container.view-video .sidebar {
    display: none;
}

.map-page-container.view-video .expanded-video-container {
    height: calc(100vh - 120px);
}

/* Map view - hide video and Grafana, show only map */
.map-page-container.view-map .expanded-video-container {
    display: none;
}

.map-page-container.view-map .sidebar {
    display: none;
}

.map-page-container.view-map .map-section {
    width: 100% !important;
    height: calc(100vh - 120px);
}

/* Full bleed map view - remove all containers and padding */
.map-page-container.view-map {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    height: calc(100vh - 120px) !important;
    min-height: calc(100vh - 120px) !important;
}

.map-page-container.view-map .left-column {
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-page-container.view-map .map-section {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.map-page-container.view-map .arcgis-map-wrapper {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-page-container.view-map #viewDiv {
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile full bleed adjustments for map view */
@media screen and (max-width: 768px) {
    .map-page-container.view-map {
        height: calc(100vh - 80px) !important;
        min-height: calc(100vh - 80px) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .map-page-container.view-map .map-section {
        height: calc(100vh - 80px) !important;
        min-height: calc(100vh - 80px) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .map-page-container.view-map .left-column {
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    
    .map-page-container.view-map .arcgis-map-wrapper {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media screen and (max-width: 480px) {
    .map-page-container.view-map {
        height: calc(100vh - 60px) !important;
        min-height: calc(100vh - 60px) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .map-page-container.view-map .map-section {
        height: calc(100vh - 60px) !important;
        min-height: calc(100vh - 60px) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .map-page-container.view-map .left-column {
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    
    .map-page-container.view-map .arcgis-map-wrapper {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Prevent text selection during resize */
.resize-active {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* =============================================================================
   ESRI WIDGET THEME OVERRIDES
   ============================================================================= */

.esri-ui-corner .esri-component {
    background: rgba(10, 25, 47, 0.95) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px) !important;
}

.esri-widget {
    background: rgba(10, 25, 47, 0.95) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px) !important;
}

.esri-widget button {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.esri-widget button:hover {
    background: var(--bg-primary) !important;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

.esri-expand {
    background: rgba(10, 25, 47, 0.95) !important;
    border: 1px solid var(--border-color) !important;
}

.esri-expand__icon {
    color: var(--accent) !important;
}

.esri-expand__content {
    background: rgba(10, 25, 47, 0.95) !important;
    border: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px) !important;
}

.esri-layer-list {
    background: rgba(10, 25, 47, 0.95) !important;
    color: var(--text-primary) !important;
}

.esri-layer-list__item {
    background: transparent !important;
    color: var(--text-primary) !important;
}

.esri-layer-list__item:hover {
    background: rgba(100, 255, 218, 0.1) !important;
}

.esri-layer-list__item-title {
    color: var(--text-primary) !important;
}

.esri-layer-list__item--invisible .esri-layer-list__item-title {
    color: var(--text-secondary) !important;
}

.esri-legend {
    background: rgba(10, 25, 47, 0.95) !important;
    color: var(--text-primary) !important;
}

.esri-legend__layer-caption {
    color: var(--text-primary) !important;
}

.esri-legend__layer-child-title {
    color: var(--text-primary) !important;
}

.esri-basemap-gallery {
    background: rgba(10, 25, 47, 0.95) !important;
    color: var(--text-primary) !important;
}

.esri-basemap-gallery__item {
    border: 1px solid var(--border-color) !important;
}

.esri-basemap-gallery__item:hover {
    border-color: var(--accent) !important;
}

.esri-basemap-gallery__item-title {
    color: var(--text-primary) !important;
}

.esri-search {
    background: rgba(10, 25, 47, 0.95) !important;
    border: 1px solid var(--border-color) !important;
}

.esri-search__input {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.esri-search__input:focus {
    border-color: var(--accent) !important;
}

.esri-search__submit-button {
    background: var(--bg-secondary) !important;
    color: var(--accent) !important;
    border: 1px solid var(--border-color) !important;
}

.esri-search__submit-button:hover {
    background: var(--bg-primary) !important;
    border-color: var(--accent) !important;
}

.esri-scale-bar {
    background: rgba(10, 25, 47, 0.95) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.esri-scale-bar__line {
    border-color: var(--accent) !important;
}

.esri-scale-bar__label {
    color: var(--text-primary) !important;
} 