@import '/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

:root {
    --nav-expanded-width: 250px;
    --nav-collapsed-width: 64px;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    font-family: var(--body-font);
    font-size:   var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    font-weight: var(--font-weight);
    color:       var(--neutral-foreground-rest);
    background:  var(--neutral-fill-layer-rest);
}

html, body {
    height: 100%;
}

#app, .app-root { /* eller hvad din outermost div hedder */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navmenu-icon {
    display: none;
}

.main {
    min-height: calc(100dvh - 86px);
    color: var(--neutral-foreground-rest);
    align-items: stretch !important;
}


.sitenav {
    flex: 0 0 auto;
    /* width is set by your nav component */
}



/*helper card*/
.helper-card {
    /*border: 1px solid #e5e7eb;
    border-radius: 12px;*/
    padding: 0.5rem;
    background: #fafafc;
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.helper-card-header h3 {
    margin: 0.1rem 0 0;
}

.helper-card .checklist {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #555;
    font-size: 13px;
}

.helper-card .checklist li {
   line-height: 1.5;
}




.footer-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: var(--neutral-light, #f3f3f3);
    border-top: 1px solid var(--neutral-primary, #ddd);
    padding: 12px 16px;
    min-height: 48px;
}

.body-content {
    margin: 0px !important;
}

.Settings-body-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    align-self: stretch !important;
    width: 100%;
    height: 100%;
    padding-left:10px!important;
}

.Main-body-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    align-self: stretch !important;
    width: 100%;
    height: 100%;
    padding-left: 0px !important;
}


.main-content {
    min-height: calc(100vh - 86px);
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}



.content-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    width: 100%;
    padding: 0px 16px 0px 0px !important;
}

.page-footer {
    flex: 0 0 auto;
    width: 100%;
    background: var(--neutral-light, #f3f3f3);
    border-top: 1px solid var(--neutral-primary, #ddd);
    padding: 0px 10px;
    text-align: center;
}


/* --- End Page specific styles --- */
.manage {
    width: 100dvw;
}

footer {
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest);
    align-items: center;
    padding: 10px 10px;
}

    footer a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        footer a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        footer a:hover {
            text-decoration: underline;
        }

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjY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yMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZWQiLz48L2c+PC9zdmc+) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        content: "An error has occurred. "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Shared/utility styles for global use */
.full-width {
    width: 100%;
    box-sizing: border-box;
}
.add-btn {
    font-size: 16px;
    padding: 8px 18px;
    border-radius: 6px;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
.plus-icon {
    font-size: 22px;
    font-weight: bold;
    margin-right: 4px;
}
.material-icons {
    font-family: 'Material Icons', Arial, sans-serif;
    font-size: 20px;
    vertical-align: middle;
}
.edit-btn {
    color: #1976d2;
}
.delete-btn {
    color: #d32f2f;
}

.warning-text {
    color: #d32f2f;
    font-weight: 500;
}
.error-message {
    color: #d32f2f;
    text-align: center;
    margin: 20px 0;
}

.organization-manage-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.custom-datagrid td[style*="height: 32px"] {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/*.fluent-data-grid td[style*="height: 32px"],
.fluent-datagrid td[style*="height: 32px"] {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}*/


/* Global themed button */
.themed-button {
    background-color: #af212f !important;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.themed-button:hover {
    background-color: #8a1a25 !important;
}

/* Add this to your app.css (global CSS) */
.address-info-panel-scroll {
    max-height: 400px; /* Fixed height, adjust as needed */
    overflow-y: auto;
    padding: 0 2px;
    display: flex;
    flex-direction: column;
}

/* Or use ::deep in your InfoPanel.razor.css */
::deep .address-info-panel-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 2px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .header-gutters {
        margin: 0.5rem 3rem 0.5rem 1.5rem !important;
    }

    [dir="rtl"] .header-gutters {
        margin: 0.5rem 1.5rem 0.5rem 3rem !important;
    }

    .main {
        flex-direction: column !important;
        row-gap: 0 !important;
    }

    nav.sitenav {
        width: 100%;
        height: 100%;
    }

    #main-menu {
        width: 100% !important;
    }

        #main-menu > div:first-child:is(.expander) {
            display: none;
        }

    .navmenu {
        width: 100%;
    }

    .stack-horizontal {
        column-gap: 0px !important;
    }

      
    #navmenu-toggle {
        appearance: none;
    }

        #navmenu-toggle ~ nav {
            display: none;
        }

        #navmenu-toggle:checked ~ nav {
            display: block;
        }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset;
    }
}

.page-container {
    padding: 24px;
    background-color: #fafafa;
    width: 100%;
    height:100%;
    box-sizing: border-box;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0px;
}

.header-left h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.subtitle {
    margin: 4px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* Toolbar */
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.page-toolbar-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.page-toolbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}


.page-toolbar-view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    /*background: #f5f5f5;*/
    border-radius: 8px;
}

.form-label {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

    .form-label.required::after {
        content: " *";
        color: #dc2626;
        margin-left: 2px;
        display: inline;
    }




.table-header,
.table-row {
    display: grid;
    grid-template-columns: var(--table-columns, none);
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    padding-left: 24px;
    padding-right: 24px;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}

.table-header {
    padding-top: 16px;
    padding-bottom: 12px;
    background: #fafafa;
}

.table-row {
    padding-top: 14px;
    padding-bottom: 14px;
}

.table-row:hover {
    background-color: #fafafa;
}

.table-header > :last-child,
.table-row > :last-child,
.col-actions {
    justify-self: end;
}

    .table-row:last-child {
        border-bottom: none;
    }

@media (max-width: 1400px) {

    .kpi-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .week-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
    }

    .day-column {
        min-height: 250px;
    }
}

