/* Layout and spacing only — app bar colors come from MudTheme (AppbarBackground / AppbarText). */
.atg-appbar {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: var(--mud-palette-appbar-background) !important;
    color: var(--mud-palette-appbar-text) !important;
    backdrop-filter: blur(8px);
    border: 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    border-radius: 0 !important;
    box-shadow: var(--mud-elevation-4);
    padding-inline: clamp(1rem, 2.5vw, 1.6rem);
}

.atg-appbar,
.atg-appbar .mud-button-root,
.atg-appbar a.mud-button-root,
.atg-appbar .mud-button-label,
.atg-appbar .mud-icon-button,
.atg-appbar .mud-icon-button .mud-icon-root,
.atg-appbar .atg-brand-link,
.atg-appbar .atg-brand-wordmark,
.atg-appbar .atg-brand-kicker,
.atg-appbar .atg-header-link,
.atg-appbar .atg-header-menu .mud-button-root,
.atg-appbar .atg-header-menu .mud-icon-root {
    color: var(--mud-palette-appbar-text) !important;
}

/* Header CTA is the only filled primary control in the app bar. */
.atg-appbar .atg-header-cta.mud-button-filled-primary {
    color: var(--mud-palette-primary-contrast-text) !important;
    background-color: var(--mud-palette-primary) !important;
    border-color: var(--mud-palette-primary) !important;
}

.atg-appbar .atg-header-cta.mud-button-filled-primary:hover,
.atg-appbar .atg-header-cta.mud-button-filled-primary:focus-visible {
    color: var(--mud-palette-primary-contrast-text) !important;
    background-color: var(--mud-palette-primary-darken) !important;
    border-color: var(--mud-palette-primary-darken) !important;
}

/* Outlined admin/login on the dark bar — not page-content outline colors. */
.atg-appbar .mud-button-outlined-primary,
.atg-appbar .atg-header-login-button {
    color: var(--mud-palette-appbar-text) !important;
    border-color: color-mix(in srgb, var(--mud-palette-appbar-text) 50%, transparent) !important;
}

