/**
 * NOTICE OF LICENSE
 *
 * This file is proprietary software and is not open source.
 * Your subscription grants you a limited, non-transferable right to use this code
 * solely as part of the Retail Media Manager platform, and only for the duration
 * of your valid subscription.
 *
 * You are not permitted to copy, redistribute, resell, lease, license, sub-license,
 * or otherwise make this code or its resources available to any third party.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file. If you require customizations, please
 * contact Corebuilt Labs for professional services.
 *
 * @author     Corebuilt Labs <info@corebuilt.com>
 * @copyright  2025 Corebuilt Labs
 * @license    Limited to use within an active subscription to Retail Media Manager
 */

/* Advertiser access-request card (0.11.0). Explicit EF Style-tab values override ({{WRAPPER}} selectors are more specific).
   0.36.0 (RDEV-335 row 3.2, plan D1): every colour and font is read from the card variables (--rmmps-*). On .rmmps-ar
   they are the 0.32.0 values (the App's --primary and the theme's tokens, with their fallbacks); inside an Element Flow
   document (.rmmps-ar--ef, which every render path of the widget adds) they come from Element Flow's global colours and
   fonts (--e-global-color-primary, --e-global-color-text, --e-global-typography-*-font-family), never from --primary or
   the theme's tokens, as on the Sign in card (rmmiam-signin.css). The status colours keep their fixed values there.
   0.36.0 (RDEV-335 plan D13): the card never reads the Branding colour (--primary and the tokens derived from it); on
   .rmmps-ar the accent is the RMM default. */
