/* Host integration is limited to pages containing a COX frontend root. */
html:has(.cox-ui),
body:has(.cox-ui),
body:has(.cox-ui) :is(#page, .site, .site-content, .content-area, #content,
    .entry-content, .page-content, .elementor, .elementor-section-wrap,
    .elementor-widget-wrap, .elementor-widget-container, .e-con, .e-con-inner) {
    background: #030405 !important;
}

html:has(.cox-ui), body:has(.cox-ui) { min-height: 100%; }
body:has(.cox-ui) { overflow-x: clip; }
html:has(:is(.cox-dashboard, .cox-student-portal, .cox-teacher-portal)) { margin-top: 0 !important; }
body:has(:is(.cox-dashboard, .cox-student-portal, .cox-teacher-portal)) #wpadminbar { display: none !important; }
/* WordPress media picker must stay above the plugin dialog. */
body:has(.cox-dashboard) .media-modal { z-index: 1000005 !important; }
body:has(.cox-dashboard) .media-modal-backdrop { z-index: 1000004 !important; }

:where(.cox-ui, .cox-ui *) { box-sizing: border-box; }
.cox-ui :where(button, input, select, textarea) { font-family: inherit; }
.cox-ui :where(a, button) { -webkit-tap-highlight-color: transparent; }
.cox-ui [hidden] { display: none !important; }
:where(.cox-ui .dashicons) { line-height: 1; }
.cox-ui :where(a:not(.cox-ui-button), summary):focus-visible {
    outline: 2px solid var(--cox-brand-focus);
    outline-offset: 3px;
}

.cox-ui-note {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.cox-ui-note__icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: var(--cox-brand-red);
    line-height: 1;
}

.cox-ui-note__text {
    min-width: 0;
    margin: 0;
    color: var(--cox-brand-muted);
    line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
    :where(.cox-ui, .cox-site-loader) * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
