/*
 * Editor contract styles for the Humanic storefront.
 *
 * The theme itself is Tailwind (tailwind.css) plus theme.css. What stays here is what the
 * core inline editor relies on: saved heading/paragraph/list overrides, the handle of an
 * emptied region, and the section token classes SectionRegistry may emit (asserted by
 * SectionRegistryDriftTest). Static asset, no build step.
 */

:root {
    --client-ink: #0f172a;
    --client-accent: #008db9;
}

/* Persisted semantic heading overrides. These classes intentionally beat an
 * imported theme's utility size so changing H1/H2/etc. is visible as well as
 * correct in the DOM. "Default" removes them and returns to the theme. */
.client-content-heading-h1 {
    font-size: 2.5rem !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
}
.client-content-heading-h2 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
}
.client-content-heading-h3 {
    font-size: 1.625rem !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}
.client-content-heading-h4 {
    font-size: 1.375rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}
.client-content-heading-h5 {
    font-size: 1.125rem !important;
    line-height: 1.4 !important;
    font-weight: 650 !important;
}
.client-content-heading-h6 {
    font-size: 1rem !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
}
.client-content-format-p {
    font-size: 1rem !important;
    line-height: 1.65 !important;
    font-weight: 400 !important;
}
.client-content-list-ul,
.client-content-list-ol {
    display: block !important;
    margin: 0.75rem 0 !important;
    padding-inline-start: 1.75rem !important;
}
.client-content-list-ul {
    list-style: disc outside !important;
}
.client-content-list-ol {
    list-style: decimal outside !important;
}
.client-content-list-ul > li,
.client-content-list-ol > li {
    display: list-item !important;
}

/* Editable regions -------------------------------------------------------- */

/* Rendered only for an admin: a region emptied on purpose still needs a
   handle, or it can never be restored. */
.client-block-empty {
    min-height: 20px;
    min-width: 60px;
    display: inline-block;
}

/*
 * Section appearance tokens.
 *
 * `App\Support\SectionRegistry` maps a stored token to one of these classes, and
 * the database only ever holds the token. Repainting a token is therefore a
 * change here and nowhere else — no UPDATE across the rows that chose it.
 *
 * Every class the registry can emit must exist below. There is no build step on
 * the client side to notice a missing one, so SectionSettingsTest asserts it.
 */
.client-section--bg-light {
    background: #fff;
}
.client-section--bg-muted {
    background: #f6f8fc;
}
.client-section--bg-dark {
    background: var(--client-ink);
    color: #fff;
}
/* Reads the accent through the variable so a per-section colour, when one is
   picked, repaints this without a second rule. */
.client-section--bg-primary {
    background: var(--client-accent);
    color: #fff;
}
.client-section--bg-dark a,
.client-section--bg-primary a {
    color: #fff;
}

.client-section--align-left {
    text-align: left;
}
.client-section--align-center {
    text-align: center;
}
.client-section--align-right {
    text-align: right;
}

.client-section--pad-none {
    padding-block: 0;
}
.client-section--pad-sm {
    padding-block: 16px;
}
.client-section--pad-md {
    padding-block: 32px;
}
.client-section--pad-lg {
    padding-block: 64px;
}

/*
 * A colour the editor picked, arriving as an inline custom property because no
 * stylesheet can hold a rule for a value invented at pick time. Redefining the
 * theme's own variable inside the section is what makes links and the primary
 * background follow along without a rule per component.
 */
.client-section--accent {
    --client-accent: var(--client-section-accent, #008db9);
}

/*
 * A section an editor hid. Only ever rendered for an editor — a visitor gets no
 * element at all — so this is editor chrome and may say so loudly.
 */
.client-section--hidden {
    opacity: 0.42;
    outline: 1px dashed #97a4b8;
    outline-offset: 2px;
}

/*
 * Section variants: the shapes a section itself knows how to render, declared in
 * SectionRegistry::SECTIONS and emitted as .client-section--<section>-<variant>.
 *
 * Nothing here yet: no theme in this repo declares a variant. When one does, its
 * class belongs below, scoped by section name so `boxed` in one section cannot
 * restyle another. SectionRegistryDriftTest fails on a variant whose class is
 * missing — there is no build step on the client side to notice.
 *
 * There is deliberately no class for "the way the template already does it":
 * that is the absence of a variant.
 */
