/* SafeListMailer Theme API v2 structural layouts. Themes may style these
   contracts but cannot replace application PHP or business logic. */
.content-width-contained .slm-shell-container { max-width: var(--theme-content-max-width); }
.slm-member-shell > [data-theme-region] { order: var(--theme-region-order, 50); }
.content-width-wide .slm-shell-container { max-width: min(1480px, calc(100% - 2rem)); }
.content-width-full .slm-shell-container { max-width: none; width: 100%; padding-inline: clamp(1rem, 3vw, 3rem); }

.public-layout-hero-wide:not(.slm-admin-shell) .slm-page-topbar__inner {
    min-height: clamp(220px, 34vw, 440px);
    align-items: center;
}
.public-layout-split-hero .slm-page-topbar__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    gap: clamp(2rem, 5vw, 5rem);
}
.public-layout-stacked-sections main > section,
.public-layout-stacked-sections main > .card {
    margin-block: var(--theme-section-spacing);
}

.member-layout-rail-right .slm-member-shell {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
}
.member-layout-rail-right .slm-member-rail { order: 2; }
.member-layout-rail-right .slm-member-main { order: 1; }
.member-layout-dashboard-wide .slm-member-shell,
.member-layout-compact-workspace .slm-member-shell { grid-template-columns: 1fr; }
.member-layout-dashboard-wide .slm-member-rail { display: none; }
.member-layout-compact-workspace .slm-member-rail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.login-layout-split-screen body,
.login-layout-brand-panel body { min-height: 100vh; }
.login-layout-split-screen main.slm-theme-login-surface,
.login-layout-brand-panel main.slm-theme-login-surface {
    min-height: calc(100vh - var(--theme-header-height) - 8rem);
    display: grid;
    align-items: center;
}
.slm-theme-login-brand-panel { display: none; }
.slm-theme-login-content { min-width: 0; width: 100%; }
.login-layout-split-screen .slm-theme-login-brand-panel,
.login-layout-brand-panel .slm-theme-login-brand-panel {
    display: block;
    padding: clamp(1.5rem, 4vw, 4rem);
}
.login-layout-split-screen .slm-theme-login-brand-panel {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    color: var(--theme-primary-contrast);
    border-radius: var(--theme-radius-lg);
}
.login-layout-split-screen main.slm-theme-login-surface { grid-template-columns: minmax(0, 1fr) minmax(340px, 560px); }
.login-layout-brand-panel main.slm-theme-login-surface {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
    border-radius: var(--theme-radius-lg);
    padding: clamp(1.25rem, 5vw, 5rem);
}

@media (max-width: 900px) {
    .public-layout-split-hero .slm-page-topbar__inner,
    .login-layout-split-screen main.slm-theme-login-surface,
    .member-layout-rail-right .slm-member-shell { grid-template-columns: 1fr; }
    .member-layout-rail-right .slm-member-rail,
    .member-layout-rail-right .slm-member-main { order: initial; }
}