.rmmps-ar {
    --rmmps-font: var(--bs-body-font-family, Inter, system-ui, sans-serif);
    --rmmps-title-font: var(--rmmps-font);
    --rmmps-title-weight: 600;
    --rmmps-accent: #1f4788;
    --rmmps-accent-hover: #1f4788;
    --rmmps-accent-active: #1f4788;
    --rmmps-on-accent: #fff;
    --rmmps-focus-ring: rgba(31, 71, 136, .4);
    --rmmps-surface: var(--surface-card, #fff);
    --rmmps-border: var(--border-subtle, #e5e7eb);
    --rmmps-field-border: var(--border-field, #6b7280);
    --rmmps-title: var(--text-strong, #2c3e50);
    --rmmps-body: var(--text-body, #4b5563);
    --rmmps-heading: var(--text-heading, #374151);
    --rmmps-muted: var(--text-muted, #6b7280);
    --rmmps-placeholder: var(--text-placeholder, #9ca3af);
    --rmmps-danger: var(--status-danger, #dc3545);
    --rmmps-danger-subtle: var(--status-danger-subtle, #f8d7da);
    --rmmps-danger-strong: var(--status-danger-strong, #b02a37);
    --rmmps-success: var(--status-success, #198754);
    --rmmps-success-subtle: var(--status-success-subtle, #d1e7dd);
    --rmmps-success-strong: var(--status-success-strong, #146c43);
    padding: 24px 16px; /* the 16 px page gutter of §8.1 at every width, as the Sign in card (review Fix 11) */
}
.rmmps-ar.rmmps-ar--ef {
    --rmmps-font: var(--e-global-typography-text-font-family, Inter), system-ui, sans-serif;
    --rmmps-title-font: var(--e-global-typography-primary-font-family, Inter), system-ui, sans-serif;
    --rmmps-title-weight: var(--e-global-typography-primary-font-weight, 600);
    --rmmps-accent: var(--e-global-color-primary, #1f4788);
    --rmmps-accent-hover: var(--rmmps-accent);
    --rmmps-accent-active: var(--rmmps-accent);
    --rmmps-on-accent: #fff;
    --rmmps-focus-ring: rgba(31, 71, 136, .4);
    --rmmps-surface: #fff;
    --rmmps-border: #e5e7eb;
    --rmmps-field-border: #6b7280;
    --rmmps-title: var(--e-global-color-text, #1f2933);
    --rmmps-body: var(--rmmps-title);
    --rmmps-heading: var(--rmmps-title);
    --rmmps-muted: var(--rmmps-title);
    --rmmps-placeholder: #9ca3af;
    --rmmps-danger: #dc3545;
    --rmmps-danger-subtle: #f8d7da;
    --rmmps-danger-strong: #b02a37;
    --rmmps-success: #198754;
    --rmmps-success-subtle: #d1e7dd;
    --rmmps-success-strong: #146c43;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
    .rmmps-ar.rmmps-ar--ef {
        --rmmps-accent-hover: color-mix(in srgb, var(--rmmps-accent) 88%, #000);
        --rmmps-accent-active: color-mix(in srgb, var(--rmmps-accent) 76%, #000);
        --rmmps-focus-ring: color-mix(in srgb, var(--rmmps-accent) 40%, transparent);
        --rmmps-body: color-mix(in srgb, var(--rmmps-title) 85%, #fff);
        --rmmps-muted: color-mix(in srgb, var(--rmmps-title) 72%, #fff);
        --rmmps-border: color-mix(in srgb, var(--rmmps-title) 14%, #fff);
        --rmmps-field-border: color-mix(in srgb, var(--rmmps-title) 60%, #fff);
        --rmmps-placeholder: color-mix(in srgb, var(--rmmps-title) 45%, #fff);
    }
}
/* 0.29.0 (RDEV-299 row 3.2, log D253; rmm-advertiser-design.md 1.9 §10, §8.4, §8.11; request-access.dc.html): the Sign
   in card's look (rmmiam-signin.css): 480 px, radius 16, 1 px border-subtle, the card shadow, 32 px padding; the
   title `section-title` 20/28 in --text-strong; labels 14/600; fields 40 px with --border-field, radius 8, a 16 px
   value, the border Primary on focus with no outline; native 16 px checkboxes in Primary; one 40 px full-width
   button; 16 px between the groups. The hexes are design.md's values as fallbacks under the Element Flow chrome. */
.rmmps-ar__card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--rmmps-surface);
    border: 1px solid var(--rmmps-border);
    border-radius: var(--radius-lg, 16px);
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    box-sizing: border-box;
    font-family: var(--rmmps-font);
}
.rmmps-ar__title { margin: 0 0 8px; font-family: var(--rmmps-title-font); font-size: 20px; line-height: 28px; font-weight: var(--rmmps-title-weight); color: var(--rmmps-title); }
/* 0.36.0 (RDEV-335 row 3.2): outside Element Flow the title ignores the site's heading case and spacing; inside it the
   Theme Style reaches the title */
.rmmps-ar:where(:not(.rmmps-ar--ef)) .rmmps-ar__title { letter-spacing: normal; text-transform: none; }
.rmmps-ar__lede { margin: 0 0 16px; font-size: 14px; line-height: 20px; color: var(--rmmps-body); }
.rmmps-ar__row { display: flex; gap: 16px; }
.rmmps-ar__row .rmmps-ar__field { flex: 1 1 0; min-width: 0; }
.rmmps-ar__field { margin-bottom: 16px; }
.rmmps-ar__label { display: block; margin-bottom: 6px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--rmmps-heading); }
.rmmps-ar__field--required .rmmps-ar__label::after { content: ' *'; color: var(--rmmps-danger); }
.rmmps-ar__input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--rmmps-field-border);
    border-radius: var(--radius-md, 8px);
    font: inherit;
    font-size: 16px;
    line-height: 24px;
    color: var(--rmmps-title);
    background: var(--rmmps-surface);
    box-sizing: border-box;
}
textarea.rmmps-ar__input { height: auto; padding: 10px 12px; resize: vertical; } /* the prototype's 10 px 12 px (review Fix 9) */
.rmmps-ar__input::placeholder { color: var(--rmmps-placeholder); opacity: 1; }
.rmmps-ar__input:focus {
    outline: none;
    box-shadow: none;
    border-color: var(--rmmps-accent);
}
.rmmps-ar__help { display: block; margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--rmmps-muted); }
.rmmps-ar__consent { margin-bottom: 12px; }
.rmmps-ar__check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--rmmps-title); cursor: pointer; }
.rmmps-ar__check input { width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--rmmps-accent); }
.rmmps-ar__check a { color: var(--rmmps-accent); text-decoration: none; }
.rmmps-ar__check a:hover { text-decoration: underline; }
/* review Fix 5 (§8.4, request-access.dc.html): the required consents end with the danger marker */
.rmmps-ar__consent--required .rmmps-ar__check > span::after { content: ' *'; color: var(--rmmps-danger); }
.rmmps-ar__submit {
    display: block;
    width: 100%;
    height: 40px;
    margin-top: 16px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius-md, 8px);
    font: inherit;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    color: var(--rmmps-on-accent);
    background: var(--rmmps-accent);
}
/* §8.3 (review Fix 7): hover --primary-hover (design.md §4.2), pressed --primary-active, disabled 45% with not-allowed */
.rmmps-ar__submit:hover:not(:disabled) { background: var(--rmmps-accent-hover); }
.rmmps-ar__submit:active:not(:disabled) { background: var(--rmmps-accent-active); }
.rmmps-ar__submit:disabled { opacity: .45; cursor: not-allowed; }
/* §8.8 (review Fix 8): the banner with its leading status icon, Lucide circle-alert or circle-check at 16 px in the
   banner's text color */
.rmmps-ar__msg { position: relative; margin: 16px 0 0 0; padding: 12px 16px 12px 40px; border: 1px solid; border-radius: var(--radius-md, 8px); font-size: 13px; line-height: 18px; }
.rmmps-ar__msg::before { content: ''; position: absolute; left: 16px; top: 13px; width: 16px; height: 16px; background-color: currentColor; }
.rmmps-ar__msg.is-error { background: var(--rmmps-danger-subtle); border-color: var(--rmmps-danger); color: var(--rmmps-danger-strong); }
.rmmps-ar__msg.is-error::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' x2='12' y1='8' y2='12'/%3E%3Cline x1='12' x2='12.01' y1='16' y2='16'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
.rmmps-ar__msg.is-success { background: var(--rmmps-success-subtle); border-color: var(--rmmps-success); color: var(--rmmps-success-strong); }
.rmmps-ar__msg.is-success::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
/* D254: the text links below the button, in `small` */
.rmmps-ar__links { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; font-size: 13px; line-height: 18px; color: var(--rmmps-muted); }
.rmmps-ar__links a.rmmps-ar__link { color: var(--rmmps-accent); text-decoration: none; }
.rmmps-ar__links a.rmmps-ar__link:hover { text-decoration: underline; }
.rmmps-access-form.rmmps-done .rmmps-ar__field,
.rmmps-access-form.rmmps-done .rmmps-ar__submit { display: none; }
.rmmps-field-error { display: block; margin-top: 6px; color: var(--rmmps-danger); font-size: 13px; line-height: 18px; }
.elementor-field-group.elementor-error .rmmps-ar__input { border-color: var(--rmmps-danger); }
/* 0.29.0 (RDEV-299 plan D61, log D497; request-access.dc.html): the "Request sent" state, the prototype's column with
   12 px gaps: the 28 px mail-check icon in --status-success, the title, the sentence in `body` --text-body and the help
   line in `small`. The title takes focus when the state opens (tabindex -1, no ring: it is not a control). */
.rmmps-ar__state[hidden] { display: none; }
.rmmps-ar__sent { display: flex; flex-direction: column; gap: 12px; }
.rmmps-ar__sent-icon { display: block; width: 28px; height: 28px; color: var(--rmmps-success); }
.rmmps-ar__sent .rmmps-ar__title { margin: 0; }
.rmmps-ar__sent .rmmps-ar__sent-title:focus { outline: none; }
.rmmps-ar__sent-text { margin: 0; font-size: 14px; line-height: 20px; color: var(--rmmps-body); }
.rmmps-ar__sent .rmmps-ar__sent-help { margin: 0; }
/* §11 for the RMM Advertiser Portal (review Fix 4): a 2 px Primary outline 2 px off the control with the --focus-ring
   halo on the button, the links and the checkboxes (§8.4: checkboxes keep the outline); the text fields keep their
   Primary border. Qualified by the card so the rules outrank Element Flow's. */
.rmmps-ar__card .rmmps-ar__submit:focus-visible,
.rmmps-ar__card a:focus-visible,
.rmmps-ar__card .rmmps-ar__check input:focus-visible {
    outline: 2px solid var(--rmmps-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--rmmps-focus-ring);
}
.rmmps-ar__card a:focus-visible { border-radius: 2px; }
/* Phone width (§8.1, §8.4; request-access.dc.html stacks the names on mobile; review Fix 11): fields and the button 48 px,
   First and Last name one above the other */
@media (max-width: 767px) {
    .rmmps-ar__input:not(textarea),
    .rmmps-ar__submit { height: var(--control-h-lg, 48px); }
    .rmmps-ar__row { flex-direction: column; gap: 0; }
}

/* 0.32.0 (RDEV-320 row 4.1; request-access.dc.html): the privacy policy line under the button */
.rmmps-ar__privacy { margin: -4px 0 0; font-size: 13px; line-height: 18px; color: var(--rmmps-muted); }
.rmmps-ar__privacy a { color: var(--rmmps-accent); }
