/* ============================================================
   CloudPedia Hosting Cart - Configure Product (#254).
   Style-only. Page skin copied from the VPS Configure Product skin
   (the Configure Product block of the VPS Order Form stylesheet) with the scope renamed to
   #order-standard_cart.cphc-conf (the root class emitted by this Order
   Form's configureproduct.tpl). Section cards come from the shared
   templates/cloudpedia/assets/css/cp-configure.css (root class cpcf).
   Not carried over: the VPS operating-system card grid and the JS-driven
   Continue loading state (both VPS-only).

   Specificity: the Parent (cloudx_cart.css) answers with up to 5 IDs
   (Continue) and two IDs (#frmConfigureProduct boxes); the Continue,
   billing and summary overrides below carry the same long ID chain as
   the VPS skin. No important-flag escape hatches.

   Every rule is scoped to .cphc-conf. The Choose a Domain rules that
   used to be section 2 here moved to the shared
   templates/cloudpedia/assets/css/cp-choose-domain.css (#262).
   ============================================================ */

/* ---------- 1. Configure Product ---------- */

/* Page canvas (white, matching the catalog). */
#order-standard_cart.cphc-conf {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--cp-gray-900, #111827);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0 auto;
  max-width: 1360px;
  padding: 22px 24px 40px;
  width: 100%;
}

/* Full-width content: drop the in-content category sidebar like Cart Review. */
#order-standard_cart.cphc-conf .cart-sidebar,
#order-standard_cart.cphc-conf .sidebar-categories-collapsed {
  display: none;
}
#order-standard_cart.cphc-conf .cart-body {
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Header title card. */
#order-standard_cart.cphc-conf .header-lined {
  background: var(--cp-surface, #FFFFFF);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
  margin: 0 0 18px;
  padding: 22px 24px;
}
#order-standard_cart.cphc-conf .header-lined h1 {
  color: var(--cp-gray-900, #111827);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}
#order-standard_cart.cphc-conf .header-lined p {
  color: var(--cp-gray-600, #5B6472);
  font-size: 15px;
  margin: 4px 0 0;
}

/* Two-column layout: main 2fr + summary 1fr. */
#order-standard_cart.cphc-conf #frmConfigureProduct > .row {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  margin: 0;
}
#order-standard_cart.cphc-conf #frmConfigureProduct > .row::before,
#order-standard_cart.cphc-conf #frmConfigureProduct > .row::after {
  display: none;
}
#order-standard_cart.cphc-conf .secondary-cart-body,
#order-standard_cart.cphc-conf .secondary-cart-sidebar {
  margin: 0;
  min-width: 0;
  padding: 0;
  width: auto;
}

/* Section cards (border, radius, shadow, margin, card titles) live in the
   shared templates/cloudpedia/assets/css/cp-configure.css (#253). */
#order-standard_cart.cphc-conf .product-info p {
  color: var(--cp-gray-600, #5B6472);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
#order-standard_cart.cphc-conf .product-info p + p {
  margin-top: 3px;
}

