/*
 * Standard Cart Parsi
 * RTL and visual refinements for the WHMCS Standard Cart child order form.
 * The parent templates remain untouched and continue to receive WHMCS updates.
 */

#order-standard_cart {
    --cart-slate-950: #20323a;
    --cart-slate-900: #29414b;
    --cart-slate-800: #38545f;
    --cart-teal-700: #126f80;
    --cart-teal-600: #16899a;
    --cart-teal-100: #eaf7f9;
    --cart-page: #f4f6f8;
    --cart-surface: #ffffff;
    --cart-soft: #f8fafb;
    --cart-border: #dce5e8;
    --cart-muted: #718087;
    direction: rtl;
    color: #2d4149;
    text-align: right;
}

#order-standard_cart a,
#order-standard_cart a:hover,
#order-standard_cart a:focus,
#order-standard_cart a:active,
#order-standard_cart .btn-link,
#order-standard_cart .btn-link:hover,
#order-standard_cart .btn-link:focus {
    text-decoration: none !important;
}

#order-standard_cart .row {
    direction: rtl;
}

#order-standard_cart .pull-left,
#order-standard_cart .float-left {
    float: right !important;
}

#order-standard_cart .pull-right,
#order-standard_cart .float-right {
    float: left !important;
}

#order-standard_cart .text-left {
    text-align: right !important;
}

#order-standard_cart .text-right {
    text-align: left !important;
}

#order-standard_cart .header-lined {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

#order-standard_cart .header-lined h1,
#order-standard_cart .font-size-36 {
    margin-bottom: 0;
    color: var(--cart-slate-950);
    font-size: 1.65rem !important;
    font-weight: 750;
    line-height: 1.45;
}

#order-standard_cart .header-lined p {
    margin-top: .4rem;
    color: var(--cart-muted);
}

/* Keep the two-column order layout balanced and give the product area more presence. */
#order-standard_cart .cart-sidebar {
    padding-left: 12px;
    padding-right: 0;
}

#order-standard_cart .cart-body {
    padding-right: 12px;
    padding-left: 0;
}

#order-standard_cart .cart-sidebar .panel,
#order-standard_cart .cart-sidebar .card {
    overflow: hidden;
    border: 1px solid var(--cart-border);
    border-radius: 12px;
    background: var(--cart-surface);
    box-shadow: 0 7px 22px rgba(32, 50, 58, .06);
}

#order-standard_cart .cart-sidebar .panel-heading,
#order-standard_cart .cart-sidebar .card-header {
    position: relative;
    padding: 11px 14px;
    border-bottom: 1px solid #e8eef0;
    background: #fff;
    color: var(--cart-slate-900);
    font-size: .9rem;
    font-weight: 700;
}

#order-standard_cart .cart-sidebar .panel-heading::before,
#order-standard_cart .cart-sidebar .card-header::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--cart-teal-600);
    content: "";
}

#order-standard_cart .cart-sidebar .panel-heading i,
#order-standard_cart .cart-sidebar .card-header i {
    color: var(--cart-teal-600);
}

#order-standard_cart .cart-sidebar .list-group-item,
#order-standard_cart .cart-sidebar .list-group a,
#order-standard_cart .cart-sidebar .panel-body a {
    color: #40535b;
}

#order-standard_cart .cart-sidebar .list-group-item,
#order-standard_cart .cart-sidebar .panel-body > a,
#order-standard_cart .cart-sidebar .panel-body > div > a {
    min-height: 38px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-color: #edf1f2;
    font-size: .82rem;
}

#order-standard_cart .cart-sidebar .list-group-item:hover,
#order-standard_cart .cart-sidebar .list-group-item:focus,
#order-standard_cart .cart-sidebar .list-group-item.active,
#order-standard_cart .cart-sidebar a.active {
    background: var(--cart-teal-100);
    color: var(--cart-teal-700);
}

/* Product cards are wider, calmer, and no longer look like stock Bootstrap panels. */
#order-standard_cart .products > .row {
    margin-right: -10px;
    margin-left: -10px;
}

#order-standard_cart .products > .row > [class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
}

#order-standard_cart .products .product {
    position: relative;
    min-height: 260px;
    margin: 0 0 20px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--cart-border) !important;
    border-radius: 13px !important;
    background: var(--cart-surface);
    box-shadow: 0 8px 24px rgba(32, 50, 58, .055);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#order-standard_cart .products .product:hover {
    border-color: #c8dce0 !important;
    box-shadow: 0 13px 30px rgba(32, 50, 58, .09);
    transform: translateY(-2px);
}

#order-standard_cart .products .product header {
    padding: 15px 18px 13px;
    border-bottom: 1px solid #e8eef0;
    background: #f8fafb !important;
    color: var(--cart-slate-950) !important;
    font-size: 1rem;
    font-weight: 750;
    text-align: right;
}

