/*
 * Magoods Checkout — Configure Product page
 * Scope: #order-standard_cart.mg-configure-shell
 * Reuses the unified Magoods cloud-panel tokens; matches viewcart-enhanced.css and checkout.css.
 */

#order-standard_cart.mg-configure-shell {
    --cyan: #00a8e8;
    --cyan-soft: #4cc7f2;
    --bg: #00171f;
    --surface: rgba(0, 30, 46, 0.97);
    --surface-2: rgba(0, 35, 55, 0.78);
    --glass: rgba(0, 35, 55, 0.50);
    --b-glow: rgba(0, 168, 232, 0.22);
    --b-subtle: rgba(0, 168, 232, 0.12);
    --b-strong: rgba(0, 168, 232, 0.42);
    --tx: #e6f6fc;
    --tx2: #b6d6e2;
    --txm: #8aa6b4;
    --txf: #6b8390;
    --success: #34d399;
    --danger: #ef6479;
    --warn: #f5b942;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-full: 999px;
    --tr: 190ms cubic-bezier(0.16, 1, 0.3, 1);
    --font-body: 'Poppins', 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-disp: 'Orbitron', 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Menlo', monospace;
    color: var(--tx);
    font-family: var(--font-body);
}

#order-standard_cart.mg-configure-shell *,
#order-standard_cart.mg-configure-shell *::before,
#order-standard_cart.mg-configure-shell *::after {
    box-sizing: border-box;
}

/* ─── Frame & progress (mirrors viewcart) ──────────────────────────────── */
.mg-cfg-frame {
    max-width: 1160px;
    margin: 0 auto;
    padding: 8px 24px 64px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 0 28px;
    gap: 0;
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__dot {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 1.5px solid rgba(230, 246, 255, 0.18);
    background: rgba(0, 18, 28, 0.85);
    color: var(--txm);
    transition: var(--tr);
    position: relative;
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__step > span {
    font-family: var(--font-disp);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--txm);
    white-space: nowrap;
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__step--active .mg-cfg-progress__dot {
    border-color: var(--cyan);
    background: rgba(0, 168, 232, 0.14);
    color: var(--cyan);
    box-shadow: 0 0 0 5px rgba(0, 168, 232, 0.10), 0 0 22px rgba(0, 168, 232, 0.30);
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__step--active .mg-cfg-progress__dot::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(0, 168, 232, 0.28);
    animation: mgCfgPulse 2.4s ease infinite;
}

@keyframes mgCfgPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 0;   transform: scale(1.35); }
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__step--active > span {
    color: var(--tx2);
}

#order-standard_cart.mg-configure-shell .mg-cfg-progress__line {
    height: 1px;
    width: 110px;
    background: rgba(0, 168, 232, 0.15);
    margin-bottom: 30px;
    flex-shrink: 0;
}

/* ─── Layout ──────────────────────────────────────────────────────────── */
.mg-cfg-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    animation: mgCfgRise 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mg-cfg-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mg-cfg-summary-column {
    flex: 0 0 340px;
    width: 340px;
    position: sticky;
    top: 96px;
}

/* ─── Card primitive ──────────────────────────────────────────────────── */
.mg-cfg-card {
    background: var(--surface);
    border: 1px solid var(--b-glow);
    border-radius: var(--r-lg);
    padding: 22px 24px 24px;
    box-shadow: 0 18px 40px rgba(0, 16, 30, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.mg-cfg-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(0, 168, 232, 0.10), transparent 55%);
    pointer-events: none;
}

.mg-cfg-card > * { position: relative; }

.mg-cfg-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--b-subtle);
}

.mg-cfg-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, rgba(0, 168, 232, 0.20), rgba(20, 96, 184, 0.20));
    border: 1px solid var(--b-glow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 15px;
    flex-shrink: 0;
}

.mg-cfg-card__title {
    margin: 0;
    font-family: var(--font-disp);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tx);
}

.mg-cfg-card__hint {
    margin-left: auto;
    font-size: 12px;
    color: var(--txm);
    font-style: italic;
}

.mg-cfg-card__body { padding: 0; }

/* ─── Validation banner ──────────────────────────────────────────────── */
#order-standard_cart.mg-configure-shell .alert.alert-danger#containerProductValidationErrors {
    background: rgba(239, 100, 121, 0.10);
    border: 1px solid rgba(239, 100, 121, 0.32);
    border-radius: var(--r-md);
    color: #fbd5da;
    padding: 14px 18px;
    margin: 0 0 18px;
}

#order-standard_cart.mg-configure-shell .alert.alert-danger#containerProductValidationErrors p {
    margin: 0 0 6px;
    font-weight: 600;
    color: #ffb3bd;
}

#order-standard_cart.mg-configure-shell #containerProductValidationErrorsList {
    margin: 0;
    padding-left: 22px;
}

/* ─── Form rows & inputs ─────────────────────────────────────────────── */
.mg-cfg-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mg-cfg-field-row + .mg-cfg-field-row { margin-top: 14px; }

#order-standard_cart.mg-configure-shell .mg-cfg-card .form-group {
    margin: 0;
    position: relative;
}

