/* anyhk3d cart pages (view cart, checkout, configure, complete): the anyhk 3D theme look over WHMCS's standard_cart.
   Only colours, radii and spacing change; every id and form field WHMCS's cart scripts rely on is left as it is. */

body[data-template="viewcart"], body[data-template="checkout"] { --ah-panel-w: min(1080px, 66vw); }

#order-standard_cart { font-family: var(--ah-body); color: var(--ah-ink); }
#order-standard_cart .header-lined h1, #order-standard_cart h1 { font-family: var(--ah-display); font-weight: 800; font-size: 24px; }

/* cart items */
#order-standard_cart .view-cart-items-header {
    background: var(--ah-sunk); color: var(--ah-ink-3); border-radius: 12px 12px 0 0; font-size: 12px; font-weight: 600;
    padding: 10px 14px; border: 1px solid var(--ah-line); border-bottom: 0;
}
#order-standard_cart .view-cart-items {
    border: 1px solid var(--ah-line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--ah-solid);
    border-bottom: 1px solid var(--ah-line) !important;
}
#order-standard_cart .view-cart-items .item { border-bottom: 1px solid var(--ah-line); padding: 14px; }
#order-standard_cart .view-cart-items .item:last-child { border-bottom: 0; }
#order-standard_cart .item-title { font-family: var(--ah-display); font-weight: 700; font-size: 16px; color: var(--ah-ink); }
#order-standard_cart .item-group { color: var(--ah-ink-3); font-size: 12px; }
#order-standard_cart .item-domain { color: var(--ah-brand-deep); font-family: var(--ah-mono); font-size: 12px; }
#order-standard_cart .item small, #order-standard_cart .item .small { color: var(--ah-ink-2); }
#order-standard_cart .item-price .cost { font: 700 16px var(--ah-mono); color: var(--ah-ink); }
#order-standard_cart .item-price .cycle { color: var(--ah-ink-3); font-size: 12px; }
#order-standard_cart .btn-remove-from-cart { color: var(--ah-ink-3); }
#order-standard_cart .btn-remove-from-cart:hover { color: var(--ah-bad); }
#order-standard_cart .empty-cart .btn, #order-standard_cart #btnEmptyCart {
    background: var(--ah-solid); color: var(--ah-bad) !important; border: 1px solid #F1C2C5; border-radius: 9px;
}

/* promo code / tax tabs */
#order-standard_cart .view-cart-tabs .nav-tabs { border-bottom-color: var(--ah-line); }
#order-standard_cart .view-cart-tabs .nav-tabs .nav-link { border-radius: 9px 9px 0 0; color: var(--ah-ink-2); font-size: 13px; }
#order-standard_cart .view-cart-tabs .nav-tabs .nav-link.active { color: var(--ah-brand-deep); font-weight: 600; }
#order-standard_cart .view-cart-tabs .tab-content { background: var(--ah-solid); border: 1px solid var(--ah-line); border-top: 0; border-radius: 0 0 12px 12px; padding: 14px; }

/* order summary */
#order-standard_cart .order-summary {
    background: var(--ah-solid); border: 1px solid var(--ah-line); border-radius: 14px; overflow: hidden; box-shadow: none;
}
#order-standard_cart .order-summary h2 {
    background: var(--ah-sunk); color: var(--ah-ink); font-family: var(--ah-display); font-size: 16px; font-weight: 700;
    padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--ah-line);
}
#order-standard_cart .order-summary .summary-container { background: var(--ah-solid); padding: 14px 16px; }
#order-standard_cart .order-summary .subtotal, #order-standard_cart .order-summary .bordered-totals { color: var(--ah-ink-2); font-size: 13px; }
#order-standard_cart .order-summary .total-due-today .amt { font: 700 26px var(--ah-mono); color: var(--ah-ink); }
#order-standard_cart .order-summary .total-due-today span:not(.amt) { color: var(--ah-ink-3); font-size: 12px; }
#order-standard_cart .btn-checkout {
    background: var(--ah-brand) !important; border-color: var(--ah-brand) !important; border-radius: 10px; font-weight: 700;
    box-shadow: 0 6px 16px rgba(47, 91, 234, .25); color: #fff !important;
}
#order-standard_cart .btn-checkout:hover { background: var(--ah-brand-deep) !important; }
#order-standard_cart .btn-continue-shopping { color: var(--ah-ink-3) !important; font-size: 12px; }

/* checkout form */
#order-standard_cart .sub-heading { border-top-color: var(--ah-line); }
#order-standard_cart .sub-heading span, #order-standard_cart .sub-heading .primary-bg-color {
    background: var(--ah-panel) !important; color: var(--ah-ink) !important; font-family: var(--ah-display); font-weight: 700;
}
#order-standard_cart .field, #order-standard_cart .form-control { border-radius: 9px; border-color: var(--ah-line); }
#order-standard_cart .prepend-icon .field-icon { color: var(--ah-ink-3); }
#order-standard_cart .already-registered { background: var(--ah-brand-soft); border-radius: 12px; border: 0; }
#order-standard_cart .account-select-container .account, #order-standard_cart .cc-input-container .paymethod-info { border-radius: 12px; border-color: var(--ah-line); }
#order-standard_cart .account-select-container .account.active { border-color: var(--ah-brand); background: var(--ah-brand-soft); }
#order-standard_cart .btn-success, #order-standard_cart #btnCompleteOrder {
    background: var(--ah-brand); border-color: var(--ah-brand); border-radius: 10px; font-weight: 700;
}
#order-standard_cart .alert { border-radius: 12px; border: 0; }