.atg-brand-link {
    color: inherit;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.atg-brand-lockup {
    display: grid;
    gap: 0.12rem;
}

.atg-brand-wordmark {
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    line-height: 1;
    color: inherit;
}

.atg-brand-kicker {
    color: inherit;
    opacity: 0.72;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.atg-brand-logo {
    display: block;
    width: auto;
    height: 46px;
    object-fit: contain;
}

.atg-brand-logo-drawer {
    height: 40px;
}

.atg-header-desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin-inline-start: 1.6rem;
    flex-shrink: 1;
    min-width: 0;
}

.atg-header-shortcuts-menu {
    flex-shrink: 0;
    margin-inline-start: 0.15rem;
}

.atg-header-auth {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    margin-inline-end: 0.35rem;
}

.atg-header-cta,
.atg-header-login-button {
    flex-shrink: 0;
}

.atg-header-stitch-link {
    color: inherit;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.1;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.atg-header-stitch-link:hover {
    opacity: 0.9;
}

.atg-header-stitch-link-active {
    border-bottom-color: var(--mud-palette-primary);
}

.atg-header-menu .mud-button-root,
.atg-header-link {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    border-radius: 999px !important;
    min-width: 0;
    min-height: 42px;
    padding-inline: 0.78rem;
    border-color: transparent !important;
    background: transparent !important;
}

.atg-header-menu .mud-button-root {
    min-height: 44px;
}

.atg-header-menu .mud-button-label {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

.atg-header-menu .mud-icon-root {
    font-size: 1.02rem;
    color: inherit;
    transition: transform 0.18s ease;
}

.atg-header-link-active,
.atg-header-menu-active .mud-button-root {
    background: var(--mud-palette-action-default-hover) !important;
    color: inherit !important;
}

.atg-header-menu .mud-button-root:hover,
.atg-header-link:hover,
.atg-header-auth .mud-button-root:hover {
    background: var(--mud-palette-action-default-hover) !important;
}

.atg-header-menu .mud-button-root:hover .mud-icon-root,
.atg-header-menu-active .mud-icon-root {
    transform: translateY(1px);
}

.atg-header-menu-popover {
    margin-top: 0.45rem;
}

.atg-header-menu-popover .mud-paper {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius, 8px);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    box-shadow: var(--mud-elevation-8);
}

.atg-header-menu-popover .mud-list {
    padding: 0.45rem;
}

.atg-header-menu-popover .mud-menu-item {
    border-radius: var(--mud-default-borderradius, 8px);
    min-height: 40px;
    color: var(--mud-palette-text-primary);
}

.atg-header-menu-popover .mud-menu-item:hover {
    background: var(--mud-palette-action-default-hover);
}

.atg-header-menu-item .mud-menu-item-text {
    width: 100%;
}

.atg-header-menu-item-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.atg-header-menu-item-copy strong {
    font-size: 0.92rem;
    line-height: 1.15;
    color: var(--mud-palette-text-primary);
}

.atg-header-menu-item-copy span {
    color: var(--mud-palette-text-secondary);
    font-size: 0.73rem;
    line-height: 1.35;
}

.atg-header-menu-nested {
    display: block;
    width: 100%;
}

.atg-header-menu-nested > div[role="button"] {
    width: 100%;
}

.atg-header-menu-item-has-sub .mud-menu-item-text {
    width: 100%;
}

.atg-header-menu-group-activator {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    padding: 0.35rem 0.75rem 0.35rem 1rem;
    cursor: default;
}

.atg-header-menu-hub-link {
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.atg-header-menu-hub-link:hover .atg-header-menu-item-copy strong {
    color: var(--atg-link-on-surface, #7a3b2a);
}

.atg-header-menu-child-entry {
    padding: 0;
    min-height: 40px;
}

.atg-header-menu-child-entry .atg-header-menu-hub-link {
    display: block;
    padding: 0.35rem 1rem;
}

.atg-header-menu-sub-chevron {
    flex: 0 0 auto;
    align-self: center;
    opacity: 0.65;
    font-size: 1.25rem !important;
}

.atg-header-submenu-popover {
    margin-left: 0.15rem;
}

.atg-header-menu-popover > .mud-paper,
.atg-header-menu-popover.mud-popover .mud-paper {
    max-height: min(70vh, 28rem);
    overflow-y: auto;
}

.atg-header-auth {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-inline-end: 0.5rem;
}

.atg-header-auth .mud-button-root,
.atg-header-login-button {
    text-transform: none;
    min-height: 42px;
    border-radius: 4px !important;
    padding-inline: 1rem !important;
}

.atg-header-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    min-height: 46px;
    padding-inline: 1.55rem !important;
}

.atg-header-cta .mud-button-label {
    white-space: nowrap;
}

.atg-header-menu-toggle {
    display: none !important;
    border-radius: 999px !important;
    color: inherit !important;
}

.atg-header-menu-toggle:hover {
    background: var(--mud-palette-action-default-hover) !important;
}

.atg-header-menu-toggle-open {
    background: var(--mud-palette-action-default-hover) !important;
}

.atg-main-content:focus {
    outline: none;
}

/* Offentlig mobilmenu (loades her — ikke kun app-admin.css). */
.atg-site-drawer {
    max-width: min(344px, 92vw);
    --atg-drawer-ink: #1a1410;
    --atg-drawer-ink-soft: #2e2720;
    --atg-drawer-muted: #52483f;
    --atg-drawer-accent: #8e4432;
}

.atg-site-drawer .mud-drawer-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #fffdfa 0%, #f5efe7 100%) !important;
    color: var(--atg-drawer-ink-soft);
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.atg-site-drawer .mud-drawer-header {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    padding: 0;
    background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(247, 239, 230, 0.96) 100%);
}

.atg-drawer-header-shell {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid rgba(126, 117, 111, 0.14);
}

.atg-site-drawer .mud-drawer-header .mud-icon-button,
.atg-site-drawer .mud-drawer-header .atg-brand-link {
    color: var(--atg-drawer-ink) !important;
}

.atg-drawer-header-copy {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(201, 169, 106, 0.18);
}

.atg-drawer-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6f5f50;
    font-weight: 700;
}

.atg-drawer-title {
    margin-top: 0.35rem;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.35rem, 4.5vw, 1.7rem);
    line-height: 1.2;
    color: var(--atg-drawer-ink);
}

.atg-drawer-quick-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.atg-site-drawer .atg-drawer-secondary-action.mud-button-outlined-primary {
    color: var(--atg-drawer-accent) !important;
    border-color: color-mix(in srgb, var(--atg-drawer-accent) 45%, #8a7a6c) !important;
}

.atg-site-drawer .atg-drawer-secondary-action.mud-button-outlined.mud-button-outlined-inherit,
.atg-site-drawer .atg-drawer-secondary-action.mud-button-outlined-default {
    color: var(--atg-drawer-ink-soft) !important;
    border-color: color-mix(in srgb, var(--atg-drawer-ink) 28%, transparent) !important;
}

.atg-drawer-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem 0.8rem 0.25rem;
}