#order-standard_cart.mg-configure-shell .mg-cfg-card .form-group label:not(.field-icon) {
    display: block;
    margin: 0 0 6px;
    font-size: 12.5px;
    color: var(--txm);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-family: var(--font-disp);
}

#order-standard_cart.mg-configure-shell .form-group.prepend-icon {
    position: relative;
}

#order-standard_cart.mg-configure-shell .form-group.prepend-icon .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    color: var(--cyan);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
    width: auto;
    text-transform: none;
    letter-spacing: 0;
}

#order-standard_cart.mg-configure-shell .form-group.prepend-icon .field.form-control,
#order-standard_cart.mg-configure-shell .form-group.prepend-icon input.form-control {
    padding-left: 40px;
}

#order-standard_cart.mg-configure-shell .form-control,
#order-standard_cart.mg-configure-shell input[type="text"].form-control,
#order-standard_cart.mg-configure-shell input[type="password"].form-control,
#order-standard_cart.mg-configure-shell input[type="number"].form-control,
#order-standard_cart.mg-configure-shell input[type="email"].form-control,
#order-standard_cart.mg-configure-shell select.form-control,
#order-standard_cart.mg-configure-shell textarea.form-control {
    height: 44px;
    padding: 0 14px;
    background: rgba(0, 23, 35, 0.65);
    border: 1px solid var(--b-subtle);
    border-radius: var(--r-md);
    color: var(--tx);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
    box-shadow: none;
    width: 100%;
}

#order-standard_cart.mg-configure-shell textarea.form-control {
    height: auto;
    min-height: 96px;
    padding: 12px 14px;
    line-height: 1.5;
}

#order-standard_cart.mg-configure-shell .form-control:focus,
#order-standard_cart.mg-configure-shell input.form-control:focus,
#order-standard_cart.mg-configure-shell select.form-control:focus,
#order-standard_cart.mg-configure-shell textarea.form-control:focus,
#order-standard_cart.mg-configure-shell .form-control:active,
#order-standard_cart.mg-configure-shell .form-control:hover {
    border-color: var(--cyan) !important;
    background: rgba(0, 30, 46, 0.92) !important;
    color: var(--tx) !important;
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.18) !important;
    outline: none !important;
}

/* Autofill */
#order-standard_cart.mg-configure-shell input.form-control:-webkit-autofill,
#order-standard_cart.mg-configure-shell input.form-control:-webkit-autofill:hover,
#order-standard_cart.mg-configure-shell input.form-control:-webkit-autofill:focus,
#order-standard_cart.mg-configure-shell input.form-control:autofill,
#order-standard_cart.mg-configure-shell input.form-control:autofill:hover,
#order-standard_cart.mg-configure-shell input.form-control:autofill:focus {
    -webkit-text-fill-color: var(--tx);
    -webkit-box-shadow: 0 0 0 1000px rgba(0, 23, 35, 0.95) inset, 0 0 0 4px rgba(0, 168, 232, 0.18);
    box-shadow: 0 0 0 1000px rgba(0, 23, 35, 0.95) inset, 0 0 0 4px rgba(0, 168, 232, 0.18);
    background-color: rgba(0, 23, 35, 0.95) !important;
    caret-color: var(--tx);
    border-color: var(--cyan) !important;
    transition: background-color 600000s ease-in-out 0s, color 600000s ease-in-out 0s;
}

/* Hide native browser password-manager icons (these draw their own light/white
   circle on hover, which clashes with the dark theme) */
#order-standard_cart.mg-configure-shell input[type="password"]::-webkit-credentials-auto-fill-button,
#order-standard_cart.mg-configure-shell input[type="password"]::-webkit-strong-password-auto-fill-button,
#order-standard_cart.mg-configure-shell input[type="password"]::-webkit-contacts-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

#order-standard_cart.mg-configure-shell input[type="password"]::-ms-reveal,
#order-standard_cart.mg-configure-shell input[type="password"]::-ms-clear {
    filter: invert(1) brightness(2);
}

#order-standard_cart.mg-configure-shell .form-control::placeholder { color: var(--txf); }

/* native select — reforged closed-state: deep glass bg, double-chevron, focus ring */
#order-standard_cart.mg-configure-shell select,
#order-standard_cart.mg-configure-shell select.form-control,
#order-standard_cart.mg-configure-shell select.custom-select,
#order-standard_cart.mg-configure-shell select.select-inline {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    height: 46px !important;
    padding: 0 42px 0 16px !important;
    background-color: rgba(0, 23, 35, 0.78) !important;
    background-image:
        linear-gradient(135deg, transparent 50%, var(--cyan) 50%, var(--cyan) 60%, transparent 60%),
        linear-gradient(-135deg, transparent 50%, var(--cyan) 50%, var(--cyan) 60%, transparent 60%),
        linear-gradient(135deg, rgba(0, 168, 232, 0.10), rgba(0, 168, 232, 0) 60%) !important;
    background-position:
        calc(100% - 22px) 19px,
        calc(100% - 15px) 19px,
        0 0 !important;
    background-size: 8px 8px, 8px 8px, 100% 100% !important;
    background-repeat: no-repeat !important;
    border: 1px solid var(--b-subtle) !important;
    border-radius: var(--r-md) !important;
    color: var(--tx) !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 4px 14px rgba(0, 16, 30, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.02) !important;
    cursor: pointer;
    transition: border-color var(--tr), box-shadow var(--tr), background-color var(--tr), transform var(--tr);
}

