/*
 * AUDIT-VERIFIED: Phase 6.6.3 (commit 064cd124)
 * Population: global RTL layout adjustments (loaded for Arabic locale)
 * Sub-disposition: partial-keep
 *   Active-keep: `body { text-align: right; }`, `#phone-icon { ... }`, etc.
 *     RTL layout primitives, no facade.
 *   Bootstrap-facade sub-section (Shape 10):
 *     Caller-migration thread: Phase 6.6.3b scope-doc-light (pending direction-lock).
 *     Facade rule: `.breadcrumb-item + .breadcrumb-item::before` (line below).
 *     RTL adjustment for Bootstrap-style breadcrumb separators. Coupled to
 *     `ol.breadcrumb` facade in application.tailwind.css; both retire together
 *     when callers migrate breadcrumb markup to project-native conventions.
 * Do not auto-migrate the breadcrumb sub-section without revising Shape 10
 * disposition.
 * Future audits: grep for `AUDIT-VERIFIED:` to skip already-verified files.
 *
 * 2026-09-10 — every rule is scoped to :where([dir="rtl"]).
 * The server only links this file for Arabic, but a locale switch is a Turbo
 * visit and Turbo removes a stylesheet from the head only when it carries
 * data-turbo-track="dynamic" — which this one deliberately does not, because
 * tracking it would turn every locale switch into a full reload (see the
 * TRACKED SET note in layouts/application/_head.html.erb). So after ar → en
 * the file is still loaded, and `body { text-align: right }` was right-aligning
 * English pages. Scoping makes a lingering link inert instead of harmful.
 * :where() so the scope costs no specificity and the cascade is unchanged for
 * Arabic.
 */

:where([dir="rtl"]) body {
  text-align: right;
}

:where([dir="rtl"]) .breadcrumb-item + .breadcrumb-item::before {
  padding-left: 0.5rem;
}

:where([dir="rtl"]) #phone-icon {
  margin-right: -4px;
}

@media (max-width: 575.98px) {
  :where([dir="rtl"]) #nav-logo {
    position: relative;
    left: -15px;
  }
}

:where([dir="rtl"]) #logo {
  right: unset;
  left: 10px;
}

:where([dir="rtl"]) a#profile-edit-link {
  left: unset;
  right: 1em;
}

:where([dir="rtl"]) .new-item-actions {
  text-align: left;
}

/* Phase 6.5.3d — `h1.headline` rule dropped. JOOD-Gourmet decorative
   carryover (gold-accent border `rgb(205, 86, 49)`); BRAND.md silent
   on h1 borders/accents and zero views apply `class="headline"`.
   Dead CSS targeting a class that no element uses. */

/* Profile Orders Cards */
@media (min-width: 500px) {
  :where([dir="rtl"]) #profile-orders .card:not(:last-child) {
    margin-left: 20px;
  }
}

@media (min-width: 700px) {
  :where([dir="rtl"]) #profile-orders .card:not(:last-child) {
    margin-left: 30px;
  }
}

@media (min-width: 1100px) {
  :where([dir="rtl"]) #profile-orders .card:not(:last-child) {
    margin-left: 40px;
  }
}

:where([dir="rtl"]) input#customer_email,
:where([dir="rtl"]) input#customer_password,
:where([dir="rtl"]) input#employee_username,
:where([dir="rtl"]) input#employee_password {
  direction: ltr;
}

:where([dir="rtl"]) input#customer_email::placeholder,
:where([dir="rtl"]) input#customer_password::placeholder,
:where([dir="rtl"]) input#employee_username::placeholder,
:where([dir="rtl"]) input#employee_password::placeholder {
  text-align: right;
}
