/* Media Corner — Arabic typography + RTL UI polish.
 * Target: Bootstrap 4 / twenty-one theme / Font Awesome 5 Pro.
 *
 * Two principles:
 *   1. Apply IBM Plex Sans Arabic only to text containers — NOT to icon elements.
 *   2. Manually flip Bootstrap LTR utilities on RTL pages since BS4 doesn't auto-mirror.
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ─── Logo sizing in navbar (matches mediacorner.om: h-11 desktop / h-10 mobile) ─ */

.navbar-brand .logo-img {
    height: 44px;
    width: auto;
    max-width: none;
    object-fit: contain;
}
@media (max-width: 767.98px) {
    .navbar-brand .logo-img { height: 40px; }
}

/* ─── Media Corner brand palette (verified from mediacorner.om CSS) ──────
 * Primary brand color is a purple-blue (#5646ef), not Tailwind blue.
 */

:root {
    --mc-primary:        #5646ef;  /* purple-blue — buttons, primary CTAs */
    --mc-primary-hover:  #4936d5;  /* darker hover */
    --mc-primary-light:  #6b62fa;  /* lighter variant */
    --mc-primary-dark:   #3c2dab;  /* deepest, for active states */
    --mc-primary-bg:     #f4f6ff;  /* very light tinted bg, used for highlights */
    --mc-primary-bg-2:   #edefff;  /* slightly darker tint */
    --mc-secondary:      #3b82f6;  /* blue-500 — secondary buttons / info */
    --mc-dark:           #0f172a;  /* slate-900 — footer, headings */
    --mc-dark-2:         #1e293b;  /* slate-800 */
    --mc-text:           #334155;  /* slate-700 */
    --mc-muted:          #94a3b8;  /* slate-400 */
    --mc-border:         #cbd5e1;  /* slate-300 */
    --mc-bg-light:       #f8fafc;  /* slate-50 */
    --mc-success:        #10b981;
    --mc-success-bg:     #e7fbf1;
    --mc-whatsapp:       #25d366;
}

/* Buttons */
.btn-primary,
.btn.btn-primary:not(:disabled):not(.disabled) {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn.btn-primary:not(:disabled):not(.disabled):hover,
.btn.btn-primary:not(:disabled):not(.disabled):focus,
.btn.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--mc-primary-hover) !important;
    border-color:     var(--mc-primary-hover) !important;
}
.btn-outline-primary {
    color:        var(--mc-primary) !important;
    border-color: var(--mc-primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
}
.btn-success { background-color: var(--mc-success); border-color: var(--mc-success); }
.btn-success:hover { background-color: #0e9e6f; border-color: #0e9e6f; }

/* Links */
a, a:link {
    color: var(--mc-primary);
}
a:hover {
    color: var(--mc-primary-hover);
}

/* Focus rings — rgba(86, 70, 239) matches --mc-primary */
.btn:focus, .form-control:focus, .custom-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(86, 70, 239, 0.25) !important;
    border-color: var(--mc-primary) !important;
}

/* Headings tint */
h1, h2, h3 { color: var(--mc-dark); }

/* Active nav / breadcrumb / pagination */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--mc-primary);
}
.page-item.active .page-link {
    background-color: var(--mc-primary);
    border-color:     var(--mc-primary);
}
.breadcrumb-item.active a { color: var(--mc-primary); }

/* Badges */
.badge-primary, .badge.badge-primary { background-color: var(--mc-primary); }
.badge-info, .badge.badge-info       { background-color: var(--mc-accent); }
.badge-success, .badge.badge-success { background-color: var(--mc-success); }

/* Alerts */
.alert-primary {
    color: var(--mc-primary-hover);
    background-color: rgba(86, 70, 239, 0.08);
    border-color: rgba(86, 70, 239, 0.18);
}
.alert-success {
    color: #065f46;
    background-color: var(--mc-success-bg);
    border-color: rgba(16, 185, 129, 0.2);
}

/* Cards on the cart — subtle accent on the recommended/active plan */
.product-name { color: var(--mc-dark); }
.product-pricing .price { color: var(--mc-primary); font-weight: 600; }

/* Top navbar tweaks if applicable */
.navbar.bg-primary { background-color: var(--mc-primary) !important; }

/* ─── Blanket primary-color overrides (theme uses #369 with !important) ─── */

.bg-primary,
.bg-primary > a { background-color: var(--mc-primary) !important; }

.text-primary { color: var(--mc-primary) !important; }
.text-primary:hover { color: var(--mc-primary-hover) !important; }

.border-primary { border-color: var(--mc-primary) !important; }

.btn-primary, .btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--mc-primary-hover) !important;
    border-color:     var(--mc-primary-hover) !important;
}
.btn-outline-primary,
.btn-outline-primary.disabled, .btn-outline-primary:disabled {
    color:        var(--mc-primary) !important;
    border-color: var(--mc-primary) !important;
    background-color: transparent !important;
}
.btn-outline-primary:hover {
    color: #fff !important;
    background-color: var(--mc-primary) !important;
}

a.text-primary:hover, a.text-primary:focus { color: var(--mc-primary-hover) !important; }

/* Success: theme defaults to #28a745 / #5cb85c — replace with brand-friendlier emerald */
.bg-success { background-color: var(--mc-success) !important; }
.text-success { color: var(--mc-success) !important; }
.border-success { border-color: var(--mc-success) !important; }
.btn-success, .btn-success:not(:disabled):not(.disabled).active,
.btn-success:not(:disabled):not(.disabled):active {
    background-color: var(--mc-success) !important;
    border-color:     var(--mc-success) !important;
}
.btn-success:hover, .btn-success:focus {
    background-color: #0e9e6f !important;
    border-color:     #0e9e6f !important;
}
.btn-outline-success {
    color:        var(--mc-success) !important;
    border-color: var(--mc-success) !important;
}

/* Info: theme uses #17a2b8 (teal) — align to secondary blue from brand */
.bg-info { background-color: var(--mc-secondary) !important; }
.text-info { color: var(--mc-secondary) !important; }
.btn-info, .btn-info:not(:disabled):not(.disabled).active,
.btn-info:not(:disabled):not(.disabled):active {
    background-color: var(--mc-secondary) !important;
    border-color:     var(--mc-secondary) !important;
}