#order-standard_cart.mg-configure-shell select:hover,
#order-standard_cart.mg-configure-shell select.form-control:hover,
#order-standard_cart.mg-configure-shell select.custom-select:hover {
    border-color: var(--b-strong) !important;
    background-color: rgba(0, 30, 46, 0.92) !important;
    box-shadow: 0 6px 18px rgba(0, 16, 30, 0.35), 0 0 0 1px var(--b-subtle) !important;
}

#order-standard_cart.mg-configure-shell select:focus,
#order-standard_cart.mg-configure-shell select.form-control:focus,
#order-standard_cart.mg-configure-shell select.custom-select:focus {
    border-color: var(--cyan) !important;
    background-color: rgba(0, 30, 46, 0.96) !important;
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.20), 0 8px 22px rgba(0, 168, 232, 0.18) !important;
    outline: none !important;
}

#order-standard_cart.mg-configure-shell select option,
#order-standard_cart.mg-configure-shell select.form-control option,
#order-standard_cart.mg-configure-shell select.custom-select option {
    background: #00171f !important;
    background-color: #00171f !important;
    color: var(--tx) !important;
    padding: 10px 14px !important;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
}

/* ─── Compat: standard_cart blocks that get swapped in via AJAX ─────── */
#order-standard_cart.mg-configure-shell .sub-heading {
    display: none; /* hide legacy headings; our cards already provide them. cycle-change AJAX preserves only inner option markup */
}

#order-standard_cart.mg-configure-shell .product-configurable-options .row,
#order-standard_cart.mg-configure-shell .addon-products.row {
    margin-left: -8px;
    margin-right: -8px;
}

#order-standard_cart.mg-configure-shell .product-configurable-options [class*="col-sm-"],
#order-standard_cart.mg-configure-shell .addon-products [class*="col-sm-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 12px;
}

#order-standard_cart.mg-configure-shell .product-configurable-options .form-group label {
    text-transform: uppercase;
    font-family: var(--font-disp);
    font-size: 12.5px;
    color: var(--txm);
    letter-spacing: 0.02em;
}

#order-standard_cart.mg-configure-shell .product-configurable-options .form-group label input[type="radio"],
#order-standard_cart.mg-configure-shell .product-configurable-options .form-group label input[type="checkbox"],
#order-standard_cart.mg-configure-shell .addon-products .panel-body label input[type="checkbox"] {
    margin-right: 6px;
    accent-color: var(--cyan);
    text-transform: none;
}

#order-standard_cart.mg-configure-shell .product-configurable-options .form-group label > label,
#order-standard_cart.mg-configure-shell .product-configurable-options .form-group > label + label {
    text-transform: none;
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--tx2);
    letter-spacing: 0;
    margin: 6px 0 0;
    display: block;
    cursor: pointer;
}

#order-standard_cart.mg-configure-shell .form-control-qty {
    max-width: 160px;
    display: inline-block;
}

#order-standard_cart.mg-configure-shell .form-control-static-inline {
    color: var(--tx2);
    font-size: 13px;
    margin-left: 10px;
    font-family: var(--font-mono);
}

/* Ion range slider tone */
#order-standard_cart.mg-configure-shell .irs--modern .irs-bar { background: var(--cyan); border-color: var(--cyan); }
#order-standard_cart.mg-configure-shell .irs--modern .irs-line { background: rgba(0, 168, 232, 0.10); border-color: var(--b-subtle); }
#order-standard_cart.mg-configure-shell .irs--modern .irs-handle { background: var(--cyan); border-color: var(--cyan-soft); }
#order-standard_cart.mg-configure-shell .irs--modern .irs-from,
#order-standard_cart.mg-configure-shell .irs--modern .irs-to,
#order-standard_cart.mg-configure-shell .irs--modern .irs-single { background: var(--cyan); color: #00171f; font-family: var(--font-mono); font-weight: 600; }
#order-standard_cart.mg-configure-shell .irs--modern .irs-min,
#order-standard_cart.mg-configure-shell .irs--modern .irs-max { background: rgba(0, 168, 232, 0.10); color: var(--txm); }
#order-standard_cart.mg-configure-shell .irs--modern .irs-grid-text { color: var(--txf); }

/* ─── Addons ─────────────────────────────────────────────────────────── */
#order-standard_cart.mg-configure-shell .addon-products .panel.panel-addon {
    background: var(--glass);
    border: 1px solid var(--b-subtle);
    border-radius: var(--r-md);
    box-shadow: none;
    transition: border-color var(--tr), background var(--tr), transform var(--tr);
    overflow: hidden;
    margin: 0;
}

#order-standard_cart.mg-configure-shell .addon-products .panel.panel-addon:hover {
    border-color: var(--b-glow);
    transform: translateY(-1px);
}

