/*
 * EbdaaHost client template — brand layer on top of Blesta's bootstrap template (Bootstrap 4.6).
 * Tokens, fonts and component looks match ebdaahost.com (src/styles/global.css, Header.astro, Footer.astro).
 * Loaded after application(.rtl).min.css and the Look-and-Feel theme CSS; Settings > Look and Feel >
 * Custom CSS still loads after this file.
 * Direction: written with logical properties (margin-inline, inset-inline …) so one file serves LTR and RTL;
 * Bootstrap's own physical utilities are mirrored by application.rtl.min.css.
 */

/* ---------- Fonts (self-hosted, from @fontsource; OFL 1.1, see fonts/LICENSE-*) ---------- */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-arabic-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ibm-plex-sans-arabic-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter Variable';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (same values as the website) ---------- */
:root {
    --c-ink: #0f172a;
    --c-ink-2: #334155;
    --c-muted: #475569;
    --c-primary: #1d4ed8;
    --c-primary-hover: #1e40af;
    --c-primary-soft: #eff4ff;
    --c-accent: #0f766e;
    --c-accent-soft: #e6f6f4;
    --c-navy: #0b1b3f;
    --c-navy-2: #12285a;
    --c-on-navy: #e2e8f0;
    --c-on-navy-muted: #b8c4d9;
    --c-bg: #ffffff;
    --c-surface: #f6f8fb;
    --c-border: #dbe2ec;
    --c-focus: #f59e0b;
    --radius-s: 8px;
    --radius: 14px;
    --shadow-s: 0 1px 2px rgb(15 23 42 / 0.06), 0 1px 3px rgb(15 23 42 / 0.06);
    --shadow: 0 8px 24px -12px rgb(15 23 42 / 0.18), 0 2px 6px rgb(15 23 42 / 0.05);
    --font-ar: 'IBM Plex Sans Arabic', system-ui, 'Segoe UI', Tahoma, sans-serif;
    --font-en: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.eh {
    background: var(--c-surface);
    color: var(--c-ink);
    font-family: var(--font-en);
    font-size: 0.9375rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
html[lang='ar'] body.eh { font-family: var(--font-ar); font-size: 1rem; line-height: 1.75; }
body.eh .tooltip, body.eh .popover, body.eh .dropdown-menu, body.eh .modal, body.eh .btn,
body.eh input, body.eh select, body.eh textarea, body.eh button { font-family: inherit; }
html[lang='ar'] body.eh .tooltip, html[lang='ar'] body.eh .popover { font-family: var(--font-ar); }
body.eh h1, body.eh h2, body.eh h3, body.eh h4, body.eh h5, body.eh h6 { color: var(--c-ink); font-weight: 700; line-height: 1.3; }
html[lang='ar'] body.eh :is(h1, h2, h3, h4, h5, h6) { line-height: 1.5; letter-spacing: 0; }
body.eh a { color: var(--c-primary); text-underline-offset: 0.2em; }
body.eh a:hover { color: var(--c-primary-hover); }
body.eh :focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
body.eh code, body.eh pre, body.eh kbd { font-family: var(--font-mono); }
.eh-main { flex: 1 0 auto; padding-block: 24px 48px; }

/* Text that is always left-to-right (e-mail, URLs, domains, phone numbers, passwords) stays LTR inside RTL pages */
html[dir='rtl'] body.eh input[type='email'],
html[dir='rtl'] body.eh input[type='url'],
html[dir='rtl'] body.eh input[type='tel'],
html[dir='rtl'] body.eh input[type='password'],
html[dir='rtl'] body.eh input[name='domain'],
html[dir='rtl'] body.eh input[name='domains[]'],
html[dir='rtl'] body.eh input[name^='ns['],
html[dir='rtl'] body.eh input[name='username'],
html[dir='rtl'] body.eh input[name='email'] { direction: ltr; text-align: right; }
html[dir='rtl'] body.eh input[type='email']::placeholder,
html[dir='rtl'] body.eh input[name='domain']::placeholder { text-align: right; }

/* Direction-aware icons: arrows and chevrons point the reading way in RTL */
html[dir='rtl'] body.eh :is(.fa-arrow-right, .fa-arrow-left, .fa-arrow-circle-right, .fa-arrow-circle-left,
    .fa-arrow-alt-circle-right, .fa-arrow-alt-circle-left, .fa-chevron-right, .fa-chevron-left,
    .fa-chevron-circle-right, .fa-chevron-circle-left, .fa-angle-right, .fa-angle-left,
    .fa-angle-double-right, .fa-angle-double-left, .fa-caret-right, .fa-caret-left,
    .fa-long-arrow-alt-right, .fa-long-arrow-alt-left, .fa-hand-point-right, .fa-hand-point-left,
    .fa-sign-in-alt, .fa-sign-out-alt, .fa-share, .fa-reply, .fa-reply-all, .fa-step-forward,
    .fa-step-backward, .fa-forward, .fa-backward)::before {
    display: inline-block;
    transform: scaleX(-1);
}

/* ---------- Skip link ---------- */
.eh-skip {
    position: absolute;
    inset-inline-start: 12px;
    top: -100px;
    z-index: 2000;
    background: var(--c-ink);
    color: #fff !important;
    padding: 10px 16px;
    border-radius: var(--radius-s);
}
.eh-skip:focus { top: 12px; }

/* ---------- Top bar (navy, like the website utility bar) ---------- */
.eh-topbar { background: var(--c-navy); color: var(--c-on-navy); font-size: 0.875rem; }
.eh-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.eh-topbar__nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.eh-topbar form { margin: 0; }
body.eh .eh-topbar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 10px;
    color: var(--c-on-navy);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}
body.eh .eh-topbar__link:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
.eh-topbar__link[lang='en'] { font-family: var(--font-en); }
.eh-topbar__link[lang='ar'] { font-family: var(--font-ar); }
body.eh .eh-topbar__staff { color: #fde68a; }

/* ---------- Header (white bar with logo, navigation, account) ---------- */
.eh-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgb(255 255 255 / 0.97);
    border-bottom: 1px solid var(--c-border);
}
.eh-header__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; min-height: 72px; }
.eh-logo { display: inline-flex; padding-block: 6px; }
.eh-logo img { display: block; height: 34px; width: auto; }
.eh-toggler {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-s);
    background: #fff;
    color: var(--c-ink);
    font-weight: 600;
}
.eh-burger, .eh-burger::before, .eh-burger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}
.eh-burger::before, .eh-burger::after { content: ''; position: absolute; }
.eh-burger::before { top: -6px; }
.eh-burger::after { top: 6px; }
.eh-nav { flex: 1 1 100%; padding: 0; order: 3; }
.eh-nav .navbar-collapse { padding-bottom: 12px; }
.eh-nav .navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--radius-s);
    color: var(--c-ink-2);
    font-weight: 500;
    white-space: nowrap;
}
.eh-nav .navbar-nav .nav-link:hover,
.eh-nav .navbar-nav .show > .nav-link { background: var(--c-surface); color: var(--c-ink); }
.eh-nav .navbar-nav .active > .nav-link { background: var(--c-primary-soft); color: var(--c-primary); }
.eh-nav .dropdown-menu {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px;
}
.eh-nav .dropdown-item { border-radius: var(--radius-s); padding: 8px 12px; color: var(--c-ink-2); }
.eh-nav .dropdown-item:hover, .eh-nav .dropdown-item:focus { background: var(--c-primary-soft); color: var(--c-primary); }
.eh-nav__login { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 992px) {
    .eh-toggler { display: none; }
    .eh-nav { flex: 1 1 auto; order: 0; }
    .eh-nav .navbar-collapse { justify-content: space-between; padding-bottom: 0; }
    .eh-nav__primary { margin-inline-start: 16px; }
}

