/**
 * ANFA Notifications — Full-screen auth page styles.
 * Modern card-on-dark-bg layout inspired by the MatJar admin login,
 * but kept self-contained in this plugin (no cross-plugin dependencies).
 */

html, body.anfa-fs-host {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
}

body.anfa-fs-host {
    --anfa-fs-card-bg: #ffffff;
    --anfa-fs-card-border: rgba(0, 0, 0, 0.06);
    --anfa-fs-card-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    --anfa-fs-text: #0a0a0a;
    --anfa-fs-muted: #6b7280;
    --anfa-fs-muted-soft: #9ca3af;
    --anfa-fs-primary: #0a0a0a;
    --anfa-fs-primary-hover: #1f1f1f;
    --anfa-fs-primary-fg: #fafafa;
    --anfa-fs-secondary: #f3f4f6;
    --anfa-fs-secondary-hover: #e5e7eb;
    --anfa-fs-secondary-fg: #111827;
    --anfa-fs-input-bg: #ffffff;
    --anfa-fs-input-border: #e5e7eb;
    --anfa-fs-input-border-focus: #0a0a0a;
    --anfa-fs-input-text: #0a0a0a;
    --anfa-fs-ring: rgba(10, 10, 10, 0.12);
    --anfa-fs-radius: 0.625rem;
    --anfa-fs-radius-card: 1.125rem;
    --anfa-fs-destructive: #dc2626;
    --anfa-fs-page-bg: #050510;

    font-family: 'IBM Plex Sans Arabic', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--anfa-fs-text);
    background: var(--anfa-fs-page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.anfa-fs-host * {
    box-sizing: border-box;
}

.anfa-fs-wrap {
    position: relative;
    display: flex;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
}

.anfa-fs-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 18% 12%, rgba(80, 70, 120, 0.55), transparent 60%),
        radial-gradient(ellipse 60% 60% at 82% 88%, rgba(30, 60, 110, 0.55), transparent 62%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(55, 55, 85, 0.35), transparent 70%),
        linear-gradient(180deg, var(--anfa-fs-page-bg) 0%, var(--anfa-fs-page-bg) 100%);
}

@supports (background: color-mix(in srgb, red, blue)) {
    .anfa-fs-bg {
        background:
            radial-gradient(ellipse 70% 55% at 18% 12%, rgba(80, 70, 120, 0.55), transparent 60%),
            radial-gradient(ellipse 60% 60% at 82% 88%, rgba(30, 60, 110, 0.55), transparent 62%),
            radial-gradient(ellipse 40% 40% at 50% 50%, rgba(55, 55, 85, 0.35), transparent 70%),
            linear-gradient(180deg,
                color-mix(in srgb, var(--anfa-fs-page-bg) 96%, white 4%) 0%,
                var(--anfa-fs-page-bg) 100%);
    }
}

.anfa-fs-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.35);
}

.anfa-fs-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* ---- Logo + heading ---- */
.anfa-fs-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    animation: anfaFsFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.anfa-fs-logo {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    background: #fff;
    color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.anfa-fs-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 9999px;
}