.atg-site-drawer .mud-navmenu .mud-nav-link,
.atg-site-drawer .mud-navmenu .mud-nav-group .mud-nav-link,
.atg-site-drawer .mud-navmenu .mud-nav-group .mud-nav-group-button {
    color: var(--atg-drawer-ink) !important;
}

.atg-site-drawer .mud-navmenu .mud-nav-link .mud-icon-root,
.atg-site-drawer .mud-navmenu .mud-nav-group .mud-nav-group-button .mud-icon-root {
    color: var(--atg-drawer-accent) !important;
}

.atg-drawer-nav .mud-nav-link-text {
    width: 100%;
}

.atg-drawer-link {
    border-radius: 14px !important;
    margin-bottom: 0.2rem;
    min-height: 44px;
}

.atg-drawer-link-active {
    background: rgba(209, 96, 61, 0.1) !important;
    color: var(--atg-drawer-accent) !important;
    font-weight: 700 !important;
}

.atg-drawer-group {
    border-radius: 18px;
    margin-bottom: 0.3rem;
    padding: 0.15rem;
}

.atg-drawer-group-active {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 0 0 1px rgba(126, 117, 111, 0.12);
}

.atg-drawer-link-label {
    display: block;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--atg-drawer-ink);
}

.atg-drawer-nav-category {
    margin-bottom: 0.15rem;
}

.atg-drawer-category-row {
    display: flex;
    align-items: stretch;
    gap: 0.15rem;
}

.atg-drawer-category-link.mud-nav-link {
    flex: 1 1 auto;
    min-width: 0;
}

.atg-drawer-category-static {
    flex: 1 1 auto;
    padding: 0.55rem 0.75rem;
}

.atg-drawer-category-toggle.mud-icon-button {
    flex: 0 0 auto;
    align-self: center;
    color: var(--atg-drawer-accent) !important;
}

.atg-drawer-category-children {
    display: grid;
    gap: 0.05rem;
    margin: 0.1rem 0 0.25rem 0.35rem;
    padding-left: 0.55rem;
    border-left: 2px solid rgba(126, 117, 111, 0.18);
}

.atg-drawer-child-link.mud-nav-link {
    min-height: 40px;
}

.atg-drawer-nav--compact .atg-drawer-link-copy span {
    display: none;
}

.atg-drawer-link-copy {
    display: grid;
    gap: 0.14rem;
    min-width: 0;
}

.atg-site-drawer .atg-drawer-link-copy strong {
    font-size: 0.94rem;
    line-height: 1.15;
    color: var(--atg-drawer-ink);
}

.atg-site-drawer .atg-drawer-link-copy span {
    color: var(--atg-drawer-muted);
    font-size: 0.73rem;
    line-height: 1.35;
}

.atg-drawer-group-intro {
    display: grid;
    gap: 0.16rem;
    padding: 0.2rem 0.9rem 0.55rem;
}

.atg-site-drawer .atg-drawer-group-intro strong {
    color: var(--atg-drawer-ink);
    font-size: 0.8rem;
    line-height: 1.2;
}

.atg-site-drawer .atg-drawer-group-intro span {
    color: var(--atg-drawer-muted);
    font-size: 0.7rem;
    line-height: 1.35;
}

.atg-drawer-footer-note {
    color: var(--atg-drawer-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.atg-drawer-footer-note a {
    color: var(--atg-drawer-accent);
    text-decoration: none;
}

.mud-overlay-drawer {
    background: rgba(22, 16, 12, 0.42) !important;
    backdrop-filter: blur(6px);
}

@media (max-width: 1279px) {
    .atg-appbar {
        padding-inline: 0.85rem;
    }

    .atg-header-desktop-nav,
    .atg-header-shortcuts-menu {
        display: none;
    }

    .atg-header-menu-toggle {
        display: inline-flex !important;
    }

    /* Auth ligger i drawer — giver logo og menu-knap plads i appbaren. */
    .atg-header-auth,
    .atg-header-login-button {
        display: none !important;
    }
}

@media (max-width: 1100px) {
    .atg-header-cta {
        display: none;
    }
}

@media (max-width: 860px) {
    .atg-header-cta {
        display: none;
    }
}

@media (max-width: 640px) {
    .atg-appbar {
        padding-inline: 0.65rem;
    }

    .atg-brand-wordmark {
        font-size: 1.6rem;
    }

    .atg-brand-kicker {
        display: none;
    }

    .atg-header-auth {
        display: none;
    }

    .atg-header-menu-toggle {
        width: 42px;
        height: 42px;
    }
}

.atg-main-content {
    flex: 1 0 auto;
    min-width: 0;
    color: var(--mud-palette-text-primary);
}
