/* ============================================================
   Subdomain selection form — twenty-x unified LTR + RTL layout
   Scope: #domainsubdomain inside #frmProductDomain only, so no
   other form (login, checkout, homepage checker) is affected.
   STRUCTURAL rules are global (identical proportions in English
   and Arabic). Only the outer-row horizontal ALIGNMENT is
   language-specific (flex-start for LTR, flex-end for RTL).
   URL always reads left->right: http:// | yourname(WIDE) |
   .guzour.net(narrow) | red button.
   ============================================================ */

/* 1) GLOBAL — both flex rows: single horizontal line, vertically
   centred, uniform 10px spacing via `gap` only. `direction:ltr`
   is forced on both rows in every language so the URL always
   reads http:// -> yourname -> .guzour.net left-to-right. */
#order-standard_cart #frmProductDomain #domainsubdomain > .row,
#order-standard_cart #frmProductDomain #domainsubdomain .row.domains-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    direction: ltr !important;
}

/* 2) OUTER ROW ALIGNMENT — language-specific only.
   LTR (default): group starts at the left edge of the page. */
#order-standard_cart #frmProductDomain #domainsubdomain > .row {
    justify-content: flex-start !important;
}

/* 2b) RTL (Arabic): group is pinned to the right edge of the
   container, as expected in an RTL interface. */
body.body-rtl #order-standard_cart #frmProductDomain #domainsubdomain > .row {
    justify-content: flex-end !important;
}

/* 3) GLOBAL — group wrapper (col-sm-9) grows so the input can
   expand; identical in both languages. */
#order-standard_cart #frmProductDomain #domainsubdomain > .row > .col-sm-9 {
    width: auto !important;
    flex: 1 1 auto !important;
    max-width: none !important;
    min-width: 0 !important;
}

/* 4) GLOBAL — "http://" prefix column: small natural width,
   transparent background, no gutters. */
#order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-2.col-2 {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    background: none !important;
    text-align: left !important;
    white-space: nowrap !important;
}

#order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-2.col-2 .form-control-static {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
}

/* 5) GLOBAL — yourname input column: WIDEST element, grows to
   fill all remaining space in both languages. */
#order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-5.col-5:nth-of-type(2) {
    width: auto !important;
    flex: 1 1 auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    background: none !important;
}

/* 6) GLOBAL — .guzour.net dropdown column: narrow, content-fit,
   in both languages. */
#order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-5.col-5:nth-of-type(3) {
    width: auto !important;
    flex: 0 0 auto !important;
    max-width: fit-content !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    background: none !important;
}

/* 7) GLOBAL — fields keep standard white background + theme
   border, identical in both languages. */
#order-standard_cart #frmProductDomain #domainsubdomain .domains-row input#subdomainsld {
    width: 100% !important;
    margin: 0 !important;
    background-color: #ffffff !important;
    border: 1px solid #dee3e8 !important;
}

#order-standard_cart #frmProductDomain #domainsubdomain .domains-row select#subdomaintld {
    width: auto !important;
    margin: 0 !important;
    background-color: #ffffff !important;
    border: 1px solid #dee3e8 !important;
}

/* 8) GLOBAL — button column keeps the exact col-sm-2 width
   (16.6667%) in both languages. */
#order-standard_cart #frmProductDomain #domainsubdomain > .row > .col-sm-2 {
    width: 16.666667% !important;
    flex: 0 0 16.666667% !important;
    max-width: 16.666667% !important;
    min-width: 0 !important;
}

/* 9) GLOBAL — red button: margin/padding only (colour and
   typography untouched), identical sizing in both languages. */
#order-standard_cart #frmProductDomain #domainsubdomain .col-sm-2 .btn.btn-primary {
    width: 100% !important;
    margin: 0 !important;
    padding: 0.375rem 0.75rem !important;
}

/* ============================================================
   MOBILE RESPONSIVE — phones & small tablets (below the theme's
   768px Bootstrap breakpoint). The single horizontal row stacks
   vertically: http:// on its own line, then the yourname input,
   then the .guzour.net dropdown, then a full-width button.
   Applies to BOTH languages (Arabic RTL and English LTR).
   Desktop rules above are left untouched.
   ============================================================ */
@media (max-width: 767.98px) {

    /* Outer row: allow the group and the button to wrap and
       stack. Inner row: disable the horizontal `gap` (spacing is
       now handled by each field's margin-bottom below). */
    #order-standard_cart #frmProductDomain #domainsubdomain > .row {
        flex-wrap: wrap !important;
    }
    #order-standard_cart #frmProductDomain #domainsubdomain .row.domains-row {
        flex-wrap: wrap !important;
        gap: 0 !important;
    }

    /* Group wrapper and button column: full width, one under the
       other. */
    #order-standard_cart #frmProductDomain #domainsubdomain > .row > .col-sm-9,
    #order-standard_cart #frmProductDomain #domainsubdomain > .row > .col-sm-2 {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    /* Prefix, yourname input and .guzour.net dropdown: each takes
       full width and stacks vertically with 10px spacing. */
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-2.col-2,
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-5.col-5:nth-of-type(2),
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-5.col-5:nth-of-type(3) {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* No trailing margin after the last stacked field so the
       outer-row gap keeps the button nicely spaced. */
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-5.col-5:nth-of-type(3) {
        margin-bottom: 0 !important;
    }

    /* Prefix text sits on its own line, left-aligned above the
       input, with the same vertical rhythm. */
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row > .col-xs-2.col-2 .form-control-static {
        line-height: 1.5 !important;
    }

    /* Fields stretch to the full row width. */
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row input#subdomainsld {
        width: 100% !important;
    }
    #order-standard_cart #frmProductDomain #domainsubdomain .domains-row select#subdomaintld {
        width: 100% !important;
    }

    /* Full-width, easy-to-tap button. */
    #order-standard_cart #frmProductDomain #domainsubdomain .col-sm-2 .btn.btn-primary {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}