/* Pagination active uses bg-primary path */
.page-item.active .page-link {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
}
.page-link { color: var(--mc-primary) !important; }
.page-link:hover { color: var(--mc-primary-hover) !important; }

/* Form check + radio: Bootstrap 4 uses bg-primary on checked state */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
}
.custom-radio .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--mc-primary) !important;
}

/* Order Now / cart CTA buttons typically btn-success — make them primary brand color */
.btn-order-now {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
    color: #fff !important;
}
.btn-order-now:hover {
    background-color: var(--mc-primary-hover) !important;
    border-color:     var(--mc-primary-hover) !important;
}

/* Active-tab / nav-pill default uses .active.bg-primary path */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
}

/* Cards highlighted as "popular" / "featured" sometimes use .border-primary */
.card.border-primary { border: 2px solid var(--mc-primary) !important; }
.card.border-primary .card-header { background-color: var(--mc-primary); color: #fff; }

/* ─── Domain Checker page (cart.php?a=add&domain=register) ─────────────── */

/* Hero search container — KEEP the original yellow gradient (per user preference) */
.domain-checker-container {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}
/* Keep the globe.png background */
@media (max-width: 991.98px) {
    .domain-checker-bg { padding: 36px 0 !important; }
}

/* Inside the yellow hero, the SEARCH button needs contrast — make it dark/black
 * instead of brand-purple, so it pops against yellow rather than vibrating with it. */
.domain-checker-container .btn-primary.domain-check-availability {
    background-color: var(--mc-dark) !important;
    border-color: var(--mc-dark) !important;
    color: #fff !important;
}
.domain-checker-container .btn-primary.domain-check-availability:hover,
.domain-checker-container .btn-primary.domain-check-availability:focus {
    background-color: var(--mc-dark-2) !important;
    border-color: var(--mc-dark-2) !important;
}

/* TLD category filter chips — were Bootstrap .badge-secondary (muted gray that
 * looked greenish next to surrounding elements). Make them brand-tinted pills. */
.tld-filters .badge-secondary,
.tld-filters a.badge {
    background-color: var(--mc-primary-bg) !important;
    color: var(--mc-primary) !important;
    border: 1px solid rgba(86, 70, 239, 0.18);
    padding: 0.45em 0.85em;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 999px;
    margin: 0 4px 6px 0;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.tld-filters .badge-secondary:hover,
.tld-filters a.badge:hover {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
    transform: translateY(-1px);
}
.tld-filters .badge-secondary.active,
.tld-filters a.badge.active {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
    border-color: var(--mc-primary) !important;
}
html[dir="rtl"] .tld-filters .badge { margin: 0 0 6px 4px; }
/* Inner white search box pill */
.domain-checker-container .input-group-box {
    background-color: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
    max-width: 720px;
    padding: 12px !important;
}
/* Result headline (e.g. "domain is available!") — improve color contrast */
#order-standard_cart .domain-checker-result-headline {
    font-size: 1.5em !important;
    font-weight: 600;
    margin: 24px 0 !important;
}
#order-standard_cart .domain-checker-available {
    color: var(--mc-success) !important;
}
#order-standard_cart .domain-checker-unavailable,
#order-standard_cart .domain-checker-invalid {
    color: #ef4444 !important;
}
/* Transfer-eligible callout — softer brand-tinted styling */
#order-standard_cart .transfer-eligible {
    background-color: var(--mc-success-bg) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    color: #065f46 !important;
    border-radius: 10px;
}
#order-standard_cart .transfer-not-eligible {
    background-color: var(--mc-bg-light) !important;
    border: 1px solid var(--mc-border) !important;
    color: var(--mc-text) !important;
    border-radius: 10px;
}
/* TLD pricing columns — header strip in brand color */
.domain-pricing .tld-pricing-header .tld-column {
    background-color: var(--mc-primary-bg) !important;
    color: var(--mc-primary-dark) !important;
    font-weight: 600;
    border: 1px solid rgba(86, 70, 239, 0.15);
}
.tld-column {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tld-column:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(86, 70, 239, 0.12);
}
/* Domain suggestion list items */
#order-standard_cart .domain-suggestion {
    border: 1px solid var(--mc-border) !important;
    border-radius: 8px !important;
    margin-bottom: 6px !important;
    transition: border-color 0.18s ease, background-color 0.18s ease;
}
#order-standard_cart .domain-suggestion:hover {
    border-color: var(--mc-primary) !important;
    background-color: var(--mc-primary-bg) !important;
}
.domain-suggestion .domain { font-weight: 600; color: var(--mc-dark); }
.domain-suggestion .domain-price {
    color: var(--mc-primary);
    font-weight: 600;
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}
/* Promo box / "best price" callout */
.domain-promo-box {
    border-radius: 10px;
    border: 1px solid var(--mc-border);
    background: linear-gradient(135deg, var(--mc-primary-bg) 0%, var(--mc-primary-bg-2) 100%);
    padding: 16px 20px !important;
}
/* Main check button — bigger and brand-coloured */
.domain-check-availability {
    width: auto !important;
    min-width: 120px;
    padding: 0.6rem 1.5rem !important;
    font-weight: 600 !important;
    background-color: var(--mc-primary) !important;
    border-color: var(--mc-primary) !important;
}
.domain-check-availability:hover {
    background-color: var(--mc-primary-hover) !important;
    border-color: var(--mc-primary-hover) !important;
}
/* The domain input itself — bigger, friendlier */
.domain-checker-container .input-group-box .form-control {
    font-size: 1.05rem;
    padding: 0.6rem 1rem;
    direction: ltr;
    text-align: left;
}
html[dir="rtl"] .domain-checker-container .input-group-box .form-control {
    text-align: right;  /* placeholder reads right-aligned in RTL */
}
html[dir="rtl"] .domain-checker-container .input-group-box .form-control:focus,
html[dir="rtl"] .domain-checker-container .input-group-box .form-control:not(:placeholder-shown) {
    /* but typed domain stays LTR (domains are always ASCII left-to-right) */
    direction: ltr;
    text-align: left;
}
/* IDN Language picker — long alphabetical list shouldn't crowd the layout */
#idnLanguage, select[name="idnlanguage"] {
    max-width: 280px;
}
/* "Add Hosting" / "Transfer Domain" headings under search box */
.domain-checker-container ~ * h3.font-size-22,
.domain-checker-container ~ * h3.font-size-24 {
    color: var(--mc-dark);
    font-weight: 600;
}

