@import '_content/Microsoft.AspNetCore.Components.QuickGrid/Microsoft.AspNetCore.Components.QuickGrid.bundle.scp.css';

/* /Shared/MainLayout.razor.rz.scp.css */
.page[b-3s5gsbfp8e] {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main[b-3s5gsbfp8e] {
    flex: 1;
}

/* ===== MOBILE HEADER ===== */
.mobile-header[b-3s5gsbfp8e] {
    position: sticky;
    top: 0;
    z-index: 1020; /* Below dialogs (9999) but above content */
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}

.hamburger-btn[b-3s5gsbfp8e] {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 8px;
    cursor: pointer;
    color: #333;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.hamburger-btn:hover[b-3s5gsbfp8e] {
    background-color: rgba(0, 0, 0, 0.05);
}

.hamburger-btn:active[b-3s5gsbfp8e] {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-title[b-3s5gsbfp8e] {
    flex: 1;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.mobile-user-actions[b-3s5gsbfp8e] {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mobile-user-btn[b-3s5gsbfp8e] {
    background: none;
    border: 1px solid #dee2e6;
    color: #333;
    font-size: 1.2rem;
    padding: 8px;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile-user-btn:hover[b-3s5gsbfp8e] {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #adb5bd;
}

.mobile-user-btn:active[b-3s5gsbfp8e] {
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-user-btn-primary[b-3s5gsbfp8e] {
    background-color: #1b6ec2;
    border-color: #1861ac;
    color: white;
}

.mobile-user-btn-primary:hover[b-3s5gsbfp8e] {
    background-color: #1861ac;
    border-color: #164f8e;
    color: white;
}

.mobile-user-btn-primary:active[b-3s5gsbfp8e] {
    background-color: #164f8e;
}

/* ===== SIDEBAR ===== */
.sidebar[b-3s5gsbfp8e] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    transition: transform 0.3s ease-in-out;
}

.sidebar-close[b-3s5gsbfp8e] {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 10; /* S�kerst�ll att den ligger ovanp� allt annat i sidebar */
}

.sidebar-close:hover[b-3s5gsbfp8e] {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-close:active[b-3s5gsbfp8e] {
    background: rgba(255, 255, 255, 0.4);
}

/* Overlay f�r mobil sidebar */
.sidebar-overlay[b-3s5gsbfp8e] {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.sidebar-overlay.show[b-3s5gsbfp8e] {
    display: block;
    opacity: 1;
}

/* ===== TOP ROW ===== */
.top-row[b-3s5gsbfp8e] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.top-row[b-3s5gsbfp8e]  a, .top-row .btn-link[b-3s5gsbfp8e] {
    white-space: nowrap;
    margin-left: 1.5rem;
}

.top-row a:first-child[b-3s5gsbfp8e] {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== MOBILE (< 768px) ===== */
@media (max-width: 767.98px) {
    .sidebar[b-3s5gsbfp8e] {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 1050;
        transform: translateX(-100%);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    }

    .sidebar.show[b-3s5gsbfp8e] {
        transform: translateX(0);
    }

    /* G�m desktop top-row p� mobil */
    .top-row[b-3s5gsbfp8e] {
        display: none !important;
    }

    /* Padding f�r content p� mobil */
    article[b-3s5gsbfp8e] {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-top: 1rem !important;
    }
}

/* ===== MOBILE LANDSCAPE (< 768px height, landscape) ===== */
@media (max-width: 767.98px) and (orientation: landscape) {
    /* Kompaktare header i landscape */
    .mobile-header[b-3s5gsbfp8e] {
        height: 48px;
        padding: 0 0.5rem;
    }
    
    .mobile-title[b-3s5gsbfp8e] {
        font-size: 1rem;
    }
    
    .hamburger-btn[b-3s5gsbfp8e],
    .mobile-user-btn[b-3s5gsbfp8e] {
        min-width: 40px;
        min-height: 40px;
        padding: 6px;
    }
    
    /* Mindre sidebar i landscape */
    .sidebar[b-3s5gsbfp8e] {
        width: 240px;
        max-width: 50vw; /* Ta mindre plats i landscape */
    }
    
    /* Kompaktare padding i landscape */
    article[b-3s5gsbfp8e] {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.75rem !important;
    }
    
    /* Utnyttja hela h�jden */
    .page[b-3s5gsbfp8e] {
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
    
    main[b-3s5gsbfp8e] {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        height: calc(100vh - 48px); /* Full h�jd minus header */
    }
}

/* ===== TABLET & DESKTOP (>= 768px) ===== */
@media (min-width: 768px) {
    .page[b-3s5gsbfp8e] {
        flex-direction: row;
    }

    /* G�m mobil header */
    .mobile-header[b-3s5gsbfp8e] {
        display: none !important;
    }

    /* G�m overlay */
    .sidebar-overlay[b-3s5gsbfp8e] {
        display: none !important;
    }

    /* Desktop sidebar */
    .sidebar[b-3s5gsbfp8e] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
        transform: none !important;
    }

    /* G�m close-knapp p� desktop */
    .sidebar-close[b-3s5gsbfp8e] {
        display: none !important;
    }

    .top-row[b-3s5gsbfp8e] {
        position: sticky;
        top: 0;
        z-index: 1; /* Low z-index - should stay below dialogs (9999) */
    }

    .top-row[b-3s5gsbfp8e], article[b-3s5gsbfp8e] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}
/* /Shared/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-a86i0z7etg] {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-row[b-a86i0z7etg] {
    height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-a86i0z7etg] {
    font-size: 1.1rem;
}

.oi[b-a86i0z7etg] {
    width: 2rem;
    font-size: 1.1rem;
    vertical-align: text-top;
    top: -2px;
}

.nav-item[b-a86i0z7etg] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-a86i0z7etg] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-a86i0z7etg] {
        padding-bottom: 1rem;
    }

    .nav-item[b-a86i0z7etg]  a {
        color: #d7d7d7;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
    }

.nav-item[b-a86i0z7etg]  a.active {
    background-color: rgba(255,255,255,0.25);
    color: white;
}

.nav-item[b-a86i0z7etg]  a:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Mobile: Extra padding-top f�r att ge plats �t close-knappen */
@media (max-width: 767.98px) {
    .nav-scrollable[b-a86i0z7etg] {
        padding-top: 64px; /* Ger plats f�r close-knappen (48px + 16px margin) */
    }
    
    .nav-item:first-of-type[b-a86i0z7etg] {
        padding-top: 0.5rem;
    }
}

@media (min-width: 641px) {
    .navbar-toggler[b-a86i0z7etg] {
        display: none;
    }

    .collapse[b-a86i0z7etg] {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }
    
    .nav-scrollable[b-a86i0z7etg] {
        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