/* ---------- Page title ---------- */
.eh-title {
    background: linear-gradient(180deg, var(--c-surface), var(--c-bg));
    border-bottom: 1px solid var(--c-border);
    padding-block: 20px;
}
body.eh .eh-title h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.75rem); }

/* ---------- Bootstrap components in brand colours ---------- */
body.eh .btn {
    border-radius: 10px;
    font-weight: 600;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
body.eh .btn-sm, body.eh .btn-xs { min-height: 32px; border-radius: var(--radius-s); }
body.eh .btn-block { display: flex; width: 100%; }
/* Button colours. Blesta's Look-and-Feel theme CSS sets .btn-success/.btn-light/... with !important,
   so these rules need !important to win. Contrast: white on #1d4ed8 6.7:1, #0f172a on white 17:1,
   #1d4ed8 on #eff4ff 6.1:1, #b91c1c on white 6.5:1. */
body.eh .btn-primary, body.eh .btn-success {
    background-color: var(--c-primary) !important;
    border-color: var(--c-primary) !important;
    color: #fff !important;
}
body.eh .btn-primary:hover, body.eh .btn-success:hover,
body.eh .btn-primary:not(:disabled):not(.disabled):active, body.eh .btn-success:not(:disabled):not(.disabled):active {
    background-color: var(--c-primary-hover) !important;
    border-color: var(--c-primary-hover) !important;
    color: #fff !important;
}
body.eh .btn-outline-primary { color: var(--c-primary) !important; border-color: var(--c-primary) !important; background-color: #fff !important; }
body.eh .btn-outline-primary:hover { background-color: var(--c-primary-soft) !important; color: var(--c-primary) !important; }
/* Secondary / ghost actions */
body.eh .btn-light, body.eh .btn-default, body.eh .btn-secondary {
    background-color: #fff !important;
    border-color: var(--c-border) !important;
    color: var(--c-ink) !important;
}
body.eh .btn-light:hover, body.eh .btn-default:hover, body.eh .btn-secondary:hover,
body.eh .btn-light:not(:disabled):not(.disabled):active, body.eh .btn-secondary:not(:disabled):not(.disabled):active {
    background-color: var(--c-surface) !important;
    border-color: #b8c4d9 !important;
    color: var(--c-ink) !important;
}
/* Destructive actions (delete, Empty cart): red text on white, solid red only on hover */
body.eh .btn-danger, body.eh #empty_cart {
    background-color: #fff !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}
body.eh .btn-danger:hover, body.eh #empty_cart:hover {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #fff !important;
}
body.eh .btn-danger.disabled, body.eh .btn-danger[disabled] { opacity: 1; cursor: not-allowed; }
/* Focus: the website's amber ring instead of Bootstrap's glow */
body.eh .btn:focus, body.eh .btn.focus { box-shadow: none !important; }
body.eh .btn:focus-visible { outline: 3px solid var(--c-focus) !important; outline-offset: 2px; box-shadow: none !important; }
body.eh .bg-primary, body.eh .badge-primary { background-color: var(--c-primary) !important; }
body.eh .text-primary { color: var(--c-primary) !important; }

body.eh .form-control, body.eh .custom-select, body.eh select.form-control {
    border-color: var(--c-border);
    border-radius: var(--radius-s);
    min-height: 42px;
}
body.eh textarea.form-control { min-height: 96px; }
body.eh .form-control:focus, body.eh .custom-select:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgb(29 78 216 / 0.15);
}
body.eh label { font-weight: 600; color: var(--c-ink-2); }
body.eh .checkbox input, body.eh .radio input { margin-inline-end: 6px; }
body.eh .input-group-text { background: var(--c-surface); border-color: var(--c-border); }