/* ─── Cart view page (cart.php?a=view) ─────────────────────────────────── */

/* The big green CHECKOUT button — make it brand primary, not green */
.btn-checkout,
.btn.btn-success.btn-checkout,
a.btn-success.btn-checkout {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
    color: #fff !important;
}
.btn-checkout:hover,
.btn-checkout:focus,
.btn.btn-success.btn-checkout:hover,
.btn.btn-success.btn-checkout:focus {
    background-color: var(--mc-primary-hover) !important;
    border-color:     var(--mc-primary-hover) !important;
}
.btn-checkout.disabled, .btn-checkout:disabled {
    background-color: var(--mc-primary-light) !important;
    border-color:     var(--mc-primary-light) !important;
    opacity: 0.6;
}

/* Continue shopping / promo / quantity buttons — keep neutral but with brand hover */
.btn-default {
    color: var(--mc-text) !important;
    background-color: #fff !important;
    border-color: var(--mc-border) !important;
}
.btn-default:hover, .btn-default:focus, .btn-default:active {
    color: var(--mc-primary) !important;
    background-color: var(--mc-primary-bg) !important;
    border-color: var(--mc-primary) !important;
}
.btn-continue-shopping {
    color: var(--mc-primary) !important;
}
.btn-continue-shopping:hover {
    color: var(--mc-primary-hover) !important;
}

/* Sidebar list group active state — was #666 gray, now brand */
.sidebar .list-group-item.active,
.sidebar .list-group-item.active:focus,
.sidebar .list-group-item.active:hover,
.list-group-item.active {
    background-color: var(--mc-primary) !important;
    border-color:     var(--mc-primary) !important;
    color: #fff !important;
}

/* Order summary / sidebar background — subtle brand-tinted card */
.order-summary, #orderSummary, .cart-sidebar, .panel-default {
    background-color: var(--mc-bg-light);
    border-color: var(--mc-border);
}

/* Promo code input row */
.promo-code-input .input-group-text { background-color: var(--mc-primary-bg); border-color: var(--mc-border); color: var(--mc-primary); }

/* Cart badge / item count in nav */
.cart-btn .badge, .nav-item .badge.badge-pill {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
}

/* Modal headers using bg-primary already covered by .bg-primary override */

/* Subtotal / total rows in order summary — let total stand out in brand */
.order-summary .total-row, .order-summary .grand-total,
#orderSummary .total-row, #orderSummary .grand-total,
.cart-totals .total {
    color: var(--mc-primary) !important;
    font-weight: 700;
}

/* ─── #order-standard_cart wholesale color sweep ──────────────────────── */
/* The order form CSS hardcodes navy #058, blue #4687FF, blue #3090e0, green #5cb85c.
 * Map all of them to the brand palette so the cart never shows non-brand colors. */

#order-standard_cart .sub-heading span,
#order-standard_cart .sub-heading-borderless span {
    color: var(--mc-primary) !important;
}

#order-standard_cart .panel-addon .panel-add,
#order-standard_cart .panel-addon-selected .panel-add {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
}

#order-standard_cart .domain-checker-available {
    color: var(--mc-success) !important;
}

#order-standard_cart .view-cart-items-header {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
}
#order-standard_cart .view-cart-items {
    border-bottom: 2px solid var(--mc-primary) !important;
}

#order-standard_cart .upgrades-block-active,
#order-standard_cart [style*="#4687FF"],
#order-standard_cart [style*="#3090e0"] {
    background-color: var(--mc-primary) !important;
    border-color: var(--mc-primary) !important;
    color: #fff !important;
}

/* Any element using the legacy blue/green via class — generic catch-all */
#order-standard_cart .text-blue,
#order-standard_cart .text-success { color: var(--mc-primary) !important; }
#order-standard_cart .bg-blue { background-color: var(--mc-primary) !important; }
#order-standard_cart a:not(.btn) { color: var(--mc-primary); }
#order-standard_cart a:not(.btn):hover { color: var(--mc-primary-hover); }

/* Selected radio/checkbox row in order forms */
#order-standard_cart .panel-addon.panel-addon-selected,
#order-standard_cart .panel-cycle.panel-cycle-selected,
#order-standard_cart .domain-options-selected {
    border-color: var(--mc-primary) !important;
    box-shadow: 0 0 0 2px rgba(86, 70, 239, 0.15);
}

/* "Recommended" / "Popular" ribbons that may use yellow/orange in the theme */
#order-standard_cart .recommended,
#order-standard_cart .popular,
#order-standard_cart .ribbon {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
}

/* ─── RTL fix for .prepend-icon form fields (checkout / billing forms) ───
 * The theme uses absolute-positioned icon labels with padding-left:36px on
 * the input. In RTL the icon naturally sits at the right edge (start of
 * inline flow) but the padding stays on the left, causing placeholder text
 * to overlap the icon. Flip both the padding and the icon's anchor. */

html[dir="rtl"] #order-standard_cart .prepend-icon .field,
html[dir="rtl"] .prepend-icon .field,
html[dir="rtl"] .form-group.prepend-icon .form-control {
    padding-left: 12px !important;
    padding-right: 42px !important;
}
html[dir="rtl"] #order-standard_cart .prepend-icon .field-icon,
html[dir="rtl"] .prepend-icon .field-icon,
html[dir="rtl"] .form-group.prepend-icon .field-icon {
    left: auto !important;
    right: 0 !important;
}

/* Same pattern for .append-icon (icon on the trailing edge) */
html[dir="rtl"] #order-standard_cart .append-icon .field,
html[dir="rtl"] .append-icon .field {
    padding-right: 12px !important;
    padding-left: 42px !important;
}
html[dir="rtl"] #order-standard_cart .append-icon .field-icon,
html[dir="rtl"] .append-icon .field-icon {
    right: auto !important;
    left: 0 !important;
}

/* Also handle the WHMCS .prepended-form-control / .appended-form-control pattern
 * (used in nav search and a few other places). */
html[dir="rtl"] .prepended-form-control {
    border-radius: 0 0.25rem 0.25rem 0 !important;
}
html[dir="rtl"] .appended-form-control {
    border-radius: 0.25rem 0 0 0.25rem !important;
}