.anfa-fs-logo-text {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.anfa-fs-heading {
    text-align: center;
}

.anfa-fs-site-name {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anfa-fs-sub {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 400;
}

/* ---- Card ---- */
.anfa-fs-card {
    width: 100%;
    background: var(--anfa-fs-card-bg);
    border: 1px solid var(--anfa-fs-card-border);
    border-radius: var(--anfa-fs-radius-card);
    padding: 1.5rem;
    box-shadow: var(--anfa-fs-card-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: anfaFsFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.08s;
}

.anfa-fs-footer {
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    font-weight: 400;
    text-align: center;
    animation: anfaFsFadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.16s;
}

.anfa-fs-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.anfa-fs-footer a:hover {
    color: #fff;
}

@keyframes anfaFsFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Unified auth widget inside the card ---- */
body.anfa-fs-host .anfa-auth-unified {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
}

/* Tabs ("phone" | "email") — segmented pill */
body.anfa-fs-host .anfa-auth-methods {
    display: flex;
    gap: 0;
    margin: 0 0 1.25rem;
    padding: 0.25rem;
    background: var(--anfa-fs-secondary);
    border-radius: 9999px;
}

body.anfa-fs-host .anfa-auth-method {
    flex: 1 1 0;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--anfa-fs-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.anfa-fs-host .anfa-auth-method:hover:not(.is-active) {
    color: var(--anfa-fs-text);
}

body.anfa-fs-host .anfa-auth-method.is-active {
    background: #fff;
    color: var(--anfa-fs-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Stage layout — explicit override for [hidden] because our display rules would otherwise win */
body.anfa-fs-host .anfa-auth-stage {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

body.anfa-fs-host [hidden],
body.anfa-fs-host .anfa-auth-unified [hidden],
body.anfa-fs-host .anfa-auth-unified p.form-row[hidden],
body.anfa-fs-host .anfa-auth-unified .form-row[hidden],
body.anfa-fs-host .anfa-auth-unified .form-row-wide[hidden],
body.anfa-fs-host .anfa-auth-stage[hidden] {
    display: none !important;
}

/* Reset WooCommerce form-row floats inside the card */
body.anfa-fs-host .anfa-auth-unified .form-row,
body.anfa-fs-host .anfa-auth-unified p.form-row,
body.anfa-fs-host .anfa-auth-unified .form-row-wide,
body.anfa-fs-host .anfa-auth-unified .form-row-first,
body.anfa-fs-host .anfa-auth-unified .form-row-last {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

body.anfa-fs-host .anfa-auth-unified .clear {
    display: none;
}

/* Labels */
body.anfa-fs-host .anfa-auth-unified label {
    display: block;
    margin: 0 0 0.375rem;
    color: var(--anfa-fs-text);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
}

body.anfa-fs-host .anfa-auth-unified label .required {
    color: var(--anfa-fs-destructive);
    margin-inline-start: 2px;
}

/* Inputs */
body.anfa-fs-host .anfa-auth-unified input[type="text"],
body.anfa-fs-host .anfa-auth-unified input[type="email"],
body.anfa-fs-host .anfa-auth-unified input[type="tel"],
body.anfa-fs-host .anfa-auth-unified input[type="password"],
body.anfa-fs-host .anfa-auth-unified select {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.625rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--anfa-fs-input-border);
    border-radius: var(--anfa-fs-radius);
    background: var(--anfa-fs-input-bg);
    color: var(--anfa-fs-input-text);
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.anfa-fs-host .anfa-auth-unified input::placeholder {
    color: var(--anfa-fs-muted-soft);
}

body.anfa-fs-host .anfa-auth-unified input:focus,
body.anfa-fs-host .anfa-auth-unified select:focus {
    outline: none;
    border-color: var(--anfa-fs-input-border-focus);
    box-shadow: 0 0 0 3px var(--anfa-fs-ring);
}

body.anfa-fs-host .anfa-auth-unified input[readonly] {
    background: #f9fafb !important;
    color: var(--anfa-fs-muted) !important;
    cursor: default;
}

/* Phone wrap inside the card */
body.anfa-fs-host .anfa-auth-unified .anfa-phone-wrap {
    display: flex;
    gap: 0.5rem;
    direction: ltr;
}

body.anfa-fs-host .anfa-auth-unified .anfa-phone-wrap > .anfa-phone-cc {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 98px;
    max-width: 128px;
}

body.anfa-fs-host .anfa-auth-unified .anfa-phone-wrap > .anfa-phone-input {
    flex: 1 1 auto;
    direction: ltr;
    text-align: left;
}

/* Buttons */
body.anfa-fs-host .anfa-auth-unified .button,
body.anfa-fs-host .anfa-auth-unified button.button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.625rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--anfa-fs-radius);
    background: var(--anfa-fs-primary);
    color: var(--anfa-fs-primary-fg);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}

body.anfa-fs-host .anfa-auth-unified .button:hover:not([disabled]),
body.anfa-fs-host .anfa-auth-unified button.button:hover:not([disabled]) {
    background: var(--anfa-fs-primary-hover);
}

body.anfa-fs-host .anfa-auth-unified .button:focus-visible,
body.anfa-fs-host .anfa-auth-unified button.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--anfa-fs-ring);
}

body.anfa-fs-host .anfa-auth-unified .button[disabled],
body.anfa-fs-host .anfa-auth-unified button.button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Secondary "back" buttons */
body.anfa-fs-host .anfa-auth-unified [data-action="back"],
body.anfa-fs-host .anfa-auth-unified [data-action="back-phone-choice"],
body.anfa-fs-host .anfa-auth-unified [data-action^="back"] {
    background: var(--anfa-fs-secondary) !important;
    color: var(--anfa-fs-secondary-fg) !important;
}

body.anfa-fs-host .anfa-auth-unified [data-action="back"]:hover:not([disabled]),
body.anfa-fs-host .anfa-auth-unified [data-action^="back"]:hover:not([disabled]) {
    background: var(--anfa-fs-secondary-hover) !important;
}

/* Action groups — stack buttons vertically on the card.
   !important is required here because the .form-row rule above forces
   display:block with !important, and this element carries both classes. */
body.anfa-fs-host .anfa-auth-unified .anfa-auth-actions,
body.anfa-fs-host .anfa-auth-unified p.form-row.anfa-auth-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin: 0.5rem 0 0 !important;
}

body.anfa-fs-host .anfa-auth-unified .anfa-auth-actions .button {
    min-width: 0;
    width: 100%;
    margin: 0 !important;
}

/* Top-level identify-stage continue button gets a touch more breathing room */
body.anfa-fs-host .anfa-auth-stage[data-stage="identify"] > .form-row:last-of-type {
    margin-top: 0.25rem;
}

/* Account summary pill */
body.anfa-fs-host .anfa-auth-unified .anfa-auth-summary {
    margin: 0;
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--anfa-fs-muted);
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: var(--anfa-fs-radius);
    line-height: 1.4;
}

body.anfa-fs-host .anfa-auth-unified .anfa-auth-summary:empty {
    display: none;
}

body.anfa-fs-host .anfa-auth-unified .anfa-auth-summary.anfa-summary-new {
    background: #fffbeb;
    border-color: #fde68a;
    color: #78350f;
}

/* Password hint */
body.anfa-fs-host .anfa-auth-unified .anfa-password-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--anfa-fs-muted);
}