/* Billing-cycle cards: restyle native li, keep radio + actionCall. */
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart li {
  align-items: center;
  background: var(--cp-surface, #FFFFFF);
  border: 1px solid #E4E8EF;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-height: 64px;
  padding: 10px 12px;
  position: relative;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart li:hover {
  border-color: #C7D2E4;
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart li.active {
  background: var(--cp-primary-50, #EFF5FF);
  border-color: var(--cp-primary-300, #BCD3F8);
  box-shadow: 0 0 0 1px var(--cp-primary-300, #BCD3F8);
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart input[type="radio"] {
  cursor: pointer;
  height: 100%;
  left: 0;
  margin: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart li:focus-within {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart strong {
  color: var(--cp-gray-900, #111827);
  font-size: 15px;
  font-weight: 600;
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart li.active strong {
  color: var(--cp-primary-500, #2563EB);
}
#order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart span {
  color: var(--cp-gray-600, #5B6472);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Form controls: hostname, selects, qty. */
#order-standard_cart.cphc-conf .form-group {
  margin-bottom: 0;
}
#order-standard_cart.cphc-conf .form-group label {
  color: var(--cp-gray-900, #111827);
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
#order-standard_cart.cphc-conf .form-control {
  background: var(--cp-surface, #FFFFFF);
  border: 1px solid #E4E8EF;
  border-radius: 6px;
  box-shadow: none;
  color: var(--cp-gray-900, #111827);
  font-size: 15px;
  height: 40px;
}
#order-standard_cart.cphc-conf .form-control:hover {
  border-color: #C7D2E4;
}
#order-standard_cart.cphc-conf .form-control:focus {
  border-color: var(--cp-primary-500, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}
#order-standard_cart.cphc-conf select.form-control {
  background-color: var(--cp-primary-50, #EFF5FF);
  cursor: pointer;
  max-width: 340px;
}
#order-standard_cart.cphc-conf .field-help-text {
  color: var(--cp-gray-600, #5B6472);
  font-size: 12px;
}
#order-standard_cart.cphc-conf .product-configurable-options .row,
#order-standard_cart.cphc-conf .field-container .row {
  margin: 0;
}

/* Help note: blue/neutral, native contact link kept. */
#order-standard_cart.cphc-conf .alert-warning.info-text-sm {
  align-items: center;
  background: var(--cp-primary-50, #EFF5FF);
  border: 0;
  border-left: 3px solid var(--cp-primary-500, #2563EB);
  border-radius: 12px;
  color: var(--cp-gray-900, #111827);
  display: flex;
  font-size: 14px;
  gap: 10px;
  justify-content: space-between;
  margin: 0 0 20px;
  padding: 14px 18px;
}
#order-standard_cart.cphc-conf .alert-warning.info-text-sm .alert-link {
  background: var(--cp-primary-500, #2563EB);
  border-radius: 4px;
  color: #FFFFFF;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  text-decoration: none;
}
#order-standard_cart.cphc-conf .alert-warning.info-text-sm .alert-link:hover {
  background: var(--cp-primary-600, #1D4ED8);
  text-decoration: none;
}

/* Order Summary card + dynamic totals container. */
#order-standard_cart.cphc-conf #orderSummary .order-summary {
  background: var(--cp-surface, #FFFFFF);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
  padding: 20px 22px;
}
#order-standard_cart.cphc-conf #orderSummary .order-summary h2 {
  color: var(--cp-gray-900, #111827);
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 8px;
}
#order-standard_cart.cphc-conf #orderSummary .summary-container {
  color: var(--cp-gray-600, #5B6472);
  font-size: 13.5px;
}
#order-standard_cart.cphc-conf #orderSummary .summary-container [class*="total"],
#order-standard_cart.cphc-conf #orderSummary .summary-container strong {
  color: var(--cp-gray-900, #111827);
  font-variant-numeric: tabular-nums;
}
#order-standard_cart.cphc-conf #btnCompleteProductConfig {
  align-items: center;
  background: var(--cp-primary-500, #2563EB);
  border: 1px solid var(--cp-primary-500, #2563EB);
  border-radius: 6px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  min-height: 44px;
  width: 100%;
}
#order-standard_cart.cphc-conf #btnCompleteProductConfig:hover {
  background: var(--cp-primary-600, #1D4ED8);
  border-color: var(--cp-primary-600, #1D4ED8);
}
#order-standard_cart.cphc-conf #btnCompleteProductConfig:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: none;
}
#order-standard_cart.cphc-conf #btnCompleteProductConfig:active {
  transform: translateY(1px);
}

@media (max-width: 820px) {
  #order-standard_cart.cphc-conf #frmConfigureProduct > .row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  #order-standard_cart.cphc-conf {
    padding: 16px 14px 32px;
  }
  #order-standard_cart.cphc-conf .header-lined h1 {
    font-size: 26px;
  }
  #order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart {
    grid-template-columns: minmax(0, 1fr);
  }
  #order-standard_cart.cphc-conf select.form-control {
    max-width: none;
  }
  #order-standard_cart.cphc-conf .alert-warning.info-text-sm {
    align-items: stretch;
    flex-direction: column;
  }
  #order-standard_cart.cphc-conf .alert-warning.info-text-sm .alert-link {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  #order-standard_cart.cphc-conf ul.selectBillingCycleCloudCart li,
  #order-standard_cart.cphc-conf #btnCompleteProductConfig {
    transition: none;
  }
}

/* ============================================================
   Fix round for #201: the Parent answers these three with up to
   5 IDs (pink #FC5185 Continue, purple #2f1c6a product title,
   35%-capped summary amounts), so the Child must out-specify
   with a longer ID chain instead of an escape hatch. The earlier low-spec
   Continue block above keeps layout props; color/border/radius
   are authoritative here.
   ============================================================ */

/* Blue Continue: beats the parent 5-ID pink rule + its :hover. */
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer #orderSummary button#btnCompleteProductConfig {
  background-color: var(--cp-primary-500, #2563EB);
  border-color: var(--cp-primary-500, #2563EB);
  border-radius: 6px;
  color: #FFFFFF;
}
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer #orderSummary button#btnCompleteProductConfig:hover,
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer #orderSummary button#btnCompleteProductConfig:focus {
  background-color: var(--cp-primary-600, #1D4ED8);
  border-color: var(--cp-primary-600, #1D4ED8);
  color: #FFFFFF;
}

/* Billing options: neutralize any inherited sizing, let text wrap. */
#order-standard_cart.cphc-conf #frmConfigureProduct ul.selectBillingCycleCloudCart li {
  float: none;
  margin: 0;
  max-width: none;
  min-width: 0;
  width: auto;
}
#order-standard_cart.cphc-conf #frmConfigureProduct ul.selectBillingCycleCloudCart li strong,
#order-standard_cart.cphc-conf #frmConfigureProduct ul.selectBillingCycleCloudCart li span {
  max-width: 100%;
  overflow-wrap: break-word;
}

/* Order Summary rows: undo the parent 71%/35% squeeze, keep amounts whole. */
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer div#orderSummary {
  background: transparent;
  box-shadow: none;
  padding: 0;
}
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer .order-summary .clearfix {
  align-items: baseline;
  gap: 12px;
}
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer div#orderSummary.order-summary .summary-container span.pull-left.float-left {
  flex: 1 1 auto;
  margin: 0;
  max-width: none;
  min-width: 0;
  width: auto;
}
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer div#orderSummary.order-summary .summary-container span.pull-right.float-right {
  flex: 0 0 auto;
  margin-left: auto;
  max-width: none;
  text-align: right;
  white-space: nowrap;
  width: auto;
}

/* Full-bleed canvas behind the 940px box (same :has() device the
   catalog uses): no Parent body background peeks around the card. */
#main-body.body-background-cloudx.in_shopping_cart:has(#order-standard_cart.cphc-conf) {
  background-color: #ffffff;
}

/* #203: keep every summary amount on one line, whatever row shape
   WHMCS renders inside #producttotal (some rows lack pull-right). */
#order-standard_cart.cphc-conf #frmConfigureProduct #scrollingPanelContainer div#orderSummary.order-summary .summary-container .clearfix > span:last-child {
  white-space: nowrap;
}

/* Parent accents the VPS skin never had to touch (hosting Products carry
   addons, ranged quantity sliders and iCheck radios/checkboxes). Each rule
   carries two IDs plus classes so it beats the Parent's two-ID selector. */
#order-standard_cart.cphc-conf #frmConfigureProduct .product-info ul li b,
#order-standard_cart.cphc-conf #frmConfigureProduct .addon-products .panel-price {
  color: var(--cp-gray-900, #0F172A);
}
#order-standard_cart.cphc-conf #frmConfigureProduct .addon-products .panel-addon .panel-add {
  background-color: var(--cp-primary-500, #2563EB);
  border-color: var(--cp-primary-500, #2563EB);
  border-radius: 6px;
}
#order-standard_cart.cphc-conf #frmConfigureProduct .addon-promo-container .description p a {
  color: var(--cp-primary-500, #2563EB);
}
/* ion.rangeSlider (quantity options): the Parent tints the tooltips pink. */
#order-standard_cart.cphc-conf .irs-from,
#order-standard_cart.cphc-conf .irs-to,
#order-standard_cart.cphc-conf .irs-single,
#order-standard_cart.cphc-conf .irs-bar,
#order-standard_cart.cphc-conf .irs-bar-edge {
  background: var(--cp-primary-500, #2563EB);
}
#order-standard_cart.cphc-conf .irs-from::after,
#order-standard_cart.cphc-conf .irs-to::after,
#order-standard_cart.cphc-conf .irs-single::after {
  border-top-color: var(--cp-primary-500, #2563EB);
}

/* iCheck: kill the hue-rotated sprite (purple) and draw the control from
   tokens, as the shared checkout stylesheet does. State lives on the
   wrapper (.checked), never on the input. */
#order-standard_cart.cphc-conf .iradio_square-blue,
#order-standard_cart.cphc-conf .icheckbox_square-blue {
  background-color: var(--cp-surface, #FFFFFF);
  background-image: none;
  border: 2px solid var(--cp-gray-600, #475569);
  box-sizing: border-box;
  filter: none;
  height: 18px;
  position: relative;
  vertical-align: middle;
  width: 18px;
}
#order-standard_cart.cphc-conf .iradio_square-blue {
  border-radius: 50%;
}
#order-standard_cart.cphc-conf .icheckbox_square-blue {
  border-radius: 4px;
}
#order-standard_cart.cphc-conf .iradio_square-blue.hover,
#order-standard_cart.cphc-conf .icheckbox_square-blue.hover {
  border-color: var(--cp-primary-300, #93C5FD);
}
#order-standard_cart.cphc-conf .iradio_square-blue.checked,
#order-standard_cart.cphc-conf .icheckbox_square-blue.checked {
  border-color: var(--cp-primary-500, #2563EB);
}
#order-standard_cart.cphc-conf .iradio_square-blue.checked::after {
  background: var(--cp-primary-500, #2563EB);
  border-radius: 50%;
  content: "";
  inset: 2px;
  position: absolute;
}
#order-standard_cart.cphc-conf .icheckbox_square-blue.checked::after {
  border-bottom: 2px solid var(--cp-primary-500, #2563EB);
  border-right: 2px solid var(--cp-primary-500, #2563EB);
  content: "";
  height: 8px;
  left: 4px;
  position: absolute;
  top: 0;
  transform: rotate(45deg);
  width: 4px;
}
