/* YCW Portal RC35: complete order-flow visual consistency, including checkout.
   Presentation only. Original WHMCS forms, classes, visibility controls, gateway
   fields, CAPTCHA and result handlers remain unchanged. */
#order-ycw-of {
  --ycw35-bg:#f5f7fb;
  --ycw35-surface:#ffffff;
  --ycw35-raised:#f6f9fd;
  --ycw35-field:#ffffff;
  --ycw35-ink:#182c49;
  --ycw35-muted:#6b7d97;
  --ycw35-border:#dfe7f2;
  --ycw35-accent:#ff5900;
  --ycw35-shadow:0 12px 30px rgba(17,36,65,.045);
  color:var(--ycw35-ink);
}
#order-ycw-of .cart-body {min-width:0;}
#order-ycw-of :is(.view-cart-items,.view-cart-tabs,.order-summary,.product-configurable-options,.domain-selection-options,.field-container,.ycw-checkout-payment-main,.ycw-checkout-summary-card) {
  border-radius:16px;
}
#order-ycw-of :is(.secondary-cart-body,.secondary-cart-sidebar,.ycw-checkout-payment-main,.ycw-checkout-summary-card,.cart-item,.config-option,.row > [class*='col-']) {min-width:0;}
#order-ycw-of :is(.product-info,.view-cart-items .item-title,.view-cart-items .item-price,.wdes-product-heading-options,.ycw-checkout-summary-line strong) {overflow-wrap:anywhere;}
#order-ycw-of :is(.form-group,.field-container,.ycw-checkout-summary-lines,.ycw-checkout-payment-layout) {max-width:100%;}
#order-ycw-of :is(.form-control,select,input,textarea) {max-width:100%;}
#order-ycw-of .btn:focus-visible {outline:3px solid #ff8c46!important;outline-offset:2px;}
#order-ycw-of .ycw-checkout-payment-layout > * {min-width:0;}
#order-ycw-of .ycw-checkout-summary-actions .checkbox-inline,
#order-ycw-of .ycw-checkout-summary-actions .checkbox-inline a {overflow-wrap:anywhere;}
#order-ycw-of #paymentGatewaysContainer label.radio-inline {position:relative;min-width:0;overflow-wrap:anywhere;}
#order-ycw-of #paymentGatewaysContainer label.radio-inline:has(input[type='radio']:checked) {
  border-color:#ff9d69!important;
  box-shadow:inset 0 0 0 1px #ff9d69!important;
  background:#fff2e9!important;
}
#order-ycw-of .ycw-checkout-summary-card .ycw-checkout-total-value {overflow-wrap:anywhere;}
#order-ycw-of :is(.cc-input-container,.apply-credit-container,.marketing-email-optin,.account-select-container) {border-radius:14px;}
#order-ycw-of #frmCheckout .marketing-email-optin {padding:20px 22px;}
#order-ycw-of #frmCheckout .marketing-email-optin :is(h4,p,label) {max-width:100%;overflow-wrap:anywhere;}
#order-ycw-of .ycw-domain-config-page .wdes-product-heading-options {overflow-wrap:anywhere;}
#order-ycw-of .addon-products .panel-addon {height:100%;border-radius:14px;overflow:hidden;}
#order-ycw-of .addon-products .panel-addon .panel-body {height:100%;}
#order-ycw-of .addon-products .panel-addon .panel-body > label {display:flex;align-items:flex-start;gap:9px;}
#order-ycw-of .domain-selection-options .option label {max-width:100%;overflow-wrap:anywhere;}
#order-ycw-of .wdes-server-field-container :is(input,select) {max-width:100%;}
#order-ycw-of .view-cart-items .item .item-title {line-height:1.45;}
#order-ycw-of .view-cart-tabs :is(.promo,.calcTaxes,.tab-content) {min-width:0;}
#order-ycw-of :is(.alert-danger,.alert-warning,.alert-success,.alert-info) {border-radius:12px;overflow-wrap:anywhere;}