@media (max-width: 1199.98px) {
    body[data-template="viewcart"], body[data-template="checkout"] { --ah-panel-w: min(1080px, calc(100vw - 32px)); }
}

/* card gateways on checkout (checkout.tpl #creditCardInputFields; shown / hidden by standard_cart's scripts) */
.ah .ah-cc { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); }
.ah .ah-cc.w-hidden, .ah .ah-cc .w-hidden { display: none !important; }
.ah .ah-cc .cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ah .ah-cc .cc-grid .cc-number { grid-column: 1 / -1; }
.ah .ah-cc .cc-cvv { max-width: 160px; }
.ah .ah-cc .field-error-msg { display: none; font-size: 12px; color: var(--bad); }
.ah .ah-cc .form-group { margin: 0; }
.ah .ah-cc .has-error input { border-color: var(--bad); }
.ah .ah-cc #existingCardsContainer { display: flex; flex-direction: column; gap: 6px; }
.ah .ah-cc .paymethod-info, .ah .ah-cc #existingCardsContainer label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
#paymentGatewayInput:empty { display: none; }
#paymentGatewayInput { margin-top: 12px; }

/* service renewals (service-renewals.tpl): list on the left, the order summary on the right */
.ah .renew-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.ah .renew-list { display: flex; flex-direction: column; gap: 10px; }
.ah .renew-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-solid); display: flex; flex-direction: column; gap: 6px; }
.ah .renew-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ah .renew-head > div { display: flex; flex-direction: column; min-width: 0; }
.ah .renew-head .mono { font-size: 12px; overflow-wrap: anywhere; }
.ah .renew-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.ah .renew-foot .div-renewal-period-label { display: block; }
.ah .renew-item .addon-renewals { border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.ah .renew-summary { position: sticky; top: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--sunk); }
.ah .renew-summary h2 { margin-bottom: 8px; }
.ah .renew-summary #producttotal { margin-bottom: 12px; font-size: 13px; }
.ah .renew-summary .loader { display: none; }
.ah .head-row .btn-row { align-items: center; }
/* the search box matches the small ghost button beside it: same height, radius, border and type size */
.ah #serviceRenewalFilter { width: 220px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid #C9D6FA; font-size: 13px; background: var(--panel-solid); }
.ah #serviceRenewalFilter::placeholder { color: var(--ink-3); }
.ah #hideShowServiceRenewalButton .to-hide { display: none; } /* the cannot-renew items start hidden */
.ah .btn-add-renewal-to-cart .to-add { display: inline-flex; align-items: center; gap: 6px; }
.ah .ah-spin { width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: ah-spin .8s linear infinite; }
@media (max-width: 960px) { .ah .renew-layout { grid-template-columns: 1fr; } .ah .renew-summary { position: static; } }
.ah .addon-renewals .service-renewal, .ah .addon-renewals .service-renewal:nth-child(even) { background: var(--panel-solid); padding: 10px 12px; }
.ah .renew-summary #producttotal { display: flex; flex-direction: column; gap: 6px; }
.ah .renew-summary .line { display: flex; justify-content: space-between; gap: 10px; }
.ah .renew-summary .renew-line > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.ah .renew-summary .renew-line small { font-size: 11px; overflow-wrap: anywhere; }
.ah .renew-summary .renew-line > span:last-child { white-space: nowrap; display: flex; gap: 6px; align-items: flex-start; }
.ah .renew-summary .renew-remove { color: var(--bad); font-size: 16px; line-height: 1; text-decoration: none; }
.ah .renew-summary .total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 8px; }
.ah .renew-summary .total b { font: 700 18px var(--font-mono); }

/* System icons in the configure page's system picker (anyhk_Cart's systemIcons map, e.g. "fa-brands fa-ubuntu").
   They draw from the theme's own copy of the Font Awesome 6 Free brands font (SIL OFL 1.1, css/webfonts) under a
   name of its own, not from the Font Awesome the WHMCS install loads: WHMCS 8 ships Font Awesome 5, which knows
   neither the fa-brands prefix nor the Debian logo. */
@font-face { font-family: "HeroTheme Brands"; font-style: normal; font-weight: 400; font-display: block; src: url("webfonts/fa-brands-400.woff2") format("woff2"); }
.ah .sys-info i { font-family: "HeroTheme Brands" !important; font-weight: 400 !important; font-style: normal; display: inline-block; width: 1.25em; text-align: center; line-height: 1; -webkit-font-smoothing: antialiased; }
.ah .sys-info i::before { content: "\f17c"; } /* Linux, for anything unlisted */
.ah .sys-info i.fa-debian::before { content: "\e60b"; }
.ah .sys-info i.fa-ubuntu::before { content: "\f7df"; }
.ah .sys-info i.fa-centos::before { content: "\f789"; }
.ah .sys-info i.fa-windows::before { content: "\f17a"; }
.ah .sys-info i.fa-fedora::before { content: "\f798"; }
.ah .sys-info i.fa-redhat::before { content: "\f7bc"; }
.ah .sys-info i.fa-freebsd::before { content: "\f3a4"; }
.ah .sys-info i.fa-rockrms::before { content: "\f3e9"; }
