/* ============================================
                RESPONSIVE.CSS
   Inneholder alle responsive breakpoints og tilpasninger
   ============================================ */
/* === MOBILE STYLES (0-767px) === */
@media (max-width: 767.98px) {
    
    .dashboard-container {
        position: fixed;
        inset: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }
    /* Sidebar skjult som standard på mobil - posisjonert utenfor skjermen */
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 999;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
    /* Sidebar synlig når aktiv */
    .sidebar.active {
        left: 0;
    }
    /* Hamburger-knapp synlig på mobil */
    .sidebar__toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: var(--spacing-md);
        left: var(--spacing-md);
        z-index: 997;
        width: 44px;
        height: 44px;
        background-color: var(--color-white);
        border: 1px solid var(--color-gray-light);
        border-radius: var(--border-radius-sm);
        cursor: pointer;
        box-shadow: var(--shadow-sm);
    }
    .sidebar__toggle-btn:hover {
        background-color: var(--color-gray-medium);
    }
    .sidebar__toggle-btn svg {
        width: 24px;
        height: 24px;
        color: var(--color-text);
    }
    /* Lukke-knapp synlig på mobil */
    .sidebar__close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: none;
        border: none;
        cursor: pointer;
        margin-right: var(--spacing-sm);
        border-radius: var(--border-radius-sm);
        flex-shrink: 0;
    }
    .sidebar__close-btn:hover {
        background-color: var(--color-gray-medium);
    }
    .sidebar__close-btn svg {
        width: 20px;
        height: 20px;
        color: var(--color-text);
    }
    /* Main content tar full bredde på mobil */
    .main-content {
        order: 1;
        margin-left: 0;
        padding-top: 70px;
        /* Plass til hamburger-knapp */
    }
    .content-area {
        padding: var(--spacing-md);
    }
    /* Sidebar navigation - vertikal liste på mobil (ikke horisontal scroll) */
    .sidebar__nav {
        display: block;
        overflow-x: visible;
        padding: var(--spacing-md) 0;
    }
    .nav-item {
        flex-shrink: 0;
        margin-bottom: var(--spacing-xs);
        margin-right: 0;
    }
    .nav-link {
        white-space: normal;
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    .hero-section.with-results {
        padding: var(--spacing-lg) 0;
    }
    .dashboard-hero-wrapper {
        padding: var(--spacing-lg) 0;
    }
    .dashboard-hero-wrapper.with-results {
        padding: var(--spacing-md) 0;
    }
    .action-cards {
        grid-template-columns: 1fr;
    }
    .result-actions {
        text-align: start !important;
        margin-top: var(--spacing-md);
    }
    .result-actions .btn {
        width: 100%;
    }
    .d-flex.justify-content-between {
        flex-direction: row;
        align-items: center !important;
    }
    .search-box input {
        width: 100% !important;
    }
    .table-responsive {
        font-size: var(--font-size-sm);
    }
    .custom-btn,
    .btn-sm {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    .coordinate-divider {
        display: none;
    }
    .coordinate-section {
        border-bottom: 1px solid var(--color-gray-light);
        padding-bottom: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        padding-left: 0;
        padding-right: 0;
    }
    .coordinate-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    .coordinate-link {
        font-size: var(--font-size-xs);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    .detail-label {
        width: auto;
        min-width: 150px;
    }
    .detail-header-section {
        padding: var(--spacing-md) 0;
    }
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .action-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}
/* === TABLET STYLES (768px-991px) === */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        width: 240px;
    }
    :root {
        --sidebar-width: 240px;
    }
    .content-area {
        padding: var(--spacing-lg);
    }
    .search-container {
        padding: 0 var(--spacing-lg);
    }
}
/* === DESKTOP STYLES (992px-1199px) === */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    .search-container {
        max-width: 800px;
    }
}
/* === LARGE DESKTOP STYLES (1200px+) === */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    .search-container {
        max-width: var(--container-max-width);
    }
}
/* === EXTRA LARGE SCREENS (1400px+) === */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}
/* === PRINT STYLES === */
@media print {
    .sidebar,
    .sidebar__toggle-btn,
    .sidebar-overlay,
    .search-box,
    .btn,
    .navbar {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
    .dashboard-container {
        display: block;
    }
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
    a {
        color: black;
        text-decoration: underline;
    }
}
/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0066cc;
        --color-text: #000000;
        --color-background: #ffffff;
        --color-gray-light: #666666;
    }
    .card {
        border: 2px solid var(--color-text);
    }
}
/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .card:hover {
        transform: none;
    }
    .btn:hover {
        transform: none;
    }
}