body.eh .card, body.eh .panel, body.eh .card-blesta, body.eh .panel-blesta {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    background: #fff;
}
body.eh .card-blesta > .card-header, body.eh .panel-blesta > .panel-heading, body.eh .card > .card-header {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-ink);
    font-weight: 700;
    border-radius: var(--radius) var(--radius) 0 0;
}
body.eh .table thead th, body.eh .table-curved th { background: var(--c-surface); color: var(--c-ink-2); border-color: var(--c-border); font-weight: 600; }
body.eh .table td, body.eh .table th { border-color: var(--c-border); vertical-align: middle; }
body.eh .table-hover > tbody > tr:hover > td { background: var(--c-primary-soft); }
body.eh .list-group-item { border-color: var(--c-border); }
body.eh .list-group-item.active, body.eh a.list-group-item.active {
    background: var(--c-primary-soft);
    border-color: var(--c-border);
    color: var(--c-primary);
    font-weight: 600;
}
body.eh .eh-subnav { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-s); }
body.eh .page-item.active .page-link, body.eh div.pagination ul.pagination li.active a { background: var(--c-primary); border-color: var(--c-primary); }
body.eh .page-link { color: var(--c-primary); }
body.eh .alert { border-radius: var(--radius-s); }
body.eh .badge { font-weight: 600; }
body.eh .modal-content { border-radius: var(--radius); border-color: var(--c-border); }
body.eh .breadcrumb { background: transparent; padding-inline: 0; }
body.eh .nav-tabs .nav-link.active { color: var(--c-primary); border-color: var(--c-border) var(--c-border) #fff; font-weight: 600; }

/* Tables scroll sideways on phones instead of breaking the page */
@media (max-width: 767.98px) {
    body.eh .table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .eh-main { padding-block: 16px 32px; }
}

/* ---------- Login, password reset and the other header-less pages ---------- */
body.eh-bare .row.login { padding-top: clamp(16px, 6vh, 64px); justify-content: center; }
body.eh-bare .row.login > [class*='col-'] { flex: 0 0 100%; max-width: 440px; margin-inline: auto; }
body.eh-bare .row.login h2 { font-size: 1.5rem; }
body.eh-bare .row.login h2 .fa-lock { color: var(--c-primary); }
body.eh-bare .row.login .panel-footer, body.eh-bare .row.login .card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    border-radius: 0 0 var(--radius) var(--radius);
}
body.eh-bare .row.login .panel-footer a, body.eh-bare .row.login .card-footer a { float: none !important; }
@media (min-width: 768px) {
    body.eh-bare .row.login > [class*='col-'] { flex: 0 0 auto; width: 100%; }
}