#order-standard_cart.mg-configure-shell .addon-products .panel.panel-addon.panel-addon-selected {
    border-color: var(--cyan);
    background: rgba(0, 168, 232, 0.08);
    box-shadow: 0 0 0 1px var(--b-glow);
}

#order-standard_cart.mg-configure-shell .addon-products .panel-body {
    padding: 14px 16px;
    color: var(--tx2);
    font-size: 13.5px;
    background: transparent;
}

#order-standard_cart.mg-configure-shell .addon-products .panel-body label {
    color: var(--tx);
    font-family: var(--font-disp);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#order-standard_cart.mg-configure-shell .addon-products .panel-price {
    padding: 10px 16px;
    background: rgba(0, 168, 232, 0.08);
    border-top: 1px solid var(--b-subtle);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 13.5px;
    font-weight: 600;
}

#order-standard_cart.mg-configure-shell .addon-products .panel-add {
    display: none; /* matches modern cart-panel look */
}

/* ─── Help card ──────────────────────────────────────────────────────── */
#order-standard_cart.mg-configure-shell .mg-cfg-help {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin: 6px 0 0;
    background:
        linear-gradient(135deg, rgba(0, 168, 232, 0.10), rgba(20, 96, 184, 0.06)),
        var(--glass);
    border: 1px solid var(--b-glow);
    border-radius: var(--r-lg);
    color: var(--tx2);
    font-size: 13.5px;
    position: relative;
    overflow: hidden;
}

#order-standard_cart.mg-configure-shell .mg-cfg-help::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 50%, rgba(0, 168, 232, 0.10), transparent 60%);
    pointer-events: none;
}

#order-standard_cart.mg-configure-shell .mg-cfg-help > * { position: relative; }

#order-standard_cart.mg-configure-shell .mg-cfg-help__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 168, 232, 0.14);
    border: 1px solid var(--b-glow);
    color: var(--cyan);
    flex-shrink: 0;
    font-size: 16px;
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.06);
}

#order-standard_cart.mg-configure-shell .mg-cfg-help__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#order-standard_cart.mg-configure-shell .mg-cfg-help__title {
    font-family: var(--font-disp);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tx);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#order-standard_cart.mg-configure-shell .mg-cfg-help__text {
    color: var(--tx2);
    font-size: 13px;
    line-height: 1.5;
}

#order-standard_cart.mg-configure-shell .mg-cfg-help__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(0, 168, 232, 0.12);
    border: 1px solid var(--b-glow);
    border-radius: var(--r-full);
    color: var(--cyan);
    font-family: var(--font-disp);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    flex-shrink: 0;
    transition: background var(--tr), color var(--tr), transform var(--tr), border-color var(--tr);
}

#order-standard_cart.mg-configure-shell .mg-cfg-help__cta:hover {
    background: var(--cyan);
    color: #00171f;
    border-color: var(--cyan);
    transform: translateX(2px);
    text-decoration: none;
}

#order-standard_cart.mg-configure-shell .mg-cfg-help__cta i { font-size: 11px; }

/* legacy fallback (in case any older partial still uses the alert) */
#order-standard_cart.mg-configure-shell .alert.alert-warning.info-text-sm {
    background: rgba(0, 168, 232, 0.06);
    border: 1px solid var(--b-subtle);
    border-radius: var(--r-md);
    color: var(--tx2);
    padding: 12px 16px;
    margin: 6px 0 0;
    font-size: 13px;
}

#order-standard_cart.mg-configure-shell .alert.alert-warning.info-text-sm i { color: var(--cyan); }
#order-standard_cart.mg-configure-shell .alert.alert-warning.info-text-sm .alert-link { color: var(--cyan); text-decoration: none; font-weight: 600; }
#order-standard_cart.mg-configure-shell .alert.alert-warning.info-text-sm .alert-link:hover { color: var(--cyan-soft); text-decoration: underline; }

/* ─── Sticky order summary ────────────────────────────────────────────── */
.mg-cfg-summary {
    background: var(--surface);
    border: 1px solid var(--b-glow);
    border-radius: var(--r-lg);
    padding: 20px 22px 22px;
    box-shadow: 0 18px 40px rgba(0, 16, 30, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.mg-cfg-summary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(0, 168, 232, 0.13), transparent 55%);
    pointer-events: none;
}

.mg-cfg-summary > * { position: relative; }

.mg-cfg-summary__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--b-subtle);
}

.mg-cfg-summary__head i {
    color: var(--cyan);
    font-size: 15px;
}