/* Dark palette is scoped to this orderform. The background canvas stays flat:
   only actual cards/panels are raised. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of {
  --ycw35-bg:#101a2a;
  --ycw35-surface:#1c2a3e;
  --ycw35-raised:#23334a;
  --ycw35-field:#152235;
  --ycw35-ink:#edf4ff;
  --ycw35-muted:#b4c3d8;
  --ycw35-border:#3b4e68;
  --ycw35-accent:#ff8b47;
  --ycw35-shadow:0 14px 30px rgba(0,0,0,.14);
  color:var(--ycw35-ink)!important;
  color-scheme:dark;
  background:transparent!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.header-lined,.cart-body,.secondary-cart-body,.secondary-cart-sidebar,.ycw-checkout-payment-layout) {
  background:transparent!important;
  color:var(--ycw35-ink)!important;
  box-shadow:none!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  .ycw-checkout-page form#frmCheckout.wdes-block,.ycw-checkout-payment-main,.ycw-checkout-summary-card,
  .view-cart-items,.view-cart-tabs,.view-cart-tabs .tab-content,.order-summary,
  .product-configurable-options,.domain-selection-options,.field-container,.account-select-container,
  .product-info,.panel,.panel-default,.panel-addon,.checkout-security-msg,
  .ycw-domain-config-page .wdes-server-field-container
) {background:var(--ycw35-surface)!important;color:var(--ycw35-ink)!important;border-color:var(--ycw35-border)!important;box-shadow:var(--ycw35-shadow)!important;}
/* Use the card surface for structural containers only when they carry a panel.
   Do not give each generic form-group a separate colored background. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  .view-cart-items-header,.view-cart-items .item,.view-cart-tabs .nav-tabs,
  .product-configurable-options .form-group,.domain-selection-options .option,
  .ycw-checkout-summary-lines,.ycw-checkout-summary-actions,.ycw-checkout-summary-head,
  .ycw-checkout-total,.ycw-checkout-trust,#frmCheckout .row
) {border-color:var(--ycw35-border)!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .view-cart-items .item {
  background:var(--ycw35-surface)!important;
  color:var(--ycw35-ink)!important;
  border-bottom:1px solid var(--ycw35-border)!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .view-cart-items .item:nth-child(even) {background:#202f44!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.view-cart-items-header,.ycw-checkout-summary-head,.order-summary .subtotal,.order-summary .total-due-today) {
  background:var(--ycw35-raised)!important;
  color:var(--ycw35-ink)!important;
  border-color:var(--ycw35-border)!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  .view-cart-items .item-title,.view-cart-items .item-price,.view-cart-items .item-price > span:first-child,
  .view-cart-items .item-group,.order-summary h2,.order-summary h3,.order-summary .amt,
  .order-summary .product-name,.order-summary .summary-totals,
  .ycw-checkout-summary-head h2,.ycw-checkout-summary-line strong,.ycw-checkout-total-value,
  .ycw-checkout-total-value strong,.ycw-checkout-section-head h2,.ycw-checkout-payment-main h3,
  .product-info,.wdes-product-heading-options,.wdes-product-heading-options span,
  .sub-heading,.sub-heading > span,.sub-heading .primary-bg-color
) {color:var(--ycw35-ink)!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  .view-cart-items .item-domain,.view-cart-items small,.view-cart-items .cycle,
  .order-summary .subtotal,.order-summary .recurring-totals,.order-summary .product-group,
  .ycw-checkout-summary-line,.ycw-checkout-total-label,.ycw-checkout-trust,
  .ycw-checkout-section-head p,.field-help-text,.help-block,.form-text,
  .account-select-container .address .small,.product-info p,.wdes-server-field-container p,
  .config-option p,.domain-selection-options .option p
) {color:var(--ycw35-muted)!important;}
/* Account selection and payment method options are visibly selectable cards. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  .account-select-container div.account,.domain-selection-options .option,.wdes-item-option,
  .config-option,.existing-cc-grid .existing-cc-card,#paymentGatewaysContainer label.radio-inline,
  .apply-credit-container,.cc-input-container,#frmCheckout .marketing-email-optin
) {background:var(--ycw35-raised)!important;color:var(--ycw35-ink)!important;border-color:var(--ycw35-border)!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  .account-select-container div.account.active,.domain-selection-options .option.option-selected,
  .wdes-item-option.option-selected,#paymentGatewaysContainer label.radio-inline:has(input[type='radio']:checked)
) {background:#332c2d!important;color:#f8f2eb!important;border-color:#ff985c!important;box-shadow:inset 0 0 0 1px #a96542!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of #paymentGatewaysContainer label.radio-inline:hover {background:#2c3545!important;border-color:#b27855!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  #frmCheckout .radio-inline,#frmCheckout .checkbox-inline,#frmCheckout label,
  #frmConfigureDomains label,#frmConfigureProduct label,#frmProductDomain label,
  .account-select-container .radio-inline,.domain-selection-options label,
  #paymentGatewaysContainer label.radio-inline,.panel-addon label
) {color:var(--ycw35-ink)!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.panel-addon .panel-price,.summary-totals .pull-right,.total-due-today .amt) {color:#ffab78!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(
  input.form-control,select.form-control,textarea.form-control,input.field,
  input[type='text'],input[type='email'],input[type='password'],input[type='tel'],
  input[type='number'],input[type='search'],input[type='date'],select,textarea,
  .select2-container .select2-selection,.select2-dropdown,.multiselect-container
) {background:var(--ycw35-field)!important;color:var(--ycw35-ink)!important;border-color:#4a5d78!important;box-shadow:none!important;}
/* Extremely specific older checkout input rules otherwise force light backgrounds. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of.ycw-checkout-page .form-group.prepend-icon > :is(input.field.form-control,select.field.form-control,textarea.field.form-control),
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of.ycw-checkout-page .form-group.prepend-icon :is(.intl-tel-input,.iti) input.field.form-control,
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of.ycw-checkout-page .form-group.prepend-icon > .input-group input.field.form-control {
  background:var(--ycw35-field)!important;color:var(--ycw35-ink)!important;border-color:#4a5d78!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of.ycw-checkout-page .form-group.prepend-icon > label.field-icon i {color:#adbfda!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(input,textarea)::placeholder {color:#acbdd2!important;opacity:1;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(input,select,textarea):focus-visible {outline:2px solid #ff985c!important;outline-offset:1px;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.select2-results__option,.multiselect-container li a,.dropdown-menu > li > a) {color:#e8f1fd!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.select2-results__option:hover,.multiselect-container li a:hover,.dropdown-menu > li > a:hover) {background:#334761!important;color:#fff!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.ycw-checkout-payment-main,.ycw-checkout-summary-card) {background:#1c2a3e!important;border-color:#3b4e68!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .ycw-checkout-summary-card .ycw-checkout-summary-icon {background:#392b23!important;color:#ff9a61!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .ycw-checkout-trust i {color:#77e0ad!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .checkout-security-msg {color:#ffdeac!important;background:#3c3025!important;border-color:#83613c!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .checkout-security-msg > i {color:#ffcb81!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(#btnCompleteOrder,#checkout,.btn-primary,.btn-success) {background:#f45a09!important;border-color:#f45a09!important;color:#fff!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(#btnCompleteOrder,#checkout,.btn-primary,.btn-success):hover {background:#dd5107!important;border-color:#dd5107!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.btn-default,.btn-secondary,.btn-light,.btn-outline-secondary,.btn-info) {background:#2b3d56!important;border-color:#526680!important;color:#edf5ff!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.alert-info,.alert-warning,.alert-danger,.alert-success) :is(p,li,strong,span) {color:inherit!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.panel-addon,.config-option,.product-info,.field-container) :is(p,small,span) {color:var(--ycw35-muted);}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.product-info strong,.panel-addon strong,.config-option strong,.field-container strong) {color:var(--ycw35-ink)!important;}
/* Section titles should never become independent blue panels. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.sub-heading,.sub-heading span,.wdes-product-heading-options,.wdes-product-heading-options span) {background:transparent!important;box-shadow:none!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of .wdes-product-heading-options {border-bottom:1px solid var(--ycw35-border)!important;}
/* Keep the native gateway payload and embedded iframe intact. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of #paymentGatewayInput {color:var(--ycw35-ink)!important;}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.gateway-errors,.checkout-error-feedback) {background:#3d262e!important;border-color:#925466!important;color:#ffc2c8!important;}

@media(max-width:991px) {
  #order-ycw-of .secondary-cart-body,#order-ycw-of .secondary-cart-sidebar {width:100%!important;max-width:100%!important;float:none!important;padding-right:0!important;}
  #order-ycw-of .ycw-checkout-payment-layout {grid-template-columns:minmax(0,1fr)!important;}
  #order-ycw-of .ycw-checkout-summary-card {position:static!important;}
}
@media(max-width:767px) {
  /* Exactly one responsive gutter across all ordering steps. */
  body.ycw-portal #order-ycw-of {width:100%;min-width:0;max-width:100%;padding:0!important;}
  body.ycw-portal #order-ycw-of > .row {margin:0!important;min-width:0;}
  body.ycw-portal #order-ycw-of > .row > .cart-body {min-width:0;max-width:100%!important;width:100%!important;margin:0!important;padding:0 16px!important;float:none!important;}
  #order-ycw-of .cart-body > :is(.row,.header-lined) {min-width:0;}
  #order-ycw-of .secondary-cart-body,#order-ycw-of .secondary-cart-sidebar {padding:0!important;}
  #order-ycw-of .ycw-checkout-payment-main,#order-ycw-of .ycw-checkout-summary-card {padding:17px!important;}
  #order-ycw-of .ycw-checkout-payment-layout {gap:16px!important;margin-top:22px!important;}
  #order-ycw-of #paymentGatewaysContainer > .text-center {grid-template-columns:minmax(0,1fr)!important;}
  #order-ycw-of #paymentGatewaysContainer label.radio-inline {min-height:52px;}
  #order-ycw-of .ycw-checkout-payment-main > * {max-width:100%;min-width:0;}
  #order-ycw-of .ycw-checkout-summary-actions #btnCompleteOrder {min-height:52px;}
  #order-ycw-of .account-select-container {margin-right:0!important;margin-left:0!important;}
  #order-ycw-of .account-select-container > [class*='col-'] {min-width:0!important;max-width:100%!important;}
  #order-ycw-of .view-cart-items .item > .row {display:block!important;}
  #order-ycw-of .view-cart-items .item > .row > [class*='col-'] {width:100%!important;max-width:100%!important;float:none!important;}
  #order-ycw-of .view-cart-tabs .nav-tabs {display:flex;flex-wrap:wrap;gap:5px;}
  #order-ycw-of .view-cart-tabs .nav-tabs > li {max-width:100%;}
  #order-ycw-of .view-cart-tabs .nav-tabs > li > a {white-space:normal!important;}
  #order-ycw-of .addon-products > [class*='col-'] {max-width:100%;}
  #order-ycw-of .wdes-server-field-container > [class*='col-'] {min-width:0;}
  #order-ycw-of .ycw-checkout-summary-line {gap:8px;}
  #order-ycw-of #frmCheckout .marketing-email-optin {padding:16px;}
  #order-ycw-of .ycw-checkout-summary-head h2 {font-size:20px!important;}
  #order-ycw-of .ycw-checkout-section-head h2 {font-size:22px!important;}
}
@media(max-width:360px) {
  body.ycw-portal #order-ycw-of > .row > .cart-body {padding:0 12px!important;}
  #order-ycw-of .ycw-checkout-payment-main,#order-ycw-of .ycw-checkout-summary-card {padding:14px!important;}
}
@media print {
  html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of :is(.cart-body,.view-cart-items,.order-summary,.ycw-checkout-payment-main,.ycw-checkout-summary-card,.panel,.product-info) {background:#fff!important;color:#1a2d49!important;border-color:#dce5ee!important;box-shadow:none!important;}
}
/* Root cart row has no Bootstrap gutter columns beside the cart body. Prevent
   the old negative .row margin from creating horizontal scroll at tablet width. */
#order-ycw-of > .row {margin-left:0!important;margin-right:0!important;min-width:0;}
#order-ycw-of > .row > .cart-body {min-width:0;}
/* The final checkout action is a full-width primary CTA, never a tiny inline button. */
#order-ycw-of.ycw-checkout-page .ycw-checkout-summary-actions #btnCompleteOrder {
  display:flex!important;
  width:100%!important;
  min-height:54px;
  align-items:center;
  justify-content:center;
  gap:9px;
  white-space:normal;
}
@media(max-width:767px) {
  /* Prevent mixed Bootstrap versions or external row utilities from producing
     two cramped half-width fields on phones. */
  #order-ycw-of.ycw-checkout-page #frmCheckout .row > .col-sm-6,
  #order-ycw-of.ycw-checkout-page #frmCheckout .row > .col-sm-4,
  #order-ycw-of.ycw-checkout-page #frmCheckout .row > .col-sm-3,
  #order-ycw-of.ycw-checkout-page #containerExistingUserSignin .row > .col-sm-6,
  #order-ycw-of.ycw-domain-config-page #frmConfigureDomains > .row > .col-sm-6 {
    width:100%!important;flex:0 0 100%;max-width:100%!important;
  }
}
/* No giant highlighted rectangle around all checkout fields in dark mode.
   Only actual choice, payment and totals cards receive a raised surface. */
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of.ycw-checkout-page #frmCheckout {
  background:transparent!important;border-color:transparent!important;box-shadow:none!important;
}
html[data-ycw-theme='dark'] body.ycw-portal #order-ycw-of.ycw-checkout-page .ycw-checkout-summary-head {
  background:transparent!important;
  border-bottom:1px solid var(--ycw35-border)!important;
}