/* Messages */
body.anfa-fs-host .anfa-auth-unified .anfa-otp-msg {
    margin: 0.5rem 0 0;
    padding: 0.625rem 0.75rem;
    border-radius: var(--anfa-fs-radius);
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.anfa-fs-host .anfa-auth-unified .anfa-otp-msg:empty {
    display: none;
    margin: 0;
    padding: 0;
}

/* Two-column name fields on wider screens */
@media (min-width: 480px) {
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-email"],
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-phone"] {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem 0.75rem;
    }

    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-email"] > .form-row-wide,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-phone"] > .form-row-wide,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-email"] > .anfa-auth-summary,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-phone"] > .anfa-auth-summary,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-email"] > .anfa-auth-actions,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-phone"] > .anfa-auth-actions,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-email"] > .anfa-auth-signup-email-phone-row,
    body.anfa-fs-host .anfa-auth-stage[data-stage="signup-phone"] > .anfa-auth-signup-email-phone-row {
        grid-column: 1 / -1;
    }

    body.anfa-fs-host .anfa-auth-stage .form-row-first  { grid-column: 1 / 2; }
    body.anfa-fs-host .anfa-auth-stage .form-row-last   { grid-column: 2 / 3; }
}

/* Modal styling overrides (match card aesthetic) */
body.anfa-fs-host .anfa-modal-card {
    font-family: inherit;
    border-radius: var(--anfa-fs-radius-card);
    padding: 1.5rem 1.5rem 1.25rem;
}

body.anfa-fs-host .anfa-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

body.anfa-fs-host .anfa-modal-sub {
    font-size: 0.875rem;
}

body.anfa-fs-host .anfa-modal-card input[type="text"],
body.anfa-fs-host .anfa-modal-card input[type="number"] {
    min-height: 2.75rem;
    border: 1px solid var(--anfa-fs-input-border);
    border-radius: var(--anfa-fs-radius);
    padding: 0.5rem 0.75rem;
    font-size: 1.125rem;
    font-family: inherit;
}

body.anfa-fs-host .anfa-modal-card .button {
    background: var(--anfa-fs-primary);
    color: var(--anfa-fs-primary-fg);
    border: 0;
    border-radius: var(--anfa-fs-radius);
    min-height: 2.75rem;
    font-family: inherit;
    font-weight: 500;
}

body.anfa-fs-host .anfa-modal-card .button:hover:not([disabled]) {
    background: var(--anfa-fs-primary-hover);
}