#order-standard_cart .products .product header .qty {
    color: var(--cart-muted);
    font-size: .73rem;
    font-weight: 500;
}

#order-standard_cart .products .product .product-desc {
    padding: 14px 18px 8px;
    color: #52656d;
    text-align: right;
}

#order-standard_cart .products .product .product-desc p {
    margin-bottom: .8rem;
    color: #53666e;
    line-height: 1.7;
}

#order-standard_cart .products .product .product-desc ul {
    margin-bottom: 0;
    padding-right: 18px;
    padding-left: 0;
}

#order-standard_cart .products .product .product-desc li {
    margin-bottom: .3rem;
    line-height: 1.55;
}

#order-standard_cart .products .product footer {
    min-height: 82px;
    padding: 13px 18px 15px;
    border-top: 1px solid #edf1f2;
    background: #fcfdfd;
}

#order-standard_cart .products .product .product-pricing {
    color: var(--cart-muted);
    font-size: .75rem;
    line-height: 1.45;
    text-align: right;
}

#order-standard_cart .products .product .product-pricing .price {
    color: var(--cart-slate-950);
    font-size: 1.12rem;
    font-weight: 800;
}

#order-standard_cart .products .product .btn-order-now {
    min-height: 40px;
    padding: .52rem 1rem;
    border: 1px solid var(--cart-teal-600);
    border-radius: 9px;
    background: var(--cart-teal-600);
    color: #fff;
    font-weight: 700;
    box-shadow: none;
}

#order-standard_cart .products .product .btn-order-now:hover,
#order-standard_cart .products .product .btn-order-now:focus {
    border-color: var(--cart-teal-700);
    background: var(--cart-teal-700);
    color: #fff;
}

/* Forms, option groups, and configuration steps use the same surface language. */
#order-standard_cart .form-control,
#order-standard_cart .custom-select,
#order-standard_cart select,
#order-standard_cart textarea,
#order-standard_cart input[type="text"],
#order-standard_cart input[type="password"],
#order-standard_cart input[type="number"] {
    min-height: 40px;
    border: 1px solid #d7e0e3;
    border-radius: 8px;
    background: #fff;
    color: #2d4149;
    text-align: right;
    box-shadow: none;
}

#order-standard_cart input[type="email"],
#order-standard_cart input[type="url"],
#order-standard_cart input[type="tel"],
#order-standard_cart input[name*="domain" i],
#order-standard_cart input[name*="hostname" i],
#order-standard_cart input[name*="ip" i] {
    direction: ltr;
    text-align: left;
}

#order-standard_cart .form-control:focus,
#order-standard_cart .custom-select:focus,
#order-standard_cart select:focus,
#order-standard_cart textarea:focus,
#order-standard_cart input:focus {
    border-color: rgba(22, 137, 154, .68);
    box-shadow: 0 0 0 3px rgba(22, 137, 154, .09);
}

#order-standard_cart .domain-selection-options,
#order-standard_cart .product-info,
#order-standard_cart .field-container,
#order-standard_cart .panel,
#order-standard_cart .card,
#order-standard_cart .order-summary,
#order-standard_cart .summary-container {
    border-color: var(--cart-border);
    border-radius: 11px;
}

#order-standard_cart .domain-selection-options,
#order-standard_cart .product-info,
#order-standard_cart .field-container {
    background: #fff;
}

#order-standard_cart .sub-heading {
    margin-top: 24px;
    margin-bottom: 14px;
    border-color: #dfe8ea;
    color: var(--cart-slate-900);
}

#order-standard_cart .sub-heading span,
#order-standard_cart .sub-heading .primary-bg-color {
    background: var(--cart-page) !important;
    color: var(--cart-slate-900);
    font-weight: 700;
}

#order-standard_cart .btn {
    border-radius: 8px;
    font-weight: 650;
}

#order-standard_cart .btn-primary,
#order-standard_cart .btn-success {
    border-color: var(--cart-teal-600);
    background: var(--cart-teal-600);
    color: #fff;
}

#order-standard_cart .btn-primary:hover,
#order-standard_cart .btn-primary:focus,
#order-standard_cart .btn-success:hover,
#order-standard_cart .btn-success:focus {
    border-color: var(--cart-teal-700);
    background: var(--cart-teal-700);
    color: #fff;
}

#order-standard_cart .btn-default,
#order-standard_cart .btn-light {
    border-color: #d8e1e4;
    background: #fff;
    color: #455961;
}

