/* Final page-shell overrides for the protected Domain Manager application page. */
body.domainverwaltung-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.domainverwaltung-page #wrapper {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
}

/* The application container itself owns the page width and centering. */
body.domainverwaltung-page #container {
    display: block !important;
    width: min(calc(100vw - 48px), var(--dm-theme-content-width, 1480px)) !important;
    max-width: var(--dm-theme-content-width, 1480px) !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    padding: 0 !important;
}

body.domainverwaltung-page #main {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.domainverwaltung-page #left,
body.domainverwaltung-page #right {
    display: none !important;
}

/* Neutralize fixed theme header and footer dimensions without preventing custom content. */
body.domainverwaltung-page #header,
body.domainverwaltung-page #footer {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.domainverwaltung-page #main > .inside {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 0 48px !important;
}

body.domainverwaltung-page #main > .inside > .mod_article {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.domainverwaltung-page .domain-manager-layout {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
}

body.domainverwaltung-page h1 {
    margin-bottom: 16px;
}

/*
 * Component polish. These rules intentionally do not require the
 * domainverwaltung-page body class so existing/manual installations keep
 * their own page layout while receiving the same component styling.
 */
.domain-manager-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
}

.domain-manager-overview .domain-summary {
    grid-template-columns: 112px minmax(160px, 1.5fr) minmax(180px, 1.4fr) minmax(100px, .7fr) minmax(90px, .6fr);
    padding-block: 16px;
}

.domain-manager-overview .domain-thumbnail {
    width: 92px;
    height: 52px;
}

.domain-manager-filter {
    box-sizing: border-box;
}

.domainverwaltung-login.logout {
    margin-top: 18px;
}

.domain-manager-overview .domain-manager-global-actions .domain-manager-trakked-link,
.domain-manager-overview .domain-manager-global-actions .domain-sync-all-button {
    font-size: .88rem !important;
    line-height: 1.2;
}

.domain-manager-overview .detail-action {
    border-color: var(--dm-accent);
    background: var(--dm-accent);
    color: #fff !important;
}

.domain-manager-overview .detail-action:hover,
.domain-manager-overview .detail-action:focus-visible {
    border-color: var(--dm-accent-hover);
    background: var(--dm-accent-hover);
    color: #fff !important;
}

@media (max-width: 1180px) {
    .domain-manager-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    .domain-manager-overview .domain-summary {
        grid-template-columns: 100px minmax(150px, 1.5fr) minmax(150px, 1fr);
    }

    .domain-manager-overview .domain-thumbnail {
        width: 84px;
        height: 47px;
    }
}

@media (max-width: 680px) {
    body.domainverwaltung-page #container {
        width: calc(100vw - 28px) !important;
    }

    body.domainverwaltung-page #main > .inside {
        padding: 10px 0 36px !important;
    }

    .domain-manager-overview .domain-summary {
        grid-template-columns: 82px minmax(0, 1fr);
        padding-block: 14px;
    }

    .domain-manager-overview .domain-thumbnail {
        width: 72px;
        height: 41px;
    }
}
