/* Cycle 4 — Shared Foundations
 * Dark-mode contrast overrides + RTL currency wrapper utility.
 * Consumed by Agents B/C/D1/D2; foundations only — no consumer styling here.
 *
 * Findings addressed (foundations):
 *   F-004 — footer dark contrast
 *   F-006 — dark product-card link contrast (Agent B applies)
 *   F-019 — dark form-control border
 *   F-020 — dark placeholder dimness
 *   F-010, F-021 — RTL currency wrapper utility (Agent D1 applies)
 */

/* WCAG AA needs >= 4.5:1 for muted text on the dark surface. AYP-05:
 * --wasla-muted (#98A3B5) on --wasla-surface (#1B2A47) ~= 5.6:1. */
[data-bs-theme="dark"] .text-muted {
    color: var(--wasla-muted);
}

[data-bs-theme="dark"] .storefront-footer,
[data-bs-theme="dark"] .storefront-footer a,
[data-bs-theme="dark"] .storefront-footer p,
[data-bs-theme="dark"] .storefront-footer small,
[data-bs-theme="dark"] .storefront-footer .text-muted {
    color: var(--wasla-muted);
}

[data-bs-theme="dark"] .storefront-footer a:hover {
    color: var(--wasla-muted);
}

/* Form-control dark border — softer than near-white, matches surrounding
 * card border tone instead of clashing against the dark surface. */
[data-bs-theme="dark"] .form-control {
    border-color: var(--wasla-line);
}

/* Brighten placeholder dimness (was zinc-600 ≈ 3.0:1; lifted to zinc-500
 * ≈ 4.6:1 on the dark form-control background). */
[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--wasla-muted, #7C879B); /* align to the dark muted token (was hardcoded #71717a) */
    opacity: 1;
}

/* RTL currency wrapper — used by {% currency_amount value unit %} tag
 * to bidi-isolate LTR numeric inside RTL flow. */
.cycle4-rtl-currency {
    display: inline-flex;
    direction: ltr;
    unicode-bidi: isolate;
    gap: 0.25rem;
    align-items: baseline;
}