/* CONSOLIDATED: breakpoint 1200px */
/* (samler alle @media (max-width: 1200px) fra siderne) */
@media (max-width: 1200px) {
    /* Schedules */
    .table-header,
    .table-row {
        grid-template-columns: 120px 2fr 1.5fr 1fr 60px;
    }

    /* Questions / Questions list */
    .questions-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .questions-grid,
    .questions-grid /* duplicate kept for completeness */ {
    }

    .table-header,
    .table-row {
        /* page-specific versions below may override this where more specific */
    }

    .col-answers {
        display: none;
    }

    /* Categories */
    .table-header,
    .table-row {
        grid-template-columns: 2.5fr 2fr 1fr 1fr 1fr 60px;
    }

    .col-order {
        display: none;
    }

    /* Reports (students tab) */
    .students-tab .table-header,
    .students-tab .table-row {
        grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1.5fr;
    }

    .col-streak {
        display: none;
    }

    /* Lessons */
    .table-header,
    .table-row {
        grid-template-columns: 2fr 1.5fr 1fr 1fr 60px;
    }

    .col-groups {
        display: none;
    }

    /* QuestionDetails / generic content collapse */
    .kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-layout {
        grid-template-columns: 1fr;
    }

    /* LessonDetails table fallback */
    .table-header,
    .table-row {
        grid-template-columns: 40px 1fr 80px 80px 80px 40px;
    }
}

/* CONSOLIDATED: breakpoint 900px */
/* (samler alle @media (max-width: 900px) fra siderne) */
@media (max-width: 900px) {
    /* Schedules */
    .week-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .table-header,
    .table-row {
        grid-template-columns: 100px 2fr 1fr 60px;
    }

    .col-group {
        display: none;
    }

    /* Questions */
    .table-header,
    .table-row {
        grid-template-columns: 2fr 1fr 1fr 60px;
    }

    .col-category {
        display: none;
    }

    /* Categories */
    .table-header,
    .table-row {
        grid-template-columns: 2fr 2fr 1fr 1fr 60px;
    }

    .col-lessons {
        display: none;
    }

    /* Reports */
    .questions-tab .table-header,
    .questions-tab .table-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .students-tab .table-header,
    .students-tab .table-row {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }

    .col-group,
    .col-rate {
        display: none;
    }

    /* Lessons */
    .table-header,
    .table-row {
        grid-template-columns: 2fr 1fr 1fr 60px;
    }

    .col-questions {
        display: none;
    }

    /* Generic grids */
    .questions-grid,
    .categories-grid,
    .lessons-grid,
    .actors-grid,
    .helper-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    /* KPI cards and some page-specific collapse */
    .kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* CONSOLIDATED: breakpoint 768px */
/* (samler alle @media (max-width: 768px) fra siderne) */
@media (max-width: 768px) {
    /* Header / toolbar stacking (meget gentaget) */
    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .header-right,
    .page-toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .toolbar,
    .page-toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .toolbar-left,
    .page-toolbar-left {
        flex-direction: column;
    }

    .toolbar-right {
        justify-content: flex-end;
    }

    /* Search inputs become full width */
    .search-box,
    .student-search,
    .category-search,
    .question-search,
    .lesson-search {
        width: 100%;
    }

    /* Collapse common grids to single column */
    .categories-grid,
    .questions-grid,
    .kpi-cards,
    .helper-grid,
    .actors-grid {
        grid-template-columns: 1fr;
    }

    /* Generic table fallback / simplified columns */
    /* Many pages use 1fr 1fr 60px or 2fr 1fr 60px; keep several specific templates used by pages */
    .table-header,
    .table-row {
        /* default simpler fallback; page-specific selectors below will override where necessary */
        grid-template-columns: 1fr 1fr 60px;
    }

    /* Page-specific simplified templates */
    .questions .table-header,
    .questions .table-row,
    .questions-tab .table-header,
    .questions-tab .table-row {
        grid-template-columns: 2fr 1fr 60px;
    }

    .lesson-pages .table-header,
    .lesson-pages .table-row,
    .lessons .table-header,
    .lessons .table-row {
        grid-template-columns: 2fr 1fr 60px;
    }

    /* Some pages hide header and make rows card-like (LessonDetails example) */
    .table-header {
        display: none;
    }

    .table-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px;
    }

    /* Hide low-priority columns on small screens */
    .col-correct,
    .col-description,
    .col-answers,
    .col-rate,
    .col-difficulty,
    .col-streak,
    .col-order,
    .col-lessons,
    .col-activity,
    .col-group {
        display: none;
    }

    /* Dialogs & overlays: full width + padding */
    .dialog-overlay {
        padding: 16px;
    }

    .create-schedule-dialog,
    .create-question-dialog,
    .create-lesson-dialog,
    .create-category-dialog,
    .create-dialog,
    .confirm-dialog,
    .export-dialog {
        max-width: 100%;
        margin: 16px;
    }

    /* Week/calendar collapse */
    .week-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Misc page specific stacking adjustments */
    .header-title-row,
    .page-header .header-title-row,
    .header-title-row h1 {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Buttons / tabs full width */
    .tabs {
        width: 100%;
    }

    .tab {
        flex: 1;
        text-align: center;
    }
}
