/* static/css/rtl.css */

/* ============================================
   RTL Mirror - Flips all directional properties
   ============================================ */

/* Text alignment */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .text-start { text-align: right !important; }
.rtl .text-end { text-align: left !important; }

/* Float directions */
.rtl .float-start { float: right !important; }
.rtl .float-end { float: left !important; }

/* Margins - Bootstrap 5 */
.rtl .ms-0 { margin-right: 0 !important; margin-left: 0 !important; }
.rtl .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
.rtl .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
.rtl .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
.rtl .ms-4 { margin-right: 1.5rem !important; margin-left: 0 !important; }
.rtl .ms-5 { margin-right: 3rem !important; margin-left: 0 !important; }
.rtl .ms-auto { margin-right: auto !important; margin-left: 0 !important; }

.rtl .me-0 { margin-left: 0 !important; margin-right: 0 !important; }
.rtl .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
.rtl .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
.rtl .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
.rtl .me-4 { margin-left: 1.5rem !important; margin-right: 0 !important; }
.rtl .me-5 { margin-left: 3rem !important; margin-right: 0 !important; }
.rtl .me-auto { margin-left: auto !important; margin-right: 0 !important; }

/* Paddings - Bootstrap 5 */
.rtl .ps-0 { padding-right: 0 !important; padding-left: 0 !important; }
.rtl .ps-1 { padding-right: 0.25rem !important; padding-left: 0 !important; }
.rtl .ps-2 { padding-right: 0.5rem !important; padding-left: 0 !important; }
.rtl .ps-3 { padding-right: 1rem !important; padding-left: 0 !important; }
.rtl .ps-4 { padding-right: 1.5rem !important; padding-left: 0 !important; }
.rtl .ps-5 { padding-right: 3rem !important; padding-left: 0 !important; }

.rtl .pe-0 { padding-left: 0 !important; padding-right: 0 !important; }
.rtl .pe-1 { padding-left: 0.25rem !important; padding-right: 0 !important; }
.rtl .pe-2 { padding-left: 0.5rem !important; padding-right: 0 !important; }
.rtl .pe-3 { padding-left: 1rem !important; padding-right: 0 !important; }
.rtl .pe-4 { padding-left: 1.5rem !important; padding-right: 0 !important; }
.rtl .pe-5 { padding-left: 3rem !important; padding-right: 0 !important; }

/* Bootstrap Icons mirroring -- same rule as core/css/l10n.css (glyph only, never the <i>;
   .rtl-flip opts other icons in, .no-rtl-flip opts out). Kept here for pages without l10n.css. */
.rtl :is(
    .bi-arrow-left, .bi-arrow-right, .bi-arrow-left-short, .bi-arrow-right-short,
    .bi-arrow-left-circle, .bi-arrow-right-circle, .bi-arrow-left-circle-fill, .bi-arrow-right-circle-fill,
    .bi-arrow-left-square, .bi-arrow-right-square, .bi-arrow-left-square-fill, .bi-arrow-right-square-fill,
    .bi-arrow-bar-left, .bi-arrow-bar-right,
    .bi-chevron-left, .bi-chevron-right, .bi-chevron-double-left, .bi-chevron-double-right,
    .bi-chevron-compact-left, .bi-chevron-compact-right,
    .bi-caret-left, .bi-caret-right, .bi-caret-left-fill, .bi-caret-right-fill,
    .bi-box-arrow-left, .bi-box-arrow-right, .bi-box-arrow-in-left, .bi-box-arrow-in-right,
    .bi.rtl-flip
):not(.no-rtl-flip)::before { transform: scaleX(-1); }

/* Dropdown menus */
.rtl .dropdown-menu {
    text-align: right;
}

.rtl .dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}

.rtl .dropdown-menu-start {
    right: 0 !important;
    left: auto !important;
}

/* Border radius mirroring */
.rtl .rounded-start {
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

.rtl .rounded-end {
    border-radius: 0.375rem 0 0 0.375rem !important;
}

/* Form elements */
.rtl .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

.rtl .form-check .form-check-input {
    float: right;
    margin-right: -1.5em;
    margin-left: 0;
}

/* Flexbox direction */
.rtl .flex-row {
    flex-direction: row-reverse !important;
}

.rtl .flex-row-reverse {
    flex-direction: row !important;
}

/* Positioning */
.rtl .start-0 { left: auto !important; right: 0 !important; }
.rtl .start-50 { left: auto !important; right: 50% !important; }
.rtl .start-100 { left: auto !important; right: 100% !important; }
.rtl .end-0 { left: 0 !important; right: auto !important; }
.rtl .end-50 { left: 50% !important; right: auto !important; }
.rtl .end-100 { left: 100% !important; right: auto !important; }

.rtl .translate-middle {
    transform: translate(50%, -50%) !important;
}

.rtl .translate-middle-x {
    transform: translateX(50%) !important;
}

.rtl .translate-middle-y {
    transform: translateY(-50%) !important;
}

/* Breadcrumbs */
.rtl .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
    content: var(--bs-breadcrumb-divider, "/");
}

/* List groups */
.rtl .list-group {
    padding-right: 0;
}

/* Input groups */
.rtl .input-group > :not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.rtl .input-group > :not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}


/* Flip background gradient directions */
.rtl .hero-bg {
    background: linear-gradient(-90deg, rgba(0, 2, 7, 0.6) 30%, rgba(45, 96, 255, 0.15) 60%),
    url('/static/images/backgrounds/hands-scanning.jpg') no-repeat center center !important;
    background-size: cover !important;
}

.rtl .solution-bg {
    background: linear-gradient(-90deg, rgba(0, 2, 7, 0.75) 30%, rgba(7, 0, 0, 0.18) 50%),
    url('/static/images/backgrounds/bg-woman.jpg') no-repeat center center !important;
    background-size: cover !important;
}

.rtl .cta-bg {
    background: linear-gradient(-90deg, rgba(0, 2, 7, 0.75) 30%, rgba(7, 0, 0, 0.75) 100%),
    url('/static/images/backgrounds/high-angle-woman-scanning.jpg') no-repeat center center !important;
    background-size: cover !important;
}

/* Values that are always written left-to-right - links, e-mail addresses, phone numbers - stay LTR
   on RTL pages (value AND placeholder) without each form having to add .ltr-input: "https://..."
   used to show as "...//:https" and "+1 234 567" as "567 234 1+". Covers the input types and the
   usual field names of text inputs that hold such values (phone, mobile, fax, whatsapp, e-mail, links). */
[dir="rtl"] input:is(
    [type="url"], [type="email"], [type="tel"],
    [inputmode="url"], [inputmode="email"], [inputmode="tel"],
    [type="text"][name$="url"], [type="text"][name$="_link"],
    [type="text"][name*="email"], [type="text"][name*="website"],
    [type="text"][name*="phone"], [type="text"][name*="mobile"],
    [type="text"][name*="whatsapp"], [type="text"][name*="fax"],
    [type="text"][name$="tel"], [type="text"][name*="cellphone"]
),
[dir="rtl"] input:is(
    [type="url"], [type="email"], [type="tel"],
    [inputmode="url"], [inputmode="email"], [inputmode="tel"],
    [type="text"][name$="url"], [type="text"][name$="_link"],
    [type="text"][name*="email"], [type="text"][name*="website"],
    [type="text"][name*="phone"], [type="text"][name*="mobile"],
    [type="text"][name*="whatsapp"], [type="text"][name*="fax"],
    [type="text"][name$="tel"], [type="text"][name*="cellphone"]
)::placeholder {
    direction: ltr !important;
    text-align: left !important;
}
