/*
 * Opt-in adapter. Add sm-design-system to a migrated Elementor container.
 * Existing kit-5 pages retain their current globals until explicitly migrated.
 * Typography utilities themselves do not require this class.
 */
:is(.elementor-kit-5.sm-design-system, .elementor-kit-5 .sm-design-system) {
    --e-global-color-primary: var(--c-navy);
    --e-global-color-secondary: var(--c-blue);
    --e-global-color-text: var(--c-copy);
    --e-global-color-accent: var(--c-purple);
    --e-global-color-0b3c141: var(--c-white);
    --e-global-color-63e9a87: var(--c-blue-light);
    --e-global-color-46d4d4e: var(--c-purple-light);
    --e-global-color-e8a87c5: var(--c-red);
    --e-global-color-2971357: var(--c-green);
    --e-global-color-a4e2e39: var(--c-bg-navy);
    --e-global-color-54f6634: var(--c-bg-blue);
    --e-global-color-3af9b44: var(--c-bg-main);

    --e-global-typography-primary-font-family: var(--font-family-heading);
    --e-global-typography-primary-font-weight: var(--font-weight-medium);
    --e-global-typography-secondary-font-family: var(--font-family-body);
    --e-global-typography-secondary-font-weight: var(--font-weight-book);
    --e-global-typography-text-font-family: var(--font-family-body);
    --e-global-typography-text-font-weight: var(--font-weight-book);
    --e-global-typography-accent-font-family: var(--font-family-body);
    --e-global-typography-accent-font-weight: var(--font-weight-medium);

    --e-global-typography-30abc41-font-family: var(--font-family-heading);
    --e-global-typography-30abc41-font-size: var(--text-heading-1-size);
    --e-global-typography-30abc41-font-weight: var(--text-heading-weight);
    --e-global-typography-30abc41-line-height: var(--text-heading-line-height);
    --e-global-typography-b3f956a-font-family: var(--font-family-heading);
    --e-global-typography-b3f956a-font-size: var(--text-heading-2-size);
    --e-global-typography-b3f956a-font-weight: var(--text-heading-weight);
    --e-global-typography-b3f956a-line-height: var(--text-heading-line-height);
    --e-global-typography-1a0fb33-font-family: var(--font-family-heading);
    --e-global-typography-1a0fb33-font-size: var(--text-heading-3-size);
    --e-global-typography-1a0fb33-font-weight: var(--text-heading-weight);
    --e-global-typography-1a0fb33-line-height: var(--text-heading-line-height);
    --e-global-typography-cb211ac-font-family: var(--font-family-heading);
    --e-global-typography-cb211ac-font-size: var(--text-heading-4-size);
    --e-global-typography-cb211ac-font-weight: var(--text-heading-weight);
    --e-global-typography-cb211ac-line-height: var(--text-heading-line-height);
    --e-global-typography-13f50ee-font-family: var(--font-family-heading);
    --e-global-typography-13f50ee-font-size: var(--text-heading-5-size);
    --e-global-typography-13f50ee-font-weight: var(--text-heading-weight);
    --e-global-typography-13f50ee-line-height: var(--line-height-md);
    --e-global-typography-2e515fa-font-family: var(--font-family-body);
    --e-global-typography-2e515fa-font-size: var(--text-body-size);
    --e-global-typography-2e515fa-font-weight: var(--font-weight-book);
    --e-global-typography-2e515fa-line-height: var(--text-body-line-height);
    --e-global-typography-d2e4d79-font-family: var(--font-family-body);
    --e-global-typography-d2e4d79-font-size: var(--text-body-sm-size);
    --e-global-typography-d2e4d79-font-weight: var(--font-weight-regular);
    --e-global-typography-d2e4d79-line-height: var(--text-body-sm-line-height);
    --e-global-typography-ecdcad8-font-family: var(--font-family-body);
    --e-global-typography-ecdcad8-font-size: var(--text-body-size);
    --e-global-typography-ecdcad8-font-weight: var(--font-weight-medium);
    --e-global-typography-ecdcad8-line-height: var(--line-height-sm);
    --e-global-typography-08fa84d-font-family: var(--font-family-body);
    --e-global-typography-08fa84d-font-size: var(--text-caption-size);
    --e-global-typography-08fa84d-font-weight: var(--font-weight-regular);
    --e-global-typography-08fa84d-line-height: var(--text-caption-line-height);
}

/* Keep the existing donation shortcut, without covering native mobile cards. */
@media (max-width: 767px) {
    body:has(main.sm-design-system) .elementor-element-a23ab8a {
        top: auto !important;
        bottom: calc(16px + env(safe-area-inset-bottom)) !important;
        right: 16px !important;
        width: 56px !important;
        height: 56px !important;
        padding: 0 !important;
    }
    body:has(main.sm-design-system) .elementor-element-a23ab8a .elementor-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        padding: 12px;
        box-sizing: border-box;
    }
    body:has(main.sm-design-system) .elementor-element-a23ab8a .elementor-icon svg { width: 32px; height: 32px; }
}