.mg-cfg-summary__head h2 {
    margin: 0;
    font-family: var(--font-disp);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tx);
    font-weight: 600;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .order-summary {
    position: static !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .order-summary > h2 { display: none; }

#order-standard_cart.mg-configure-shell .mg-cfg-summary #orderSummaryLoader {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--cyan);
    font-size: 14px;
    opacity: 0.85;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary #producttotal,
#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container {
    color: var(--tx2) !important;
    font-size: 13.5px !important;
    line-height: 1.7 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .product-name {
    display: block;
    margin: 0 0 2px;
    font-family: var(--font-disp);
    font-size: 14px;
    color: var(--tx);
    font-weight: 600;
    letter-spacing: 0.02em;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .product-group {
    display: block;
    margin: 0 0 12px;
    font-size: 11.5px;
    color: var(--txm);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-family: var(--font-disp);
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .clearfix,
#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container > .clearfix {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    color: var(--tx2);
    background: transparent !important;
    border: 0 !important;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .clearfix::before,
#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .clearfix::after {
    content: none !important;
    display: none !important;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .pull-left,
#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .float-left {
    float: none !important;
    color: var(--tx2);
    font-size: 13px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .pull-right,
#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .float-right {
    float: none !important;
    color: var(--tx);
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: nowrap;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .summary-totals {
    margin: 12px 0 0 !important;
    padding: 12px 0 0 !important;
    border: 0 !important;
    border-top: 1px dashed var(--b-subtle) !important;
    border-bottom: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .total-due-today {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 14px -22px -22px;
    padding: 16px 22px 18px;
    background:
        linear-gradient(135deg, rgba(0, 168, 232, 0.12), rgba(20, 96, 184, 0.10)) !important;
    border-top: 1px solid var(--b-glow) !important;
    color: var(--tx) !important;
    text-align: center;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .total-due-today .amt {
    font-family: var(--font-disp);
    font-size: 24px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.02em;
    line-height: 1;
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary .summary-container .total-due-today > span:last-child {
    font-size: 10.5px;
    color: var(--txm);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: var(--font-disp);
}

#order-standard_cart.mg-configure-shell .mg-cfg-summary hr {
    border: 0;
    border-top: 1px dashed var(--b-subtle);
    margin: 10px 0;
}

#order-standard_cart.mg-configure-shell .sr-only,
#order-standard_cart.mg-configure-shell .mg-cfg-summary .sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Continue button */
#order-standard_cart.mg-configure-shell #btnCompleteProductConfig {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 18px 0 0;
    height: 54px;
    padding: 0 24px;
    background: linear-gradient(90deg, #005b87 0%, #007ea7 45%, #1460b8 100%);
    border: 0;
    border-radius: var(--r-xl);
    color: #fff;
    font-family: var(--font-disp);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter var(--tr), transform var(--tr), box-shadow var(--tr);
    box-shadow: 0 12px 28px rgba(0, 126, 167, 0.32);
}

#order-standard_cart.mg-configure-shell #btnCompleteProductConfig:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 126, 167, 0.45);
}

#order-standard_cart.mg-configure-shell #btnCompleteProductConfig:active {
    transform: translateY(0);
}

#order-standard_cart.mg-configure-shell #btnCompleteProductConfig i {
    font-size: 16px;
}

/* ─── Animations ──────────────────────────────────────────────────────── */
@keyframes mgCfgRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .mg-cfg-layout {
        flex-direction: column;
    }
    .mg-cfg-summary-column {
        flex: 1 1 auto;
        width: 100%;
        position: static;
    }
    .mg-cfg-field-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .mg-cfg-frame { padding: 22px 16px 56px; }
    .mg-cfg-card { padding: 18px 18px 20px; }
    .mg-cfg-progress { padding: 12px 14px; gap: 10px; }
    .mg-cfg-progress__sep { flex-basis: 22px; }
    .mg-cfg-progress__step { font-size: 12px; }
}

/* ─── RTL (Arabic) ────────────────────────────────────────────────────── */
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-card__hint { margin-left: 0; margin-right: auto; }
html[dir="rtl"] #order-standard_cart.mg-configure-shell .form-group.prepend-icon .field-icon { left: auto; right: 14px; }
html[dir="rtl"] #order-standard_cart.mg-configure-shell .form-group.prepend-icon .field.form-control,
html[dir="rtl"] #order-standard_cart.mg-configure-shell .form-group.prepend-icon input.form-control { padding-left: 14px; padding-right: 40px; }
html[dir="rtl"] #order-standard_cart.mg-configure-shell select.form-control {
    background-position: 18px 50%, 13px 50%;
    padding-right: 14px;
    padding-left: 34px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-summary #orderSummaryLoader { right: auto; left: 16px; }
html[dir="rtl"] #order-standard_cart.mg-configure-shell .form-control-static-inline { margin-left: 0; margin-right: 10px; }
html[dir="rtl"] #order-standard_cart.mg-configure-shell .product-configurable-options .form-group label input[type="radio"],
html[dir="rtl"] #order-standard_cart.mg-configure-shell .product-configurable-options .form-group label input[type="checkbox"],
html[dir="rtl"] #order-standard_cart.mg-configure-shell .addon-products .panel-body label input[type="checkbox"] {
    margin-right: 0;
    margin-left: 6px;
}

/* ════════════════════════════════════════════════
   UNIFIED CART PROGRESS BAR — cartprogressunify1
   Same visual on all 4 cart pages:
   configureproduct / viewcart / checkout / complete.
   Rules below win over any older scoped versions.
   ════════════════════════════════════════════════ */
#order-standard_cart .mg-cart-progress {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding: 28px 16px 26px !important;
    margin: 0 auto 6px !important;
    width: 100%;
    max-width: 880px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#order-standard_cart .mg-cart-progress__step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    position: relative;
}