#order-standard_cart .btn-default:hover,
#order-standard_cart .btn-default:focus,
#order-standard_cart .btn-light:hover,
#order-standard_cart .btn-light:focus {
    border-color: #c5d8dc;
    background: #f5fafb;
    color: var(--cart-teal-700);
}

#order-standard_cart .alert {
    border-radius: 9px;
}

/* Order summary becomes a stable card rather than a floating stock panel. */
#order-standard_cart .secondary-cart-sidebar .order-summary,
#order-standard_cart #orderSummary .order-summary {
    overflow: hidden;
    border: 1px solid var(--cart-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(32, 50, 58, .06);
}

#order-standard_cart .order-summary h2,
#order-standard_cart #orderSummary h2 {
    margin: 0;
    padding: 13px 16px;
    border-bottom: 1px solid #e8eef0;
    background: #f8fafb;
    color: var(--cart-slate-950);
    font-size: 1.05rem !important;
    font-weight: 750;
}

#order-standard_cart .summary-container {
    padding: 14px 16px;
}

/* Compact checkout tables while preserving parent markup and behavior. */
#order-standard_cart table {
    text-align: right;
}

#order-standard_cart table th,
#order-standard_cart table td {
    border-color: #e8eef0;
}

#order-standard_cart table th {
    color: #40535b;
    font-weight: 700;
}

@media (min-width: 992px) {
    #order-standard_cart .products .col-md-6:only-child {
        flex: 0 0 72%;
        max-width: 72%;
    }
}

@media (max-width: 991.98px) {
    #order-standard_cart .cart-sidebar,
    #order-standard_cart .cart-body {
        padding-right: 15px;
        padding-left: 15px;
    }

    #order-standard_cart .products .product {
        min-height: 0;
    }
}

@media (max-width: 767.98px) {
    #order-standard_cart .header-lined h1,
    #order-standard_cart .font-size-36 {
        font-size: 1.35rem !important;
    }

    #order-standard_cart .products .product header,
    #order-standard_cart .products .product .product-desc,
    #order-standard_cart .products .product footer {
        padding-right: 14px;
        padding-left: 14px;
    }
}

/* --------------------------------------------------------------------------
 * V4 visual refinements
 * Stronger borders and a more distinct order-flow visual hierarchy.
 * -------------------------------------------------------------------------- */
#order-standard_cart {
    --cart-navy-950: #173744;
    --cart-navy-900: #204654;
    --cart-blue-700: #2e6f91;
    --cart-blue-100: #edf5fa;
    --cart-teal-700: #0f7888;
    --cart-teal-600: #0f8fa1;
    --cart-teal-100: #e9f7f9;
    --cart-page: #eef3f6;
    --cart-border: #c5d5dc;
    --cart-border-strong: #afc6cf;
}

#order-standard_cart .cart-sidebar .panel,
#order-standard_cart .cart-sidebar .card,
#order-standard_cart .products .product,
#order-standard_cart .domain-selection-options,
#order-standard_cart .product-info,
#order-standard_cart .field-container,
#order-standard_cart .order-summary,
#order-standard_cart .summary-container {
    border-color: var(--cart-border-strong) !important;
}

#order-standard_cart .cart-sidebar .panel-heading::before,
#order-standard_cart .cart-sidebar .card-header::before {
    height: 4px;
    background: linear-gradient(90deg, var(--cart-teal-600), var(--cart-blue-700));
}

#order-standard_cart .products .product {
    border-top: 3px solid #cee3e9 !important;
    box-shadow: 0 9px 24px rgba(23, 55, 68, .065);
}

#order-standard_cart .products .product:hover {
    border-color: #9dbdc8 !important;
    border-top-color: var(--cart-teal-600) !important;
}

#order-standard_cart .products .product header {
    border-bottom-color: #d7e4e9;
    background: #eef5f8 !important;
    color: var(--cart-navy-950) !important;
}

#order-standard_cart .products .product footer {
    border-top-color: #dbe6ea;
    background: #f7fafc;
}

#order-standard_cart .products .product .btn-order-now {
    border-color: var(--cart-blue-700);
    background: var(--cart-blue-700);
}

#order-standard_cart .products .product .btn-order-now:hover,
#order-standard_cart .products .product .btn-order-now:focus {
    border-color: #255d79;
    background: #255d79;
}

#order-standard_cart .form-control,
#order-standard_cart .custom-select,
#order-standard_cart select,
#order-standard_cart textarea,
#order-standard_cart input[type="text"],
#order-standard_cart input[type="password"],
#order-standard_cart input[type="number"] {
    border-color: var(--cart-border);
}

#order-standard_cart .form-control:hover,
#order-standard_cart .custom-select:hover,
#order-standard_cart select:hover,
#order-standard_cart textarea:hover,
#order-standard_cart input:hover {
    border-color: #a9c2cb;
}
