/*
   Custom page presentation.

   Custom pages are public catalogue-tree URLs that intentionally bypass the
   product-grid renderer. Keep the styling conservative so legacy HTML entered
   into Header / intro content remains in control.

   Activity-log note:
   This is passive presentation only. Do not activity-log public rendering.
*/
.custom-page {
    width: min(100%, 4000px);
    margin: 0 auto 2rem;
}

.custom-page-content {
    background: #ffffff;
    padding: 1rem;
}

.custom-page-empty {
    border: 1px dashed var(--wwd-colour-dark-blue, #213663);
}

.custom-page-error {
    border: 1px solid var(--wwd-colour-dark-blue, #213663);
}

/*
   Admin-only diagnostics for custom PHP header files.
   Public visitors never see this block; it is rendered only when an Admin
   session is active. CSS is presentation-only and should not be activity-logged.
*/
.custom-page-admin-diagnostic {
    margin: 1rem 0;
    padding: 1rem;
    border: 2px solid var(--wwd-colour-dark-blue, #213663);
    background: #fff8e6;
    color: #222222;
}

.custom-page-admin-diagnostic h2,
.custom-page-admin-diagnostic h3 {
    margin-top: 0;
}

.custom-page-admin-diagnostic code {
    padding: 0.05rem 0.25rem;
    background: rgba(255, 255, 255, 0.75);
}

.custom-page-admin-diagnostic pre {
    overflow-x: auto;
    padding: 0.75rem;
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #d8c48a;
}

.custom-page-admin-diagnostic-list {
    display: grid;
    grid-template-columns: minmax(10rem, 18rem) 1fr;
    gap: 0.35rem 0.75rem;
}

.custom-page-admin-diagnostic-list dt {
    font-weight: bold;
}

.custom-page-admin-diagnostic-list dd {
    margin: 0;
}

.custom-page-admin-diagnostic-error,
.custom-page-admin-diagnostic-warnings {
    margin-top: 1rem;
}

@media (max-width: 700px) {
    .custom-page-admin-diagnostic-list {
        display: block;
    }

    .custom-page-admin-diagnostic-list dt {
        margin-top: 0.5rem;
    }
}