#order-standard_cart .mg-cart-progress__dot {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    border: 1.5px solid rgba(230, 246, 255, 0.18) !important;
    background: rgba(0, 18, 28, 0.85) !important;
    color: rgba(228, 245, 255, 0.55) !important;
    box-shadow: none;
    transition: 190ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    z-index: 2;
}

#order-standard_cart .mg-cart-progress__step > span {
    font: 600 9px/1 "Orbitron", "Poppins", sans-serif !important;
    letter-spacing: 0.20em !important;
    text-transform: uppercase !important;
    color: rgba(228, 245, 255, 0.45) !important;
    white-space: nowrap !important;
    text-align: center;
}

#order-standard_cart .mg-cart-progress__step--active .mg-cart-progress__dot {
    border-color: #00a8e8 !important;
    background: rgba(0, 168, 232, 0.14) !important;
    color: #00a8e8 !important;
    box-shadow:
        0 0 0 5px rgba(0, 168, 232, 0.10),
        0 0 22px rgba(0, 168, 232, 0.30) !important;
}

#order-standard_cart .mg-cart-progress__step--active > span {
    color: rgba(255, 255, 255, 0.92) !important;
}

#order-standard_cart .mg-cart-progress__step--active .mg-cart-progress__dot::after {
    content: "" !important;
    position: absolute !important;
    inset: -6px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 168, 232, 0.32) !important;
    animation: mg-cartprog-pulse 2.4s ease infinite !important;
    pointer-events: none;
}

@keyframes mg-cartprog-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 0; transform: scale(1.38); }
}

#order-standard_cart .mg-cart-progress__step--done .mg-cart-progress__dot {
    border-color: rgba(0, 210, 106, 0.55) !important;
    background: rgba(0, 210, 106, 0.14) !important;
    color: #4dffa3 !important;
    box-shadow:
        0 0 0 5px rgba(0, 210, 106, 0.08),
        0 0 18px rgba(0, 210, 106, 0.22) !important;
}

#order-standard_cart .mg-cart-progress__step--done > span {
    color: rgba(228, 245, 255, 0.78) !important;
}

#order-standard_cart .mg-cart-progress__line {
    flex: 1 1 auto !important;
    height: 1.5px !important;
    min-width: 24px;
    max-width: 110px;
    background: rgba(0, 168, 232, 0.18) !important;
    margin: 0 8px 30px !important;
    align-self: center !important;
    transform: translateY(-15px);
    border: 0 !important;
}

#order-standard_cart .mg-cart-progress__line--done {
    background: linear-gradient(90deg, rgba(0, 210, 106, 0.55), rgba(0, 168, 232, 0.40)) !important;
}

@media (max-width: 640px) {
    #order-standard_cart .mg-cart-progress {
        padding: 22px 8px 20px !important;
    }
    #order-standard_cart .mg-cart-progress__dot {
        width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
    }
    #order-standard_cart .mg-cart-progress__step > span {
        font-size: 8px !important;
        letter-spacing: 0.14em !important;
    }
    #order-standard_cart .mg-cart-progress__line {
        margin: 0 4px 26px !important;
        min-width: 14px;
        transform: translateY(-13px);
    }
}

@media (max-width: 420px) {
    #order-standard_cart .mg-cart-progress__step > span {
        font-size: 0;
    }
    #order-standard_cart .mg-cart-progress__step > span::before {
        content: "•";
        font-size: 9px;
        color: inherit;
    }
}

/* ── Server Setup card (visible Server Name + Root Password) ─────────────── */
#order-standard_cart.mg-configure-shell .mg-cfg-card--server .mg-cfg-card__body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-server-field {
    position: relative;
}

#order-standard_cart.mg-configure-shell .mg-cfg-server-field .form-control {
    padding-right: 14px;
}

#order-standard_cart.mg-configure-shell .field-help-text {
    display: block;
    margin: 8px 2px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--txm, rgba(230, 246, 255, 0.55));
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    font-family: "Poppins", "Cairo", sans-serif;
}

/* Password field: input + buttons share a flex/relative wrapper so the
   toggle and generate buttons always center on the input regardless of
   the surrounding label / help-text height. */
