

/* Root skal fylde hele viewport */
.app-root {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    background-color: var(--md-sys-color-surface-container-low);
    display: flex;
    flex-direction: column;
}

/* Drawer styling */
.app-drawer {
    background-color: var(--md-sys-color-surface-container-low);
    border: none;
}

.mud-drawer .mud-nav-link.active,
.mud-drawer .mud-nav-link.mud-nav-link-active,
.mud-drawer .mud-nav-link[aria-current="page"] {
    background-color: var(--md-sys-color-surface-container-high) !important;
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 16%, var(--md-sys-color-surface-container-low)) !important;
    color: var(--md-sys-color-primary) !important;
    box-shadow: inset 4px 0 0 var(--md-sys-color-primary);
    font-weight: 600;
}

.mud-drawer .mud-nav-link.active .mud-nav-link-icon,
.mud-drawer .mud-nav-link.mud-nav-link-active .mud-nav-link-icon,
.mud-drawer .mud-nav-link[aria-current="page"] .mud-nav-link-icon {
    color: var(--md-sys-color-primary) !important;
}

.mud-drawer .mud-nav-group .mud-nav-link.active,
.mud-drawer .mud-nav-group .mud-nav-link.mud-nav-link-active,
.mud-drawer .mud-nav-group .mud-nav-link[aria-current="page"] {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 6%, transparent) !important;
    box-shadow: none;
    font-weight: 500;
}

.mud-drawer .mud-nav-link:not(.active):not(.mud-nav-link-active):not([aria-current="page"]):hover {
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 5%, transparent) !important;
}

/* MainContent fylder resten af pladsen */
.mud-main-content {
    background-color: var(--md-sys-color-surface-container-low);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Page container fylder hele main-content */
.page-container {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    background-color: var(--md-sys-color-surface-container-lowest, #fff);
    border-radius: 24px;
    padding: 24px;
    box-sizing: border-box; /* inkluder padding i width/height */
}

.page-container-square {
    flex: 1 1 auto;
    width: 100%;
    background-color: transparent;
    /*background-color: transparent;*/
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius:24px;
    /* Remove fixed height to allow proper scrolling */
}

/* Ensure the MudLayout takes up the full height and has the correct background */
.mud-layout {
    min-height: 100vh;
    background-color: var(--md-sys-color-surface-container-low);
}

/* Logo placering */
.logo-container {
    position: fixed;
    top: 8px;
    left: 4px;
    z-index: 1200;
    padding: 6px;
    background-color: transparent;
    /* border-radius: 8px; */
}

@media (min-width: 960px) {
    .app-top-bar .loc-switcher {
        margin-left: 16px !important;
    }
}

/* Topbar: clears fixed logo/drawer on desktop, full width below md (960px) */
.app-top-bar {
    height: 56px;
    margin-left: 228px;
    min-width: 0;
}

@media (max-width: 959.98px) {
    .app-top-bar {
        position: relative;
        margin-left: 0;
        padding-left: 4px !important;
    }

    .app-top-bar .loc-switcher {
        position: absolute !important;
        left: 50% !important;
        bottom: 0;
        transform: translateX(-50%);
        margin-left: 0 !important;
        max-width: none;
        width: min(280px, calc(100% - 112px));
        min-width: 0;
        flex: none;
    }

    .app-top-bar .me-12 {
        margin-right: 8px !important;
    }

    .app-top-bar .loc-switcher .mud-input-slot,
    .app-top-bar .loc-switcher input {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 599.98px) {
    .app-top-bar .loc-switcher {
        margin-right: 8px;
    }
}


/* Wrapper for hvert item */
.nav-item-wrapper {
    display: flex;
    justify-content: center;
    margin: 2px 0;
}

/* Wrapper med ikon + label i kolonne */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 8px 0;
    cursor: pointer;
}

/* Oval baggrund kun bag ikonet */
.nav-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px; /* bredere i vandret retning = oval */
    border-radius: 16px; /* rundere hjørner */
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.nav-icon {
    font-size: 24px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

/* Label fri nedenunder */
.nav-label {
    font-size: 0.75rem;
    margin-top: 4px;
    line-height: 1.1;
    text-align: center;
}


/*Dropdown i main*/
.loc-switcher {
    width: clamp(200px, 28vw, 340px);
    flex: 0 0 auto; /* don't grow in the flex row */
    max-width:300px;
}

    .loc-switcher :deep(.mud-input-control) {
        width: 100%;
    }

/* If you also want the menu/popup to match (optional) */
.loc-menu .mud-popover-paper {
    max-width: 340px;
}

/*This feels like a hack - but this hides caption and body1, så only body2 is visible (name of location)*/
.loc-switcher .mud-select-input .mud-typography-caption,
.loc-switcher .mud-select-input .mud-typography-body1 {
    display: none !important;
}



/* Hover → vis oval */
.nav-icon-wrapper:hover .nav-icon {
    transform: scale(1.05); /* gør ikonet 15% større */
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-icon-wrapper:hover {
    background-color: var(--md-sys-color-surface-variant);
}

/* Aktiv side */
.nav-icon-wrapper.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}


/* Hele dialogen/panelet */
.md3-picker .mud-paper,
.md3-picker.mud-dialog .mud-paper {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 16px;
}

/* Header/topbar + månedslinje */
.md3-picker .mud-picker-header {
    background: transparent;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface);
}

.md3-picker .mud-icon-button,
.md3-picker .mud-typography,
.md3-picker .mud-picker-month button {
    color: var(--md-sys-color-on-surface);
}

/* Dage */
.md3-picker .mud-day {
    color: var(--md-sys-color-on-surface);
    border-radius: 10px;
}

    .md3-picker .mud-day:hover {
        background: var(--md-sys-color-primary-container);
        color: var(--md-sys-color-on-primary-container);
    }

.md3-picker .mud-day-today {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 1px;
    border-radius: 12px;
}

.md3-picker .mud-day-selected,
.md3-picker .mud-day.mud-selected {
    background: var(--md-sys-color-primary) !important;
    color: var(--md-sys-color-on-primary) !important;
}

/* Actions (OK/Cancel) */
.md3-picker .mud-dialog-actions .mud-button {
    color: var(--md-sys-color-primary);
}

    .md3-picker .mud-dialog-actions .mud-button.mud-button-filled {
        background: var(--md-sys-color-primary);
        color: var(--md-sys-color-on-primary);
    }