/* ─── RTL: phone field with intl-tel-input flag ─────────────────────────
 * The flag-container auto-sits at right:0 in CSS. In RTL, my generic
 * .prepend-icon fix also forces the phone icon overlay to right:0, so the
 * flag and icon overlap. Fix by moving the flag to the LEFT in RTL and
 * leaving the phone icon on the right. */

html[dir="rtl"] .intl-tel-input .flag-container {
    right: auto !important;
    left: 0 !important;
}
html[dir="rtl"] .intl-tel-input .selected-flag {
    padding: 0 8px 0 0 !important;
}
html[dir="rtl"] .intl-tel-input .selected-flag .iti-arrow {
    right: auto !important;
    left: 6px !important;
}
/* Country dropdown list opens aligned to the flag (left in RTL) */
html[dir="rtl"] .intl-tel-input .country-list {
    text-align: right !important;
    left: 0 !important;
    right: auto !important;
}
/* Phone input — leave padding-left to intl-tel-input's own sdc-N rules
 * (it picks 52/66/74/76 etc based on dial-code digit count). We only need
 * to ensure padding-right is small so the phone-icon doesn't claim space
 * on the wrong side, and force LTR digit reading. */
html[dir="rtl"] .intl-tel-input input,
html[dir="rtl"] .intl-tel-input input[type="tel"],
html[dir="rtl"] .intl-tel-input input[type="text"] {
    padding-right: 12px !important;
    text-align: right;
    direction: ltr;          /* phone numbers should read LTR even on RTL page */
    unicode-bidi: embed;
}

/* Make the flag container wide enough for the +968 dial code on Oman.
 * Override the base 36px so even before JS adds .iti-sdc-3, the layout
 * has room for flag + dial code + arrow. */
html[dir="rtl"] .intl-tel-input .selected-flag,
.intl-tel-input.separate-dial-code .selected-flag {
    min-width: 70px !important;
    width: auto !important;
}
.intl-tel-input.separate-dial-code .selected-dial-code {
    padding-left: 6px;
    padding-right: 4px;
    font-size: 0.9rem;
}

/* When intl-tel-input wraps a .prepend-icon .field, the phone icon overlay
 * already gets right:0 padding-right:42px from earlier rule. That stays —
 * the flag now lives on the LEFT, so no collision. */

/* Generic blue/green safety net across order form */
#order-standard_cart .btn-primary,
#order-standard_cart .btn-success {
    background-color: var(--mc-primary) !important;
    border-color: var(--mc-primary) !important;
    color: #fff !important;
}

/* Empty cart message button — was navy #058 */
#order-standard_cart .empty-cart .btn {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
    border: 0 !important;
}
#order-standard_cart .empty-cart .btn:hover {
    background-color: var(--mc-primary-hover) !important;
}

/* Order summary card — was solid gray #666; replace with brand gradient header */
#order-standard_cart .order-summary {
    background-color: #fff !important;
    border: 1px solid var(--mc-border) !important;
    border-bottom: 3px solid var(--mc-primary) !important;
}
#order-standard_cart .order-summary h2 {
    background-color: var(--mc-primary) !important;
    color: #fff !important;
    border-radius: 4px 4px 0 0;
}
#order-standard_cart .order-summary .summary-totals {
    border-top-color: var(--mc-border) !important;
    border-bottom-color: var(--mc-border) !important;
}
#order-standard_cart .order-summary .product-name { color: var(--mc-dark); }

/* ─── RTL: mirror directional icons only ──────────────────────────────── */
/* Don't flip non-directional icons (check, search, gear, hamburger, brand logos). */

html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-arrow-circle-right,
html[dir="rtl"] .fa-arrow-circle-left,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-chevron-circle-right,
html[dir="rtl"] .fa-chevron-circle-left,
html[dir="rtl"] .fa-angle-right,
html[dir="rtl"] .fa-angle-left,
html[dir="rtl"] .fa-angle-double-right,
html[dir="rtl"] .fa-angle-double-left,
html[dir="rtl"] .fa-caret-right,
html[dir="rtl"] .fa-caret-left,
html[dir="rtl"] .fa-long-arrow-right,
html[dir="rtl"] .fa-long-arrow-left,
html[dir="rtl"] .fa-long-arrow-alt-right,
html[dir="rtl"] .fa-long-arrow-alt-left,
html[dir="rtl"] .fa-hand-point-right,
html[dir="rtl"] .fa-hand-point-left,
html[dir="rtl"] .fa-arrow-alt-circle-right,
html[dir="rtl"] .fa-arrow-alt-circle-left,
html[dir="rtl"] .fa-reply,
html[dir="rtl"] .fa-share,
html[dir="rtl"] .fa-share-square,
html[dir="rtl"] .fa-sign-out-alt,
html[dir="rtl"] .fa-sign-in-alt {
    transform: scaleX(-1);
    display: inline-block;
}

/* Pagination prev/next arrows */
html[dir="rtl"] .page-link[aria-label*="Previous"] i,
html[dir="rtl"] .page-link[aria-label*="Next"] i,
html[dir="rtl"] .carousel-control-prev-icon,
html[dir="rtl"] .carousel-control-next-icon {
    transform: scaleX(-1);
}



/* ─── Font: text only, scoped to RTL/Arabic ─────────────────────────────── */