/* ---------- Footer (navy, like the website) ---------- */
.eh-footer { background: var(--c-navy); color: var(--c-on-navy); padding-block: 40px 24px; font-size: 0.9375rem; margin-top: auto; }
.eh-footer__grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.eh-footer__brand img { display: block; height: 32px; width: auto; }
.eh-footer__brand p { color: var(--c-on-navy-muted); margin: 14px 0 0; max-width: 360px; }
body.eh .eh-footer h2 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.eh-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
body.eh .eh-footer a { color: var(--c-on-navy); text-decoration: none; }
body.eh .eh-footer a:hover { color: #fff; text-decoration: underline; }
.eh-footer__bottom {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgb(255 255 255 / 0.14);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    color: var(--c-on-navy-muted);
    font-size: 0.875rem;
}
.eh-footer__bottom p { margin: 0; }
@media (min-width: 768px) {
    .eh-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

/* ---------- Order forms (wizard / standard / ajax templates) ---------- */
body.eh .card-order { border-radius: var(--radius); border: 1px solid var(--c-border); }
body.eh .card-order.bg-light { background-color: #fff !important; }
body.eh .card-order .total-due { color: var(--c-ink); font-weight: 700; }
body.eh .package-block { border-radius: var(--radius); }

/* Package cards (/order/main/packages/<form>/): website plan cards — radius 22px, --c-border,
   featured middle plan outlined in --c-primary, selected plan with a brand ring and a soft "Selected ✓" state.
   Blesta dims unselected boxes to 60% opacity, which fails contrast; cards stay fully opaque. */
body.eh .package.card, body.eh .package-boxes .package {
    border: 1px solid var(--c-border);
    border-radius: 22px;
    box-shadow: var(--shadow-s);
    background: #fff;
    opacity: 1;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}
body.eh .package .package-name.card-header {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    border-radius: 22px 22px 0 0;
    color: var(--c-ink);
    padding: 16px 18px;
}
body.eh .package .package-name h4, body.eh .package .package-name h3 { font-weight: 700; margin: 0; }
body.eh .package .card-footer { background: #fff; border-top: 0; padding: 0 18px 18px; }
body.eh .row > .package-boxes:nth-child(2):nth-last-child(2) .package { border: 2px solid var(--c-primary); }
body.eh .package.selected, body.eh .package-list.selected {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgb(29 78 216 / 0.22), var(--shadow);
}
body.eh .package-list.selected { border-width: 2px; }
body.eh .selected-btn .btn {
    background-color: var(--c-primary-soft) !important;
    border: 2px solid var(--c-primary) !important;
    color: var(--c-primary) !important;
    cursor: default;
}
body.eh .selected-btn .btn::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-inline-end: 8px;
}
body.eh .unselected-btn .btn:hover { border-color: var(--c-primary) !important; color: var(--c-primary) !important; background-color: var(--c-primary-soft) !important; }

/* Cart line items on phones (wizard/ajax cart, columns: description | edit/remove | quantity | price):
   one stacked block per item — description, then quantity and price, then the buttons — with no sideways scroll. */
@media (max-width: 576px) {
    body.eh .card-order.table-responsive { overflow-x: visible; }
    body.eh .card-order table.table-striped { display: block; overflow: visible; width: 100%; }
    body.eh .card-order table.table-striped thead { display: none; }
    body.eh .card-order table.table-striped tbody { display: block; }
    body.eh .card-order table.table-striped tr {
        display: grid;
        grid-template-columns: minmax(0, auto) minmax(0, 1fr);
        grid-template-areas: 'desc desc' 'qty price' 'act act';
        gap: 6px 12px;
        padding: 12px 10px;
        border-bottom: 1px solid var(--c-border);
    }
    body.eh .card-order table.table-striped td { display: block; border: 0; padding: 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; background: transparent; }
    body.eh .card-order table.table-striped td:nth-child(1) { grid-area: desc; }
    body.eh .card-order table.table-striped td:nth-child(2) { grid-area: act; }
    body.eh .card-order table.table-striped td:nth-child(3) { grid-area: qty; color: var(--c-muted); }
    body.eh .card-order table.table-striped td:nth-child(4) { grid-area: price; text-align: end !important; }
    body.eh .card-order table.table-striped td:nth-child(2):empty { display: none; }
    body.eh .card-order table.table-striped td .btn-group { display: flex; width: 100%; gap: 8px; }
    body.eh .card-order table.table-striped td .btn-group > .btn { flex: 1 1 0; border-radius: var(--radius-s) !important; margin: 0; }
}

/* Invoice page on phones (class set by ebdaahost.js). Line items: description, then "qty × unit price",
   then the amount; payments: date and amount, then type and transaction number. Totals use the full width. */
@media (max-width: 576px) {
    body.eh.eh-invoice-view #eh-main .table-responsive { overflow-x: visible; }
    body.eh.eh-invoice-view #eh-main table.table-striped { display: block; overflow: visible; width: 100%; }
    body.eh.eh-invoice-view #eh-main table.table-striped thead { display: none; }
    body.eh.eh-invoice-view #eh-main table.table-striped tbody { display: block; }
    body.eh.eh-invoice-view #eh-main table.table-striped tr {
        display: grid;
        grid-template-columns: minmax(0, auto) minmax(0, 1fr);
        grid-template-areas: 'a a' 'b c' 'd d';
        gap: 4px 6px;
        padding: 12px 10px;
        border-bottom: 1px solid var(--c-border);
    }
    body.eh.eh-invoice-view #eh-main table.table-striped td {
        display: block; border: 0; padding: 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; background: transparent;
    }
    body.eh.eh-invoice-view #eh-main table.table-striped td:nth-child(1) { grid-area: a; font-weight: 600; }
    body.eh.eh-invoice-view #eh-main table.table-striped td:nth-child(2) { grid-area: b; color: var(--c-muted); }
    body.eh.eh-invoice-view #eh-main table.table-striped td:nth-child(2)::after { content: ' ×'; }
    body.eh.eh-invoice-view #eh-main table.table-striped td:nth-child(3) { grid-area: c; color: var(--c-muted); }
    body.eh.eh-invoice-view #eh-main table.table-striped td:nth-child(4) { grid-area: d; text-align: end; font-weight: 700; }
    /* The payments table (date | type | transaction | amount) is the last striped table: no "×" there */
    body.eh.eh-invoice-view #eh-main .row.mt-4 table.table-striped td:nth-child(2)::after { content: none; }
    body.eh.eh-invoice-view #eh-main .float-right:has(> .table-responsive) { float: none !important; width: 100%; }
    body.eh.eh-invoice-view #eh-main .float-right > .table-responsive table { width: 100%; }
    body.eh.eh-invoice-view #eh-main .float-right > .table-responsive td:last-child { text-align: end; }
}

/* Offline-gateway payment instructions (Arabic block, rule, English block): each block keeps its own direction
   (set by ebdaahost.js), the box uses the full width, and long tokens (e-mail, alias, IBAN, SWIFT) wrap. */
body.eh [data-eh-bidi] { float: none !important; width: 100%; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
body.eh [data-eh-bidi] [dir='auto'] { text-align: start; unicode-bidi: plaintext; }
body.eh [data-eh-bidi] ol[dir='auto'], body.eh [data-eh-bidi] ul[dir='auto'] { padding-inline-start: 1.5em; }
body.eh [data-eh-bidi] hr { border: 0; border-top: 1px solid var(--c-border); margin: 16px 0; }
body.eh [data-eh-bidi] code, body.eh [data-eh-bidi] strong { overflow-wrap: anywhere; white-space: normal; }

@media print {
    .eh-topbar, .eh-header, .eh-footer, .eh-skip { display: none !important; }
    body.eh { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
    body.eh * { transition: none !important; animation: none !important; }
}

/* Domain lookup (order forms): the three buttons share one .btn-group row and were cut off on phones
   ("Transfer" / «نقل» clipped). Below 576px they stack, full width, primary first. */
@media (max-width: 575.98px) {
    #domain-lookup-form .search .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: .5rem;
    }
    #domain-lookup-form .search .btn-group > .btn {
        width: 100%;
        margin: 0 !important;
        border-radius: .375rem !important;
        white-space: normal;
    }
}