body.anfa-fs-host .anfa-modal-resend {
    color: var(--anfa-fs-text);
    font-family: inherit;
}

/* RTL — keep phone row LTR for international number readability */
body.anfa-fs-host[dir="rtl"] .anfa-auth-unified .anfa-phone-wrap { direction: ltr; }

/* Small screens polish */
@media (max-width: 420px) {
    .anfa-fs-wrap { padding: 1rem 0.875rem; }
    .anfa-fs-card { padding: 1.25rem; border-radius: 1rem; }
    .anfa-fs-logo { width: 4.25rem; height: 4.25rem; }
    .anfa-fs-site-name { font-size: 1.125rem; }
}

/* Very narrow — keep the tabs readable */
@media (max-width: 360px) {
    body.anfa-fs-host .anfa-auth-method { font-size: 0.8125rem; padding: 0.5rem 0.5rem; }
}

/* ----------------------------------------------------------------
   Icons via data-anfa-icon (mask-image technique so each icon
   inherits its parent's text color via currentColor).
---------------------------------------------------------------- */
body.anfa-fs-host .anfa-auth-unified [data-anfa-icon]::before {
    content: '';
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    margin-inline-end: 0.4rem;
    background-color: currentColor;
    -webkit-mask-image: var(--anfa-icon-url);
    mask-image: var(--anfa-icon-url);
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: -0.15em;
}

/* Label icons: smaller and softer so they don't compete with the text */
body.anfa-fs-host .anfa-auth-unified label[data-anfa-icon]::before {
    width: 0.95em;
    height: 0.95em;
    opacity: 0.6;
    margin-inline-end: 0.375rem;
}

/* Button icons: a touch larger, fully opaque */
body.anfa-fs-host .anfa-auth-unified button[data-anfa-icon]::before {
    width: 1.05em;
    height: 1.05em;
    margin-inline-end: 0.5rem;
}

/* Icon definitions — each sets the --anfa-icon-url custom property that
   the ::before rule above picks up via var(). */
body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="mail"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
}

body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="phone"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="lock"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="user"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* RTL: "continue" reads right-to-left, so the arrow points left */
body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="arrow"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Cpath d='M19 12H5'/%3E%3Cpath d='m12 19-7-7 7-7'/%3E%3C/svg%3E");
}

body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="login"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' x2='3' y1='12' y2='12'/%3E%3C/svg%3E");
}

/* RTL: "back" points to the direction already read — right */
body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="back"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%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%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------
   Country-code combobox — custom searchable picker replacing the
   native <select>. Progressive enhancement: the hidden native select
   stays in the DOM as the source of truth.
---------------------------------------------------------------- */
body.anfa-fs-host .anfa-phone-cc.anfa-cc-native-hidden {
    display: none !important;
}

body.anfa-fs-host .anfa-auth-unified .anfa-phone-wrap > .anfa-cc-picker {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 136px;
}

body.anfa-fs-host .anfa-cc-picker {
    position: relative;
}

body.anfa-fs-host .anfa-cc-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    height: 2.625rem;
    padding: 0 0.5rem 0 0.625rem;
    border: 1px solid var(--anfa-fs-input-border);
    border-radius: var(--anfa-fs-radius);
    background: var(--anfa-fs-input-bg);
    color: var(--anfa-fs-input-text);
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.anfa-fs-host .anfa-cc-trigger:hover {
    border-color: #d1d5db;
}

body.anfa-fs-host .anfa-cc-trigger:focus-visible,
body.anfa-fs-host .anfa-cc-picker.is-open .anfa-cc-trigger {
    outline: none;
    border-color: var(--anfa-fs-input-border-focus);
    box-shadow: 0 0 0 3px var(--anfa-fs-ring);
}

body.anfa-fs-host .anfa-cc-flag {
    font-size: 1.1rem;
    line-height: 1;
    flex: 0 0 auto;
}

body.anfa-fs-host .anfa-cc-code {
    flex: 1 1 auto;
    font-weight: 500;
    color: var(--anfa-fs-text);
    text-align: left;
    white-space: nowrap;
}