#order-standard_cart.mg-configure-shell .mg-cfg-pw-input {
    position: relative;
    width: 100%;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-input {
    flex: 1 1 auto;
    min-width: 0;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-input .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyan);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-field input.form-control {
    padding-right: 210px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle,
#order-standard_cart.mg-configure-shell .mg-cfg-pw-generate {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--txm, rgba(230, 246, 255, 0.55));
    cursor: pointer;
    transition: color 190ms cubic-bezier(0.16, 1, 0.3, 1),
                background 190ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 190ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 3;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle {
    right: 164px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 8px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle:hover {
    color: var(--cyan, #00a8e8);
    background: transparent;
    transform: translateY(-50%);
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-generate {
    right: 8px;
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, rgba(0, 91, 135, 0.85) 0%, rgba(0, 126, 167, 0.85) 100%);
    color: #fff;
    border-radius: 10px;
    font: 600 11.5px/1 "Poppins", "Cairo", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 0 14px rgba(0, 168, 232, 0.20);
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-generate i {
    font-size: 11px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-generate:hover {
    transform: translateY(calc(-50% - 1px));
    background: linear-gradient(90deg, #005b87 0%, #007ea7 50%, #1460b8 100%);
    color: #fff;
    box-shadow: 0 0 22px rgba(0, 168, 232, 0.36), 0 4px 12px rgba(0, 0, 0, 0.4);
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-generate:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.32);
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle:focus {
    outline: none;
    box-shadow: none;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-input input.form-control {
    padding-right: 50px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-toggle {
    right: 8px;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-generate {
    position: static;
    transform: none;
    flex: 0 0 auto;
    height: 44px;
    white-space: nowrap;
}

#order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-generate:hover {
    transform: translateY(-1px);
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 2px 0;
    flex-wrap: wrap;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter__track {
    position: relative;
    display: block;
    flex: 1 1 180px;
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: inherit;
    background: rgba(148, 163, 184, 0.82);
    transition: width 180ms ease, background 180ms ease;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter__text {
    color: var(--txm, rgba(230, 246, 255, 0.62));
    font: 500 12px/1.4 "Poppins", "Cairo", sans-serif;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter.is-weak .mg-cfg-password-meter__fill {
    background: #ef4444;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter.is-fair .mg-cfg-password-meter__fill {
    background: #f59e0b;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter.is-good .mg-cfg-password-meter__fill {
    background: #00a8e8;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-meter.is-strong .mg-cfg-password-meter__fill {
    background: #22c55e;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-rules {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
    margin: 8px 2px 0;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-rules span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(230, 246, 255, 0.46);
    font: 500 11.5px/1.35 "Poppins", "Cairo", sans-serif;
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-rules i {
    font-size: 6px;
    color: rgba(230, 246, 255, 0.28);
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-rules span.is-met {
    color: rgba(226, 255, 235, 0.82);
}

#order-standard_cart.mg-configure-shell .mg-cfg-password-rules span.is-met i {
    color: #22c55e;
}

.mg-cfg-toast-stack {
    position: fixed;
    top: 96px;
    right: 22px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(330px, calc(100vw - 32px));
    pointer-events: none;
}

.mg-cfg-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 168, 232, 0.28);
    background: rgba(4, 18, 30, 0.96);
    color: rgba(232, 246, 255, 0.9);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), 0 0 22px rgba(0, 168, 232, 0.16);
    font: 500 12.5px/1.45 "Poppins", "Cairo", sans-serif;
    pointer-events: auto;
    animation: mgCfgToastIn 180ms ease-out;
}

.mg-cfg-toast i {
    margin-top: 2px;
    color: #22c55e;
    flex: 0 0 auto;
}

.mg-cfg-toast--warning {
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), 0 0 22px rgba(245, 158, 11, 0.14);
}

.mg-cfg-toast--warning i {
    color: #f59e0b;
}

.mg-cfg-toast.is-hiding {
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes mgCfgToastIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

html[dir="rtl"] .mg-cfg-toast-stack {
    right: auto;
    left: 22px;
}

html[dir="rtl"] .mg-cfg-toast.is-hiding {
    transform: translateX(-10px);
}

@media (max-width: 560px) {
    .mg-cfg-toast-stack {
        top: 76px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    html[dir="rtl"] .mg-cfg-toast-stack {
        right: 16px;
        left: 16px;
    }
}

/* Mobile: stack generate button below the input */
@media (max-width: 560px) {
    #order-standard_cart.mg-configure-shell .mg-cfg-pw-row {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }
    #order-standard_cart.mg-configure-shell .mg-cfg-password-field input.form-control {
        padding-right: 50px;
    }
    #order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle {
        right: 8px;
    }
    #order-standard_cart.mg-configure-shell .mg-cfg-pw-generate {
        position: static;
        transform: none;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
        height: 40px;
    }
    #order-standard_cart.mg-configure-shell .mg-cfg-pw-generate:hover {
        transform: translateY(-1px);
    }
}

/* RTL: flip toggle/generate to the left side */
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-password-field input.form-control {
    padding-right: 14px;
    padding-left: 210px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-input .field-icon {
    left: auto;
    right: 14px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle {
    right: auto;
    left: 164px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-generate {
    right: auto;
    left: 8px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-input input.form-control {
    padding-right: 40px;
    padding-left: 50px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-toggle {
    right: auto;
    left: 8px;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-row .mg-cfg-pw-generate {
    left: auto;
}
@media (max-width: 560px) {
    html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-password-field input.form-control {
        padding-left: 50px;
        padding-right: 14px;
    }
    html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-toggle {
        left: 8px;
        right: auto;
    }
    html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-pw-generate {
        left: auto;
    }
}

/* ==========================================================================
   OS card picker (replaces the WHMCS dropdown for KVMTemplate|Operating System)
   ========================================================================== */
#order-standard_cart.mg-configure-shell .mg-cfg-os-host > label,
#order-standard_cart.mg-configure-shell .mg-cfg-os-host > select { display: none !important; }

#order-standard_cart.mg-configure-shell .mg-cfg-os {
    display: block;
    margin: -2px 0 4px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 4px 14px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(0, 168, 232, 0.16);
    margin-bottom: 18px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__title {
    font-family: 'Orbitron', 'Cairo', sans-serif;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #aef2ff;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__title i {
    color: #00a8e8;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__hint {
    font-size: 12px;
    color: rgba(174, 242, 255, 0.62);
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__hint a {
    color: #00a8e8;
    text-decoration: none;
    margin-left: 4px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__hint a:hover { text-decoration: underline; }

#order-standard_cart.mg-configure-shell .mg-cfg-os__group { margin-top: 16px; }
#order-standard_cart.mg-configure-shell .mg-cfg-os__group:first-of-type { margin-top: 0; }
#order-standard_cart.mg-configure-shell .mg-cfg-os__group-title {
    font-family: 'Orbitron', 'Cairo', sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(0, 168, 232, 0.78);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0, 168, 232, 0.22);
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__group.is-hidden { display: none; }

/* Family tabs (Linux / Windows) */
#order-standard_cart.mg-configure-shell .mg-cfg-os__tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
    flex-wrap: wrap;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid rgba(0, 168, 232, 0.24);
    background: rgba(0, 30, 46, 0.5);
    color: rgba(207, 233, 255, 0.72);
    font-family: 'Orbitron', 'Cairo', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 190ms, border-color 190ms, color 190ms;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__tab:hover {
    border-color: rgba(0, 168, 232, 0.45);
    color: #e8f6ff;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__tab.is-active {
    background: linear-gradient(90deg, #005b87, #007ea7 60%, #1460b8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 168, 232, 0.28);
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__tab-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    opacity: 0.75;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
}

#order-standard_cart.mg-configure-shell .mg-cfg-os-card {
    position: relative;
    background: linear-gradient(180deg, rgba(0, 32, 50, 0.62), rgba(0, 22, 36, 0.62));
    border: 1px solid rgba(0, 168, 232, 0.22);
    border-radius: 14px;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: #cfe9ff;
    cursor: pointer;
    transition: transform 190ms cubic-bezier(.22,.61,.36,1), border-color 190ms, box-shadow 190ms, background 190ms;
    font: inherit;
    width: 100%;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 168, 232, 0.55);
    box-shadow: 0 8px 22px rgba(0, 168, 232, 0.16);
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card:focus { outline: none; }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card:focus-visible {
    border-color: #00a8e8;
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.28);
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card.is-selected {
    border-color: #00a8e8;
    box-shadow: 0 0 0 1px rgba(0, 168, 232, 0.5), 0 12px 30px rgba(0, 168, 232, 0.22);
    background: linear-gradient(180deg, rgba(0, 60, 90, 0.55), rgba(0, 30, 50, 0.55));
}

#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 168, 232, 0.14);
    color: #00a8e8;
    margin-bottom: 12px;
    flex: 0 0 auto;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon svg { width: 22px; height: 22px; }

/* Per-OS brand colors so icons aren't all the same color */
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--ubuntu  { color: #E95420; background: rgba(233, 84, 32, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--debian  { color: #D70A53; background: rgba(215, 10, 83, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--rocky   { color: #51B04F; background: rgba(81, 176, 79, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--alma    { color: #1AC8DB; background: rgba(26, 200, 219, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--windows { color: #00A4EF; background: rgba(0, 164, 239, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--linux   { color: #FFC700; background: rgba(255, 199, 0, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__icon--server  { color: #00a8e8; background: rgba(0, 168, 232, 0.14); }
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__brand {
    font-family: 'Poppins', 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: #e8f6ff;
    line-height: 1.1;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__ver {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #00a8e8;
    margin-top: 3px;
    letter-spacing: 0.04em;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__desc {
    font-size: 12.5px;
    color: rgba(207, 233, 255, 0.72);
    line-height: 1.45;
    margin-top: 10px;
    min-height: 34px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card__cta {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(0, 168, 232, 0.10);
    color: #00a8e8;
    font-family: 'Orbitron', 'Cairo', sans-serif;
    font-size: 11px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    border: 1px solid rgba(0, 168, 232, 0.32);
    transition: background 190ms, color 190ms, border-color 190ms;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card:hover .mg-cfg-os-card__cta {
    background: rgba(0, 168, 232, 0.18);
}
#order-standard_cart.mg-configure-shell .mg-cfg-os-card.is-selected .mg-cfg-os-card__cta {
    background: linear-gradient(90deg, #005b87, #007ea7 60%, #1460b8);
    color: #fff;
    border-color: transparent;
}

#order-standard_cart.mg-configure-shell .mg-cfg-os__foot {
    font-size: 12px;
    color: rgba(174, 242, 255, 0.55);
    margin: 22px 4px 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
#order-standard_cart.mg-configure-shell .mg-cfg-os__foot i { color: #00a8e8; }

/* RTL */
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-os-card {
    text-align: right;
    align-items: flex-end;
}
html[dir="rtl"] #order-standard_cart.mg-configure-shell .mg-cfg-os__hint a { margin-left: 0; margin-right: 4px; }