html[dir="rtl"] body {
    font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.7;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Explicitly re-apply Plex to common text containers so component-specific
 * font-family resets don't fall back to Tahoma. Inheritance handles most. */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] p, html[dir="rtl"] a, html[dir="rtl"] li,
html[dir="rtl"] td, html[dir="rtl"] th, html[dir="rtl"] label,
html[dir="rtl"] .btn, html[dir="rtl"] .nav-link, html[dir="rtl"] .navbar-brand,
html[dir="rtl"] .card-title, html[dir="rtl"] .card-body,
html[dir="rtl"] .product-name, html[dir="rtl"] .product-desc {
    font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Preserve Font Awesome on every icon class — DO NOT override. */
html[dir="rtl"] .fa, html[dir="rtl"] .fas, html[dir="rtl"] .far,
html[dir="rtl"] .fal, html[dir="rtl"] .fad, html[dir="rtl"] .fab,
html[dir="rtl"] [class^="fa-"], html[dir="rtl"] [class*=" fa-"],
html[dir="rtl"] i[class*="fa-"] {
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "Font Awesome 6 Pro", "Font Awesome 6 Free" !important;
}
html[dir="rtl"] .fab, html[dir="rtl"] [class*=" fab"] {
    font-family: "Font Awesome 5 Brands", "Font Awesome 6 Brands" !important;
}

/* Tabular numerals on prices so OMR digits line up across rows */
html[dir="rtl"] .price, html[dir="rtl"] .product-pricing,
html[dir="rtl"] .currency-code, html[dir="rtl"] code {
    font-variant-numeric: tabular-nums;
}

/* ─── RTL UI flips for Bootstrap 4 utilities (BS4 isn't natively RTL) ─── */

/* Floats */
html[dir="rtl"] .float-left  { float: right !important; }
html[dir="rtl"] .float-right { float: left !important; }

/* Text alignment — only flip when the utility means "start"/"end" */
html[dir="rtl"] .text-left  { text-align: right !important; }
html[dir="rtl"] .text-right { text-align: left  !important; }

/* Margin utilities ml-* / mr-* */
html[dir="rtl"] .ml-1 { margin-left: 0 !important; margin-right: 0.25rem !important; }
html[dir="rtl"] .ml-2 { margin-left: 0 !important; margin-right: 0.5rem  !important; }
html[dir="rtl"] .ml-3 { margin-left: 0 !important; margin-right: 1rem    !important; }
html[dir="rtl"] .ml-4 { margin-left: 0 !important; margin-right: 1.5rem  !important; }
html[dir="rtl"] .ml-5 { margin-left: 0 !important; margin-right: 3rem    !important; }
html[dir="rtl"] .ml-auto { margin-left: 0 !important; margin-right: auto !important; }

html[dir="rtl"] .mr-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
html[dir="rtl"] .mr-2 { margin-right: 0 !important; margin-left: 0.5rem  !important; }
html[dir="rtl"] .mr-3 { margin-right: 0 !important; margin-left: 1rem    !important; }
html[dir="rtl"] .mr-4 { margin-right: 0 !important; margin-left: 1.5rem  !important; }
html[dir="rtl"] .mr-5 { margin-right: 0 !important; margin-left: 3rem    !important; }
html[dir="rtl"] .mr-auto { margin-right: 0 !important; margin-left: auto !important; }

/* Padding utilities pl-* / pr-* */
html[dir="rtl"] .pl-1 { padding-left: 0 !important; padding-right: 0.25rem !important; }
html[dir="rtl"] .pl-2 { padding-left: 0 !important; padding-right: 0.5rem  !important; }
html[dir="rtl"] .pl-3 { padding-left: 0 !important; padding-right: 1rem    !important; }
html[dir="rtl"] .pl-4 { padding-left: 0 !important; padding-right: 1.5rem  !important; }
html[dir="rtl"] .pl-5 { padding-left: 0 !important; padding-right: 3rem    !important; }

html[dir="rtl"] .pr-1 { padding-right: 0 !important; padding-left: 0.25rem !important; }
html[dir="rtl"] .pr-2 { padding-right: 0 !important; padding-left: 0.5rem  !important; }
html[dir="rtl"] .pr-3 { padding-right: 0 !important; padding-left: 1rem    !important; }
html[dir="rtl"] .pr-4 { padding-right: 0 !important; padding-left: 1.5rem  !important; }
html[dir="rtl"] .pr-5 { padding-right: 0 !important; padding-left: 3rem    !important; }

/* Dropdown menu alignment + caret position */
html[dir="rtl"] .dropdown-menu { right: 0; left: auto; text-align: right; }
html[dir="rtl"] .dropdown-menu-right { right: auto; left: 0; }
html[dir="rtl"] .dropdown-toggle::after { margin-left: 0; margin-right: 0.255em; }

/* Navbar items align right in RTL */
html[dir="rtl"] .navbar-nav { padding-right: 0; }
html[dir="rtl"] .navbar-brand { margin-right: 0; margin-left: 1rem; }

/* Form controls — input groups + checkboxes */
/* Reverse the flex order so prepend (icon) ends up on the right in RTL */
html[dir="rtl"] .input-group { flex-direction: row-reverse; }
html[dir="rtl"] .input-group > .form-control {
    border-radius: 0;
}
html[dir="rtl"] .input-group > .input-group-prepend > .input-group-text,
html[dir="rtl"] .input-group > .input-group-prepend > .btn {
    border-radius: 0 0.25rem 0.25rem 0;
    border-left: 0;
    border-right: 1px solid #ced4da;
}
html[dir="rtl"] .input-group > .input-group-append > .input-group-text,
html[dir="rtl"] .input-group > .input-group-append > .btn {
    border-radius: 0.25rem 0 0 0.25rem;
    border-right: 0;
    border-left: 1px solid #ced4da;
}
html[dir="rtl"] .input-group > .input-group-prepend > .input-group-text + .input-group-text,
html[dir="rtl"] .input-group > .input-group-append > .input-group-text + .input-group-text {
    border-radius: 0;
}
/* When ONLY prepend exists, the form-control gets left rounded corners */
html[dir="rtl"] .input-group > .input-group-prepend + .form-control,
html[dir="rtl"] .input-group > .input-group-prepend + .form-control + :not(.input-group-append) {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}
/* When append exists, form-control gets right rounded corners */
html[dir="rtl"] .input-group > .form-control:first-child,
html[dir="rtl"] .input-group > .input-group-append:last-child ~ .form-control {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* Custom checkbox/radio: indicator on the right side */
html[dir="rtl"] .custom-control { padding-left: 0; padding-right: 1.5rem; }
html[dir="rtl"] .custom-control-label::before,
html[dir="rtl"] .custom-control-label::after { left: auto; right: -1.5rem; }
html[dir="rtl"] .form-check { padding-left: 0; padding-right: 1.25rem; }
html[dir="rtl"] .form-check-input { margin-left: 0; margin-right: -1.25rem; }
html[dir="rtl"] .form-check-label { padding-right: 0.25rem; }

/* Breadcrumb separator direction */
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item { padding-right: 0.5rem; padding-left: 0; }
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { padding-left: 0.5rem; padding-right: 0; }

/* List icons / glyphs that hang on the wrong side */
html[dir="rtl"] ul.fa-ul, html[dir="rtl"] .list-unstyled .fa { margin-right: 0; margin-left: 0.5rem; }

/* Order summary table — keep numerics LTR even inside RTL container */
html[dir="rtl"] .price-amount, html[dir="rtl"] .invoice-total,
html[dir="rtl"] .product-pricing .price {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* Buttons with icons — icon should sit on the start side; flip ml-/mr- inside */
html[dir="rtl"] .btn .fa, html[dir="rtl"] .btn .fas,
html[dir="rtl"] .btn .far, html[dir="rtl"] .btn .fab {
    margin-left: 0.4em; margin-right: 0;
}

/* ─── Text alignment defaults for RTL ──────────────────────────────────── */

/* Body and common text containers default to right-aligned in RTL */
html[dir="rtl"] body { text-align: right; }

html[dir="rtl"] p, html[dir="rtl"] li, html[dir="rtl"] dd, html[dir="rtl"] dt,
html[dir="rtl"] caption, html[dir="rtl"] figcaption,
html[dir="rtl"] .lead, html[dir="rtl"] .small,
html[dir="rtl"] .alert, html[dir="rtl"] .form-text {
    text-align: right;
}

/* Headings: keep their alignment unless explicitly center/end utility */
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6 {
    text-align: right;
}

/* Cards and tiles */
html[dir="rtl"] .card-body, html[dir="rtl"] .card-text,
html[dir="rtl"] .card-title:not(.text-center):not(.text-left):not(.text-right) {
    text-align: right;
}

/* Tables — header + cell default */
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
html[dir="rtl"] .table th, html[dir="rtl"] .table td { text-align: right; }
html[dir="rtl"] thead th { text-align: right; }

/* Forms — labels, inputs, validation */
html[dir="rtl"] label, html[dir="rtl"] .col-form-label,
html[dir="rtl"] .form-check-label, html[dir="rtl"] .invalid-feedback,
html[dir="rtl"] .valid-feedback { text-align: right; }
html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select { text-align: right; }
html[dir="rtl"] input[type="number"], html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"], html[dir="rtl"] input[type="tel"] {
    text-align: left; direction: ltr;
}

/* Modals */
html[dir="rtl"] .modal-header, html[dir="rtl"] .modal-body,
html[dir="rtl"] .modal-footer { text-align: right; }
html[dir="rtl"] .modal-header .close { margin: -1rem auto -1rem -1rem; }

/* Lists — bullets/numbers belong on the right side in RTL */
html[dir="rtl"] ul, html[dir="rtl"] ol {
    padding-right: 2rem;
    padding-left: 0;
}
html[dir="rtl"] dl dd { margin-right: 0; margin-left: auto; }

/* Product description list (the <ul><li> we generated for product features) */
html[dir="rtl"] .product-desc ul, html[dir="rtl"] .product-desc ol,
html[dir="rtl"] #orderSummary ul, html[dir="rtl"] #orderSummary ol {
    padding-right: 1.5rem; padding-left: 0;
    text-align: right;
}
html[dir="rtl"] .product-desc li, html[dir="rtl"] #orderSummary li { text-align: right; }

/* Order summary / cart sidebar */
html[dir="rtl"] .order-summary, html[dir="rtl"] #orderSummary,
html[dir="rtl"] .order-summary *, html[dir="rtl"] .product-pricing-block { text-align: right; }
html[dir="rtl"] .order-summary .price,
html[dir="rtl"] #orderSummary .price { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* Sidebar / nav lists — links left-padded in LTR, right-padded in RTL */
html[dir="rtl"] .list-group, html[dir="rtl"] .list-group-item { text-align: right; }
html[dir="rtl"] .nav-pills .nav-link, html[dir="rtl"] .nav-tabs .nav-link { text-align: right; }

/* Footer — typically left-aligned brand text becomes right-aligned */
html[dir="rtl"] footer, html[dir="rtl"] .footer { text-align: right; }
html[dir="rtl"] .copyright { text-align: right; }

/* Badges with numbers — keep digits LTR */
html[dir="rtl"] .badge { direction: ltr; unicode-bidi: embed; }

/* Make sure utility .text-center stays centered */
html[dir="rtl"] .text-center { text-align: center !important; }

/* ─── Media Corner footer ──────────────────────────────────────────────── */

.mc-footer {
    background: linear-gradient(180deg, var(--mc-dark) 0%, #050912 100%);
    color: #cbd5e1;
    padding: 4rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 3px solid var(--mc-primary);
}

.mc-footer .mc-footer-heading {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
}

/* Footer logo — white badge so the dark-on-light brand logo is readable on
 * the dark footer background. */
.mc-footer .mc-footer-logo {
    display: inline-block;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mc-footer .mc-footer-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(86, 70, 239, 0.25);
}
.mc-footer .mc-footer-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.mc-footer .mc-footer-heading-sm {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mc-footer .mc-footer-tagline {
    color: #8b91a3;
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.mc-footer .mc-footer-links li {
    margin-bottom: 0.55rem;
}
.mc-footer .mc-footer-links a {
    color: #b6bbcb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.18s ease, padding-left 0.18s ease;
    display: inline-block;
}
.mc-footer .mc-footer-links a:hover {
    color: #ffffff;
    text-decoration: none;
}
html:not([dir="rtl"]) .mc-footer .mc-footer-links a:hover { padding-left: 4px; }
html[dir="rtl"] .mc-footer .mc-footer-links a:hover       { padding-right: 4px; }

.mc-footer .mc-footer-contact i {
    width: 16px;
    color: #6c7290;
}
.mc-footer .mc-footer-contact a { color: #b6bbcb; }

.mc-footer .mc-footer-social {
    margin-bottom: 0;
}
.mc-footer .mc-footer-social .list-inline-item a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #b6bbcb;
    margin-right: 0.4rem;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.mc-footer .mc-footer-social .list-inline-item a:hover {
    background: var(--mc-primary);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

.mc-footer .mc-footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 2.5rem 0 1.5rem;
}

.mc-footer .copyright {
    color: #6c7290;
    font-size: 0.85rem;
    margin: 0;
}
.mc-footer .mc-footer-meta {
    color: #6c7290;
    font-size: 0.8rem;
}

.mc-footer .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.18);
    color: #b6bbcb;
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
}
.mc-footer .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* RTL footer adjustments */
html[dir="rtl"] .mc-footer .mc-footer-contact i { margin-right: 0 !important; margin-left: 0.5rem; }
html[dir="rtl"] .mc-footer .mc-footer-social .list-inline-item a { margin-right: 0; margin-left: 0.4rem; }
html[dir="rtl"] .mc-footer .text-md-right { text-align: left !important; }

/* Responsive — center columns on mobile */
@media (max-width: 767.98px) {
    .mc-footer-grid > [class*="col-"] { text-align: center; }
    .mc-footer .mc-footer-heading-sm { border-bottom: none; padding-bottom: 0; }
    .mc-footer .mc-footer-social { justify-content: center; display: flex; }
    .mc-footer .mc-footer-payments { justify-content: center; }
}

/* Footer payment-methods row */
.mc-footer-payments-row { padding-top: 0.5rem; }
.mc-footer-payments {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 10px;
}
/* Belt-and-suspenders for environments that ignore gap on flex (older Safari).
 * Without explicit margins, the icons would visually butt against each other. */
.mc-footer-payments > * { margin-right: 0; }
html[dir="rtl"] .mc-footer-payments > * { margin-left: 0; }
.mc-footer-payments-label {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-right: 4px;
}
html[dir="rtl"] .mc-footer-payments-label { margin-right: 0; margin-left: 4px; }
.mc-payment-icon {
    height: 24px;
    width: auto;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
    object-fit: contain;
    transition: transform 0.18s ease;
}
.mc-payment-icon:hover { transform: translateY(-1px); }
.mc-payment-icon-text {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 4px 8px;
    background: #fff;
    border-radius: 4px;
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ─── Checkout: payment method radio cards ───────────────────────────── */

.mc-gateway-option {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 6px 4px !important;
    border: 1px solid var(--mc-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    min-width: 180px;
}
.mc-gateway-option:hover {
    border-color: var(--mc-primary-light);
    box-shadow: 0 2px 8px rgba(86, 70, 239, 0.12);
}
.mc-gateway-option input[type="radio"] {
    margin: 0 4px 0 0 !important;
    accent-color: var(--mc-primary);
}
html[dir="rtl"] .mc-gateway-option input[type="radio"] {
    margin: 0 0 0 4px !important;
}
/* Checked state — highlighted with brand color */
.mc-gateway-option input[type="radio"]:checked ~ .mc-gateway-name,
.mc-gateway-option:has(input[type="radio"]:checked) {
    border-color: var(--mc-primary) !important;
    background: var(--mc-primary-bg);
    box-shadow: 0 0 0 1px var(--mc-primary);
}

/* Thawani logo on the left */
.mc-gateway-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.mc-gateway-logo img.mc-gw-thawani {
    height: 22px;
    width: auto;
    object-fit: contain;
}

/* Bank icon variant */
.mc-gateway-logo-icon {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    background: var(--mc-primary-bg);
    color: var(--mc-primary);
    justify-content: center;
    font-size: 16px;
}

/* Gateway display name */
.mc-gateway-name {
    font-weight: 500;
    color: var(--mc-dark);
    font-size: 0.92rem;
    line-height: 1.2;
}

/* Card brand icons (Visa, MasterCard) shown after Thawani name */
.mc-gateway-cards {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding-left: 8px;
    border-left: 1px solid #e5e7eb;
}
html[dir="rtl"] .mc-gateway-cards {
    margin-left: 0;
    margin-right: auto;
    padding-left: 0;
    padding-right: 8px;
    border-left: 0;
    border-right: 1px solid #e5e7eb;
}
.mc-gateway-cards img {
    height: 18px;
    width: auto;
    opacity: 0.85;
}

/* Mobile: stack gateway cards full-width */
@media (max-width: 575.98px) {
    .mc-gateway-option {
        display: flex !important;
        width: 100%;
        margin: 6px 0 !important;
    }
}

/* ─────────────────── Client area dashboard polish (Arabic/RTL) ─── */

/* 1. Dashboard tiles: keep icon on the side, large stat next to it. */
html[dir="rtl"] .tiles .tile {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    text-align: right;
    min-height: 110px;
    position: relative;
}
html[dir="rtl"] .tiles .tile > i {
    font-size: 2.4rem;
    color: #5646ef;
    flex-shrink: 0;
    margin: 0 0 0 6px;
    line-height: 1;
}
html[dir="rtl"] .tiles .tile .stat {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
    margin: 0;
    order: 0;
}
html[dir="rtl"] .tiles .tile .title {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
    flex: 1;
    order: 1;
}
html[dir="rtl"] .tiles .tile .highlight {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
}
html[dir="rtl"] .tiles .tile:hover {
    background: #f8fafc;
    text-decoration: none;
}

/* Wrap stat + title in a column on the right of the icon */
html[dir="rtl"] .tiles .tile .stat,
html[dir="rtl"] .tiles .tile .title { display: block; }
html[dir="rtl"] .tiles .tile {
    align-items: center;
}
html[dir="rtl"] .tiles .tile::after {
    content: "";
    display: none;
}

/* 2. Register-domain widget — proper RTL flow.
   Bootstrap's input-group keeps prepend on the visual-left in LTR; in RTL
   we want the SLD input on the visual-right and the TLD select + button
   on the left, with proper border-radii and no double-borders. */
html[dir="rtl"] .input-group.domain-search,
html[dir="rtl"] form[action*="domainchecker"] .input-group {
    direction: rtl;
    flex-direction: row;
}
html[dir="rtl"] form[action*="domainchecker"] .input-group .form-control,
html[dir="rtl"] form[action*="domainchecker"] input[name="sld"],
html[dir="rtl"] form[action*="domainchecker"] input[type="text"] {
    text-align: right;
    border-radius: 0 8px 8px 0 !important;
    border-left: 0;
    border-right: 1px solid #e2e8f0;
}
html[dir="rtl"] form[action*="domainchecker"] select,
html[dir="rtl"] form[action*="domainchecker"] .input-group-prepend select {
    border-radius: 0 !important;
    text-align: center;
    min-width: 96px;
}
html[dir="rtl"] form[action*="domainchecker"] button[type="submit"],
html[dir="rtl"] form[action*="domainchecker"] .input-group-append button {
    border-radius: 8px 0 0 8px !important;
    background: #5646ef;
    color: #fff;
    border-color: #5646ef;
    padding: 0 18px;
    font-weight: 600;
}
html[dir="rtl"] form[action*="domainchecker"] button[type="submit"]:hover {
    background: #4936d5;
    border-color: #4936d5;
}

/* Also flip a generic .domain-search container so button appears on the LEFT in RTL */
html[dir="rtl"] .domain-search,
html[dir="rtl"] .panel-domainregister {
    direction: rtl;
}

/* Tile icon → top-LEFT corner explicitly (override prior flex layout) */
html[dir="rtl"] .tiles .tile {
    display: block !important;
    position: relative;
    padding: 20px 22px;
    min-height: 110px;
    text-align: right;
}
html[dir="rtl"] .tiles .tile > i {
    position: absolute;
    top: 16px;
    left: 18px;
    right: auto;
    font-size: 1.9rem;
    color: #5646ef;
    margin: 0;
}
html[dir="rtl"] .tiles .tile .stat {
    margin-top: 0;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
}
html[dir="rtl"] .tiles .tile .title {
    margin-top: 6px;
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

/* Gap between dashboard tiles (no-gutters row → add our own spacing) */
.tiles .row.no-gutters { margin: 0 -8px; }
.tiles .row.no-gutters > [class*="col-"] { padding: 0 8px; margin-bottom: 16px; }
.tiles .tile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tiles .tile:hover {
    box-shadow: 0 6px 16px rgba(15,23,42,0.08);
    transform: translateY(-2px);
}

/* ─────────────────── Invoice page — full RTL ─── */
html[dir="rtl"] #invoiceContent,
html[dir="rtl"] .invoice-page,
html[dir="rtl"] body.invoice {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] #invoiceContent table,
html[dir="rtl"] .invoice-page table {
    direction: rtl;
}
html[dir="rtl"] #invoiceContent table th,
html[dir="rtl"] #invoiceContent table td,
html[dir="rtl"] .invoice-page table th,
html[dir="rtl"] .invoice-page table td {
    text-align: right;
}
html[dir="rtl"] #invoiceContent table th.text-right,
html[dir="rtl"] #invoiceContent table td.text-right,
html[dir="rtl"] .invoice-page .text-right {
    text-align: left !important;  /* amount columns go to the visual-left edge in RTL */
}
html[dir="rtl"] #invoiceContent table th.text-center,
html[dir="rtl"] #invoiceContent table td.text-center {
    text-align: center;
}
/* Header rows */
html[dir="rtl"] .invoice-header,
html[dir="rtl"] .invoice-summary,
html[dir="rtl"] .invoice-billing-info {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .invoice-paid,
html[dir="rtl"] .invoice-status,
html[dir="rtl"] .invoice-total {
    direction: rtl;
}
/* Fix the address block which is naturally LTR-formatted */
html[dir="rtl"] .invoice-billto address,
html[dir="rtl"] address {
    direction: rtl;
    text-align: right;
}
/* "رقم الفاتورة" + number: add space between Arabic label and Latin number */
html[dir="rtl"] .invoice-number,
html[dir="rtl"] h1.invoice-id,
html[dir="rtl"] .invoice-title {
    direction: rtl;
    unicode-bidi: plaintext;
}
html[dir="rtl"] .invoice-title bdi,
html[dir="rtl"] .invoice-title span,
html[dir="rtl"] .invoice-number span { margin-inline-start: 6px; }

/* Currency code (OMR/USD) renders right-side of number — keep that */
html[dir="rtl"] .currency-amount { unicode-bidi: plaintext; }

/* Payment/Transaction table */
html[dir="rtl"] .invoice-transactions thead th { text-align: right; }
html[dir="rtl"] .invoice-transactions thead th:last-child,
html[dir="rtl"] .invoice-transactions tbody td:last-child { text-align: left; }

/* ─────────────────── Invoice page — full RTL (override) ─── */
html[dir="rtl"] .invoice-container,
html[dir="rtl"] .invoice-container * {
    direction: rtl;
}
html[dir="rtl"] .invoice-container {
    text-align: right;
}
/* Override Bootstrap LTR utilities used in the tpl */
html[dir="rtl"] .invoice-container .text-sm-left,
html[dir="rtl"] .invoice-container .text-left {
    text-align: right !important;
}
html[dir="rtl"] .invoice-container .text-sm-right,
html[dir="rtl"] .invoice-container .text-right {
    text-align: left !important;
}
html[dir="rtl"] .invoice-container .float-sm-right { float: left !important; }
html[dir="rtl"] .invoice-container .float-sm-left  { float: right !important; }
html[dir="rtl"] .invoice-container .order-sm-last  { order: 13; }
html[dir="rtl"] .invoice-container .order-sm-first { order: -1; }

/* Tables — header/cell alignment + amount column to LEFT edge */
html[dir="rtl"] .invoice-container table { text-align: right; }
html[dir="rtl"] .invoice-container table th,
html[dir="rtl"] .invoice-container table td { text-align: right; }
html[dir="rtl"] .invoice-container table th:last-child,
html[dir="rtl"] .invoice-container table td:last-child { text-align: left; }

/* Status pill + amounts */
html[dir="rtl"] .invoice-status { text-align: center; }
html[dir="rtl"] .invoice-container address {
    text-align: right;
    direction: rtl;
    font-style: normal;
}

/* The "رقم الفاتورة5" sticking-together: ensure space + LTR for number */
html[dir="rtl"] .invoice-container h1,
html[dir="rtl"] .invoice-container h2,
html[dir="rtl"] .invoice-container h3 {
    text-align: right;
    direction: rtl;
    unicode-bidi: plaintext;
}

/* Payment button container */
html[dir="rtl"] .payment-btn-container { text-align: center; direction: rtl; }

/* Invoice items table totals: keep amount cells on the visual-left so they line up */
html[dir="rtl"] .invoice-container .table > tbody > tr > td:last-child,
html[dir="rtl"] .invoice-container .table > tfoot > tr > td:last-child {
    text-align: left;
    direction: ltr;
}

/* cache-bust 1778668104 */