body.anfa-fs-host .anfa-cc-chev {
    flex: 0 0 auto;
    width: 0.9rem;
    height: 0.9rem;
    margin-inline-start: 0.1rem;
    background-color: var(--anfa-fs-muted);
    -webkit-mask-image: url("data:image/svg+xml;utf8,%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%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml;utf8,%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%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: transform 0.18s ease;
}

body.anfa-fs-host .anfa-cc-picker.is-open .anfa-cc-chev {
    transform: rotate(180deg);
}

body.anfa-fs-host .anfa-cc-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    width: min(320px, calc(100vw - 2.5rem));
    background: #fff;
    border: 1px solid var(--anfa-fs-input-border);
    border-radius: var(--anfa-fs-radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 320px;
    animation: anfaCcFadeIn 0.14s ease-out both;
}

@keyframes anfaCcFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

body.anfa-fs-host .anfa-cc-search-wrap {
    padding: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

body.anfa-fs-host .anfa-cc-search {
    box-sizing: border-box;
    width: 100%;
    height: 2.25rem;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--anfa-fs-input-border);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--anfa-fs-text);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

body.anfa-fs-host .anfa-cc-search:focus {
    outline: none;
    border-color: var(--anfa-fs-input-border-focus);
    box-shadow: 0 0 0 3px var(--anfa-fs-ring);
}

body.anfa-fs-host .anfa-cc-list {
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    overflow-y: auto;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

body.anfa-fs-host .anfa-cc-list::-webkit-scrollbar {
    width: 10px;
}

body.anfa-fs-host .anfa-cc-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: 9999px;
}

body.anfa-fs-host .anfa-cc-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--anfa-fs-text);
    font-size: 0.875rem;
    line-height: 1.3;
    transition: background-color 0.1s ease;
}

body.anfa-fs-host .anfa-cc-item.is-hidden {
    display: none;
}

body.anfa-fs-host .anfa-cc-item.is-active {
    background: var(--anfa-fs-secondary);
}

body.anfa-fs-host .anfa-cc-item.is-selected {
    background: #eef2ff;
    color: #1e3a8a;
    font-weight: 500;
}

body.anfa-fs-host .anfa-cc-item.is-selected.is-active {
    background: #e0e7ff;
}

body.anfa-fs-host .anfa-cc-item-flag {
    font-size: 1.1rem;
    line-height: 1;
    flex: 0 0 auto;
}

body.anfa-fs-host .anfa-cc-item-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.anfa-fs-host .anfa-cc-item-code {
    flex: 0 0 auto;
    color: var(--anfa-fs-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

body.anfa-fs-host .anfa-cc-item.is-selected .anfa-cc-item-code {
    color: #3b82f6;
}

body.anfa-fs-host .anfa-cc-empty {
    padding: 1.25rem 0.75rem;
    text-align: center;
    color: var(--anfa-fs-muted);
    font-size: 0.875rem;
}

body.anfa-fs-host .anfa-auth-unified [data-anfa-icon="whatsapp"] {
    --anfa-icon-url: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12.04 2C6.58 2 2.13 6.45 2.13 11.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91 0-2.65-1.03-5.14-2.9-7.01A9.816 9.816 0 0 0 12.04 2m.01 1.67c2.2 0 4.26.86 5.82 2.42a8.225 8.225 0 0 1 2.41 5.83c0 4.54-3.7 8.23-8.24 8.23-1.48 0-2.93-.39-4.19-1.15l-.3-.17-3.12.82.83-3.04-.2-.32a8.188 8.188 0 0 1-1.26-4.38c.01-4.54 3.7-8.24 8.25-8.24M8.53 7.33c-.16 0-.43.06-.66.31-.22.25-.87.86-.87 2.07 0 1.22.89 2.39 1 2.56.14.17 1.76 2.67 4.25 3.73.59.27 1.05.42 1.41.53.59.19 1.13.16 1.56.1.48-.07 1.46-.6 1.67-1.18.21-.58.21-1.07.15-1.18-.07-.1-.23-.16-.48-.27-.25-.14-1.47-.74-1.69-.82-.23-.08-.37-.12-.56.12-.16.25-.64.81-.78.97-.15.17-.29.19-.53.07-.26-.13-1.06-.39-2-1.23-.74-.66-1.23-1.47-1.38-1.72-.12-.24-.01-.39.11-.5.11-.11.27-.29.37-.44.13-.14.17-.25.25-.41.08-.17.04-.31-.02-.43-.06-.11-.56-1.35-.77-1.84-.2-.48-.4-.42-.56-.43-.14 0-.3-.01-.47-.01'/%3E%3C/svg%3E");
}
