/* =============================================================
   MOSALAM ORDER FORM — css/custom.css
   The new product grid uses .mosalam-plan-card / .mosalam-plan-grid
   defined in templates/mosalam/css/partials/_catalog.css. The rules
   below cover the order form chrome (layout, sidebar, cart rows,
   checkout fields, alerts, complete page).
   ============================================================= */

/* ── Page wrap ──────────────────────────────────────────────── */
#order-standard_cart {
  background-color: transparent;
  font-family: var(--ms-font-body, 'Inter', system-ui, sans-serif);
  color: var(--ms-text, #0d1b2a);
}

/* ── Two-column layout (sidebar + body) ─────────────────────── */
.mosalam-order__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ms-space-6, 3.2rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .mosalam-order__layout {
    grid-template-columns: 26rem minmax(0, 1fr);
  }
}

.mosalam-order__sidebar.cart-sidebar {
  background-color: var(--ms-surface, #ffffff);
  border: 1px solid var(--ms-border, rgba(0,48,87,0.10));
  border-radius: var(--ms-radius-lg, 2rem);
  padding: var(--ms-space-3, 1.2rem) 0;
  position: relative;
}

@media (max-width: 61.99rem) {
  .mosalam-order__sidebar { display: none; }
}

.mosalam-order__body { min-width: 0; }

/* ── Sidebar categories ─────────────────────────────────────── */
.sidebar-categories-header h3,
.sidebar-categories-header .sidebar-category-title,
.sidebar-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ms-text-muted, #475569);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  padding: var(--ms-space-3, 1.2rem) var(--ms-space-4, 1.6rem);
  margin: 0;
}

.sidebar-category-item a,
.category-link,
.sidebar-categories-content li a {
  display: block;
  padding: 0.9rem var(--ms-space-4, 1.6rem);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ms-text-soft, #2e3a4a);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color var(--ms-transition-fast, 120ms), color var(--ms-transition-fast, 120ms);
}

.sidebar-category-item a:hover,
.sidebar-category-item.active a,
.sidebar-categories-content li.active a {
  background-color: var(--ms-primary-faint, #f0f4fa);
  color: var(--ms-primary, #003057);
  border-left-color: var(--ms-primary, #003057);
  text-decoration: none;
}

.mosalam-is-rtl .sidebar-category-item a,
.mosalam-is-rtl .category-link {
  border-left: none;
  border-right: 3px solid transparent;
}

.mosalam-is-rtl .sidebar-category-item a:hover,
.mosalam-is-rtl .sidebar-category-item.active a {
  border-right-color: var(--ms-primary, #003057);
}

/* ── Page heading ───────────────────────────────────────────── */
.mosalam-order__header {
  margin-bottom: var(--ms-space-6, 3.2rem);
  padding-bottom: var(--ms-space-5, 2.4rem);
  border-bottom: 1px solid var(--ms-border, rgba(0,48,87,0.10));
}

.mosalam-order__title {
  font-size: clamp(2.8rem, 3.2vw, 4rem);
  font-weight: 700;
  color: var(--ms-text, #0d1b2a);
  line-height: 1.15;
  margin: 0;
}

.mosalam-order__tagline {
  font-size: var(--ms-type-body-lg, 1.8rem);
  color: var(--ms-text-muted, #475569);
  margin: var(--ms-space-3, 1.2rem) 0 0;
  max-width: 64rem;
}

/* ── Order card description ─────────────────────────────────── */
.mosalam-order-card__desc {
  font-size: 1.4rem;
  color: var(--ms-text-muted, #475569);
  line-height: 1.65;
  margin: 0;
}

/* Order card feature list — slight nudge for value strong */
.mosalam-plan-card .mosalam-plan-features li strong {
  color: var(--ms-text, #0d1b2a);
  font-weight: 700;
  margin-right: 0.4rem;
}

[dir="rtl"] .mosalam-plan-card .mosalam-plan-features li strong {
  margin-right: 0;
  margin-left: 0.4rem;
}

/* Order CTA shopping-cart icon spacing */
.mosalam-plan-card .mosalam-plan-cta i { margin-right: 0.8rem; }
[dir="rtl"] .mosalam-plan-card .mosalam-plan-cta i { margin-right: 0; margin-left: 0.8rem; }

/* Disabled CTA (out of stock) */
.mosalam-plan-card .mosalam-plan-cta.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Page-level products wrapper ────────────────────────────── */
.mosalam-order__products { margin-top: var(--ms-space-4, 1.6rem); }

/* ── Standard cart buttons (used outside our redesigned grid) */
#order-standard_cart .btn {
  border-radius: var(--ms-radius-pill, 999px);
  font-weight: 700;
  font-size: 1.4rem;
  padding: 1rem 2.4rem;
  transition: background-color var(--ms-transition-fast, 120ms),
              border-color var(--ms-transition-fast, 120ms),
              color var(--ms-transition-fast, 120ms);
  white-space: nowrap;
}

#order-standard_cart .btn-default,
#order-standard_cart .btn-link {
  background-color: var(--ms-surface, #ffffff);
  border: 1px solid var(--ms-border-strong, rgba(0,48,87,0.20));
  color: var(--ms-text, #0d1b2a);
  text-decoration: none;
}

#order-standard_cart .btn-default:hover {
  background-color: var(--ms-primary-faint, #f0f4fa);
  border-color: var(--ms-primary, #003057);
  color: var(--ms-primary, #003057);
}

#order-standard_cart .btn-primary,
#order-standard_cart .btn-success {
  background-color: var(--ms-primary, #003057);
  border-color:     var(--ms-primary, #003057);
  color: #ffffff;
}

#order-standard_cart .btn-primary:hover,
#order-standard_cart .btn-success:hover {
  background-color: var(--ms-primary-strong, #001B35);
  border-color:     var(--ms-primary-strong, #001B35);
  color: #ffffff;
  text-decoration: none;
}

#order-standard_cart .btn-info {
  background-color: var(--ms-highlight, #194AE4);
  border-color: var(--ms-highlight, #194AE4);
  color: #ffffff;
}

#order-standard_cart .btn-warning {
  background-color: var(--ms-gold, #FFC000);
  border-color: var(--ms-gold, #FFC000);
  color: var(--ms-on-gold, #003057);
}

/* ── Forms ─────────────────────────────────────────────────── */
#order-standard_cart .form-control {
  height: var(--ms-form-height, 4.8rem);
  border-radius: var(--ms-radius-md, 1.4rem);
  border: 1px solid var(--ms-border-strong, rgba(0,48,87,0.20));
  font-size: 1.5rem;
  color: var(--ms-form-text, #0d1b2a);
  background-color: var(--ms-form-bg, #ffffff);
  padding-inline: var(--ms-space-4, 1.6rem);
  transition: border-color var(--ms-transition-base, 220ms), box-shadow var(--ms-transition-base, 220ms);
}

#order-standard_cart .form-control:focus {
  border-color: var(--ms-primary, #003057);
  box-shadow: var(--ms-focus-ring, 0 0 0 0.3rem rgba(255,192,0,0.28));
  outline: none;
}

#order-standard_cart textarea.form-control { height: auto; padding-block: var(--ms-space-3, 1.2rem); }

#order-standard_cart label,
#order-standard_cart .control-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ms-text-soft, #2e3a4a);
  margin-bottom: 0.4rem;
}

/* ── Cart item rows ─────────────────────────────────────────── */
.view-cart-items-header {
  background-color: var(--ms-primary-faint, #f0f4fa);
  border-radius: var(--ms-radius-sm, 0.8rem);
  padding: var(--ms-space-3, 1.2rem) var(--ms-space-4, 1.6rem);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ms-text-muted, #475569);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

.view-cart-items .item {
  border-bottom: 1px solid var(--ms-border, rgba(0,48,87,0.10));
  padding: var(--ms-space-4, 1.6rem) 0;
}

.item-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ms-text, #0d1b2a);
}

/* ── Alerts ─────────────────────────────────────────────────── */
#order-standard_cart .alert {
  border-radius: var(--ms-radius-md, 1.4rem);
  font-size: 1.5rem;
}

#order-standard_cart .alert-danger  { background-color: #fdf3f2; border-color: #f5c6c3; color: #c0392b; }
#order-standard_cart .alert-success { background-color: #f0faf4; border-color: #a8e6bf; color: #1a7a4a; }
#order-standard_cart .alert-warning { background-color: #fff8e0; border-color: #ffe28a; color: #7a4a00; }
#order-standard_cart .alert-info    {
  background-color: var(--ms-primary-faint, #f0f4fa);
  border-color: var(--ms-border, rgba(0,48,87,0.10));
  color: var(--ms-primary, #003057);
}

/* ── Checkout sub-heading ───────────────────────────────────── */
.sub-heading {
  margin-bottom: var(--ms-space-4, 1.6rem);
  padding-bottom: var(--ms-space-3, 1.2rem);
  border-bottom: 2px solid var(--ms-border, rgba(0,48,87,0.10));
}

.sub-heading .primary-bg-color {
  background-color: var(--ms-primary, #003057);
  color: #ffffff;
  border-radius: var(--ms-radius-sm, 0.6rem);
  padding: 0.3rem 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Order complete page ────────────────────────────────────── */
.mosalam-order-complete {
  text-align: center;
  padding: var(--ms-space-8, 6.4rem) var(--ms-space-5, 2.4rem);
}

.mosalam-order-complete__icon {
  font-size: 6.4rem;
  color: var(--ms-gold, #FFC000);
  margin-bottom: var(--ms-space-5, 2.4rem);
}

.mosalam-order-complete__eyebrow {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ms-gold-muted, #C9A24A);
  margin-bottom: var(--ms-space-3, 1.2rem);
}

.mosalam-order-complete h1 {
  font-size: clamp(2.8rem, 4vw, 4rem);
  font-weight: 700;
  color: var(--ms-text, #0d1b2a);
  margin-bottom: var(--ms-space-4, 1.6rem);
}

.mosalam-order-complete > p {
  font-size: 1.7rem;
  color: var(--ms-text-muted, #475569);
  max-width: 56rem;
  margin: 0 auto var(--ms-space-6, 3.2rem);
}

.mosalam-order-complete .mosalam-order-complete__number {
  display: inline-flex;
  align-items: center;
  gap: var(--ms-space-3, 1.2rem);
  background-color: var(--ms-primary-faint, #f0f4fa);
  border: 1px solid var(--ms-border, rgba(0,48,87,0.10));
  border-radius: var(--ms-radius-md, 1.4rem);
  padding: var(--ms-space-4, 1.6rem) var(--ms-space-6, 3.2rem);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ms-text, #0d1b2a);
  margin: 0 auto var(--ms-space-6, 3.2rem);
}

.mosalam-order-complete .mosalam-order-complete__number strong {
  font-size: 2rem;
  color: var(--ms-primary, #003057);
}

.mosalam-order-complete .mosalam-order-complete__actions {
  display: flex;
  gap: var(--ms-space-4, 1.6rem);
  justify-content: center;
  flex-wrap: wrap;
}

.mosalam-order-complete__addons {
  margin-top: var(--ms-space-6, 3.2rem);
  text-align: left;
}

/* ── Mobile-collapsed sidebar trigger ───────────────────────── */
.sidebar-categories-collapsed {
  background-color: var(--ms-surface, #ffffff);
  border: 1px solid var(--ms-border, rgba(0,48,87,0.10));
  border-radius: var(--ms-radius-md, 1.4rem);
  padding: var(--ms-space-3, 1.2rem) var(--ms-space-4, 1.6rem);
  margin-bottom: var(--ms-space-5, 2.4rem);
}

/* ── Sidebar Nav ─────────────────────────────────────────────── */
.mosalam-order__nav-panel {
  margin-bottom: 2rem;
}
.mosalam-order__nav-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ms-text-muted, #475569);
  padding: 0 1.6rem .8rem;
  margin: 0 0 .4rem;
  border-bottom: 1px solid var(--ms-border, rgba(0,48,87,.10));
}
.mosalam-order__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mosalam-order__nav-item {
  margin: 0;
}
.mosalam-order__nav-link {
  display: block;
  padding: 1rem 1.6rem;
  color: var(--ms-text, #0d1b2a);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 140ms, border-color 140ms, color 140ms;
}
.mosalam-order__nav-link:hover {
  background: var(--ms-primary-faint, #f0f4fa);
  color: var(--ms-primary, #003057);
  text-decoration: none;
}
.mosalam-order__nav-link.is-active {
  border-left-color: var(--ms-gold, #FFC000);
  color: var(--ms-primary, #003057);
  font-weight: 600;
  background: var(--ms-primary-faint, #f0f4fa);
}
.mosalam-order__nav-link.is-disabled {
  opacity: .45;
  pointer-events: none;
  cursor: default;
}
.mosalam-order__nav-link--static {
  cursor: default;
}
.mosalam-order__nav-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--ms-gold, #FFC000);
  color: var(--ms-primary, #003057);
  margin-left: .6rem;
}
.mosalam-order__nav-body {
  padding: .8rem 1.6rem;
  font-size: 1.3rem;
  color: var(--ms-text-muted, #475569);
}
.mosalam-order__nav-footer {
  padding: .8rem 1.6rem;
  border-top: 1px solid var(--ms-border, rgba(0,48,87,.10));
}

/* ── Checkout Section Headings ───────────────────────────────── */
.mosalam-order__section-heading {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ms-primary, #003057);
  padding-bottom: .8rem;
  border-bottom: 2px solid var(--ms-gold, #FFC000);
  margin: 2.4rem 0 1.6rem;
}

/* ── Group features strip ────────────────────────────────────── */
.mosalam-order__features {
  margin-top: 3.2rem;
  padding: 2.4rem 3.2rem;
  background: var(--ms-primary-faint, #f0f4fa);
  border-radius: var(--ms-radius-md, 1.4rem);
  border: 1px solid var(--ms-border, rgba(0,48,87,.10));
}
.mosalam-order__features-heading {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ms-text-muted, #475569);
  margin: 0 0 1.6rem;
}
.mosalam-order__features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 3.2rem;
}
.mosalam-order__feature-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: 1.4rem;
  color: var(--ms-text, #0d1b2a);
}
.mosalam-order__feature-item i {
  font-size: 1.6rem;
  color: var(--ms-gold, #FFC000);
  flex-shrink: 0;
}

/* ── Cart review layout ──────────────────────────────────────── */
.mosalam-order--cart-review .mosalam-order__sidebar { display: none; }
.mosalam-order--cart-review .mosalam-order__layout  { display: block; }
.mosalam-order--cart-review .mosalam-order__body    { display: block; max-width: 100%; }

.ms-viewcart-cols {
  display: flex;
  gap: 2.4rem;
  align-items: flex-start;
}
.ms-cart-left  { flex: 1 1 0; min-width: 0; }
.ms-cart-right { flex: 0 0 36rem; }

@media (max-width: 900px) {
  .ms-viewcart-cols { flex-direction: column; }
  .ms-cart-right    { width: 100%; flex: none; }
}

/* ── Cart item card ──────────────────────────────────────────── */
.ms-cart-card {
  background: var(--ms-surface, #fff);
  border: 1px solid var(--ms-border, rgba(0,48,87,.10));
  border-radius: var(--ms-radius-md, 1.4rem);
  padding: 2rem 2.4rem;
  margin-bottom: 1.6rem;
}
.ms-cart-card__header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1rem;
}
.ms-cart-card__icon {
  font-size: 2rem;
  color: var(--ms-gold, #FFC000);
  margin-top: .2rem;
  flex-shrink: 0;
}
.ms-cart-card__name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
  margin: 0 0 .2rem;
}
.ms-cart-card__group {
  font-size: 1.2rem;
  color: var(--ms-text-muted, #475569);
}
.ms-cart-card__meta {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: .8rem;
}
.ms-cart-card__price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
  margin-bottom: .4rem;
}
.ms-cart-card__setup,
.ms-cart-card__prorata {
  font-size: 1.2rem;
  color: var(--ms-text-muted, #475569);
  display: block;
  margin-top: .2rem;
}
.ms-cart-card__domain {
  font-size: 1.3rem;
  color: var(--ms-text-muted, #475569);
  margin: .6rem 0;
}
.ms-cart-card__domain i { color: var(--ms-gold, #FFC000); margin-right: .4rem; }
.ms-cart-card__config { font-size: 1.2rem; color: var(--ms-text-muted, #475569); margin: .6rem 0; }
.ms-cart-card__credit { margin-top: .6rem; }
.ms-cart-card__addons {
  list-style: none;
  margin: .8rem 0 0;
  padding: 0;
}
.ms-cart-card__addons li {
  font-size: 1.3rem;
  color: var(--ms-text, #0d1b2a);
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .3rem 0;
}
.ms-cart-card__addons li i { color: var(--ms-gold, #FFC000); font-size: 1.2rem; }
.ms-addon-price { margin-left: auto; font-size: 1.2rem; color: var(--ms-text-muted, #475569); }
.ms-cart-card__qty-form { margin-top: .8rem; }
.ms-cart-card__actions {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.ms-remove-btn {
  font-size: 1.2rem;
  color: #c0392b;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.ms-remove-btn:hover { text-decoration: underline; }

.ms-billing-pill {
  display: inline-block;
  background: var(--ms-primary-faint, #f0f4fa);
  color: var(--ms-primary, #003057);
  border-radius: 99px;
  padding: .3rem 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}
.ms-edit-link {
  font-size: 1.2rem;
  color: var(--ms-gold, #FFC000);
  text-decoration: underline;
}

/* ── Order summary panel ─────────────────────────────────────── */
.ms-order-summary {
  background: var(--ms-surface, #fff);
  border: 1px solid var(--ms-border, rgba(0,48,87,.10));
  border-radius: var(--ms-radius-md, 1.4rem);
  overflow: hidden;
  position: sticky;
  top: 2.4rem;
}
.ms-order-summary__loader {
  text-align: center;
  padding: .8rem;
  font-size: 1.6rem;
  color: var(--ms-text-muted, #475569);
}
.ms-order-summary__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2rem;
  cursor: pointer;
  border-bottom: 1px solid var(--ms-border, rgba(0,48,87,.10));
}
.ms-order-summary__total-line {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ms-order-summary__total-amt {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
}
.ms-chevron-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--ms-text-muted, #475569);
  font-size: 1.4rem;
}
.ms-order-summary__body { padding: 1.6rem 2rem; }
.ms-order-summary__section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
  margin: 0 0 1.2rem;
}
.ms-order-summary__line {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  padding: .4rem 0;
  color: var(--ms-text, #0d1b2a);
}
.ms-order-summary__line--discount { color: #2a7a4b; }
.ms-order-summary__recurring {
  font-size: 1.2rem;
  color: var(--ms-text-muted, #475569);
  margin-top: .4rem;
  line-height: 1.8;
}
.ms-order-summary__divider {
  border: none;
  border-top: 1px solid var(--ms-border, rgba(0,48,87,.10));
  margin: 1.2rem 0;
}
.ms-order-summary__total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ms-primary, #003057);
  margin-bottom: .8rem;
}
.ms-coupon-section { margin-top: 1.2rem; }
.ms-coupon-link {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ms-primary, #003057);
  text-decoration: underline;
  cursor: pointer;
  display: block;
}
.ms-coupon-form {
  margin-top: .8rem;
  display: flex;
  gap: .8rem;
}
.ms-coupon-form input { flex: 1; font-size: 1.3rem; }
.ms-coupon-remove { font-size: 1.2rem; color: #c0392b; }
.ms-tax-estimate {
  margin-top: 1.2rem;
  font-size: 1.3rem;
}
.ms-tax-estimate summary {
  cursor: pointer;
  color: var(--ms-primary, #003057);
  font-weight: 600;
}
.ms-express-checkout {
  padding: 0 2rem;
  text-align: center;
}
.ms-express-or {
  font-size: 1.2rem;
  color: var(--ms-text-muted, #475569);
  margin: .6rem 0;
}
.ms-order-summary__cta {
  padding: 1.6rem 2rem .8rem;
}
.ms-order-summary__cta .mosalam-plan-cta {
  display: block;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.ms-continue-shopping {
  display: block;
  text-align: center;
  font-size: 1.3rem;
  color: var(--ms-text-muted, #475569);
  margin-top: .8rem;
  text-decoration: underline;
}
.ms-order-summary__mbg {
  font-size: 1.2rem;
  color: var(--ms-text-muted, #475569);
  text-align: center;
  padding: 1.2rem 2rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0;
}
.ms-order-summary__mbg i { color: var(--ms-gold, #FFC000); }

/* ── configureproduct layout ─────────────────────────────────── */
.ms-confproduct-layout {
  display: flex;
  gap: 2.4rem;
  align-items: flex-start;
}
.ms-confproduct-left  { flex: 1 1 0; min-width: 0; }
.ms-confproduct-right { flex: 0 0 34rem; }

@media (max-width: 900px) {
  .ms-confproduct-layout { flex-direction: column; }
  .ms-confproduct-right  { width: 100%; flex: none; }
}

/* ── configureproduct cards ──────────────────────────────────── */
.ms-confproduct-card {
  background: var(--ms-surface, #fff);
  border: 1px solid var(--ms-border, rgba(0,48,87,.10));
  border-radius: var(--ms-radius-md, 1.4rem);
  padding: 2rem 2.4rem;
  margin-bottom: 1.6rem;
}
.ms-confproduct-card--product {
  border-left: 4px solid var(--ms-gold, #FFC000);
}

/* ── Product identity block ──────────────────────────────────── */
.ms-confproduct-product {
  display: flex;
  align-items: flex-start;
  gap: 1.6rem;
}
.ms-confproduct-product__icon {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: var(--ms-radius-sm, .8rem);
  background: var(--ms-primary-faint, #f0f4fa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--ms-gold, #FFC000);
  flex-shrink: 0;
}
.ms-confproduct-product__eyebrow {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ms-text-muted, #475569);
  margin: 0 0 .4rem;
}
.ms-confproduct-product__name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
  margin: 0 0 .4rem;
  line-height: 1.2;
}
.ms-confproduct-product__desc {
  font-size: 1.4rem;
  color: var(--ms-text-muted, #475569);
  margin: 0;
  line-height: 1.55;
}

/* ── Section titles inside cards ─────────────────────────────── */
.ms-confproduct-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.ms-confproduct-section-title i {
  font-size: 1.4rem;
  color: var(--ms-gold, #FFC000);
}
.ms-confproduct-section-title--loose {
  margin-top: .8rem;
}
.ms-confproduct-card__desc {
  font-size: 1.4rem;
  color: var(--ms-text-muted, #475569);
  margin: 0 0 1.6rem;
  line-height: 1.55;
}
.ms-confproduct-required-note {
  font-size: 1.2rem;
  color: var(--ms-text-muted, #475569);
  margin: 0 0 1.6rem;
}
.ms-confproduct-required-note i {
  font-size: 1rem;
  color: #c0392b;
  margin-right: .2rem;
}

/* ── Billing cycle pills ─────────────────────────────────────── */
.ms-cycle-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}
.ms-cycle-pill {
  display: inline-flex;
  align-items: center;
  padding: .8rem 1.6rem;
  border-radius: 99px;
  border: 1.5px solid var(--ms-border-strong, rgba(0,48,87,.20));
  background: var(--ms-surface, #fff);
  color: var(--ms-text, #0d1b2a);
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 120ms, background 120ms, color 120ms;
  white-space: nowrap;
}
.ms-cycle-pill:hover {
  border-color: var(--ms-primary, #003057);
  color: var(--ms-primary, #003057);
}
.ms-cycle-pill.is-active {
  border-color: var(--ms-primary, #003057);
  background: var(--ms-primary, #003057);
  color: #fff;
  font-weight: 700;
}

/* ── Configurable options grid ───────────────────────────────── */
.ms-configoptions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
@media (max-width: 600px) {
  .ms-configoptions-grid { grid-template-columns: 1fr; }
}
.ms-configoption-group { display: flex; flex-direction: column; gap: 1rem; }
.ms-configoption-group--full { grid-column: 1 / -1; }
.ms-configoption-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ms-text-soft, #2e3a4a);
}

/* ── Custom radio buttons ────────────────────────────────────── */
.ms-radio-group { display: flex; flex-direction: column; gap: 1rem; }
.ms-radio-option {
  display: flex;
  align-items: center;
  gap: .8rem;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--ms-text, #0d1b2a);
}
.ms-radio-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ms-radio-option__track {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 2px solid var(--ms-border-strong, rgba(0,48,87,.30));
  background: var(--ms-surface, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 120ms;
}
.ms-radio-option__dot {
  width: .8rem;
  height: .8rem;
  border-radius: 50%;
  background: var(--ms-primary, #003057);
  opacity: 0;
  transition: opacity 120ms;
}
.ms-radio-option input[type="radio"]:checked ~ .ms-radio-option__track {
  border-color: var(--ms-primary, #003057);
}
.ms-radio-option input[type="radio"]:checked ~ .ms-radio-option__track .ms-radio-option__dot {
  opacity: 1;
}

/* ── Custom toggle (type 3 checkbox) ─────────────────────────── */
.ms-toggle-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--ms-text, #0d1b2a);
}
.ms-toggle-option input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.ms-toggle-option__switch {
  width: 4rem;
  height: 2.2rem;
  border-radius: 99px;
  background: var(--ms-border-strong, rgba(0,48,87,.20));
  position: relative;
  flex-shrink: 0;
  transition: background 150ms;
}
.ms-toggle-option__switch::after {
  content: '';
  position: absolute;
  top: .3rem;
  left: .3rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #fff;
  transition: left 150ms;
}
.ms-toggle-option input[type="checkbox"]:checked ~ .ms-toggle-option__switch {
  background: var(--ms-primary, #003057);
}
.ms-toggle-option input[type="checkbox"]:checked ~ .ms-toggle-option__switch::after {
  left: 2.1rem;
}
.ms-toggle-option__text { line-height: 1.4; }

/* ── Quantity row (type 4, no slider) ────────────────────────── */
.ms-qty-row { display: flex; align-items: center; gap: 1rem; }
.ms-qty-row .form-control-qty { max-width: 10rem; }
.ms-qty-unit {
  font-size: 1.4rem;
  color: var(--ms-text-muted, #475569);
  white-space: nowrap;
}

/* ── Metrics list ────────────────────────────────────────────── */
.ms-metrics-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.ms-metrics-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.4rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--ms-border, rgba(0,48,87,.08));
}
.ms-metrics-list__item:last-child { border-bottom: none; }
.ms-metrics-list__name { font-weight: 600; color: var(--ms-text, #0d1b2a); }
.ms-metrics-list__price { color: var(--ms-text-muted, #475569); text-align: right; }

/* ── Addon cards ─────────────────────────────────────────────── */
.ms-addons-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ms-addon-card {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.6rem 2rem;
  border: 1.5px solid var(--ms-border, rgba(0,48,87,.12));
  border-radius: var(--ms-radius-md, 1.4rem);
  background: var(--ms-surface, #fff);
  cursor: pointer;
  transition: border-color 140ms, background 140ms;
  position: relative;
}
.ms-addon-card:hover { border-color: var(--ms-primary, #003057); }
.ms-addon-card.is-selected {
  border-color: var(--ms-primary, #003057);
  background: var(--ms-primary-faint, #f0f4fa);
}
.ms-addon-card__checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.ms-addon-card__check {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 2px solid var(--ms-border-strong, rgba(0,48,87,.25));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 140ms, border-color 140ms;
  font-size: 1rem;
  color: transparent;
}
.ms-addon-card.is-selected .ms-addon-card__check {
  background: var(--ms-primary, #003057);
  border-color: var(--ms-primary, #003057);
  color: #fff;
}
.ms-addon-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.ms-addon-card__name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ms-text, #0d1b2a);
}
.ms-addon-card__desc {
  font-size: 1.3rem;
  color: var(--ms-text-muted, #475569);
  line-height: 1.45;
}
.ms-addon-card__price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ms-primary, #003057);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Help link ───────────────────────────────────────────────── */
.ms-confproduct-help {
  font-size: 1.3rem;
  color: var(--ms-text-muted, #475569);
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.ms-confproduct-help a {
  color: var(--ms-primary, #003057);
  text-decoration: underline;
}
.ms-confproduct-help i { color: var(--ms-gold, #FFC000); }

/* ── Order summary CTA (confproduct) ─────────────────────────── */
.ms-confproduct-cta-wrap { padding: 0 2rem 2rem; }
.ms-confproduct-cta {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

/* ── Checkout field labels ───────────────────────────────────── */
.ms-field-label {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ms-text-soft, #2e3a4a);
  margin-bottom: .8rem;
  line-height: 1.3;
}

/* Required star */
.ms-req {
  color: #c0392b;
  font-weight: 700;
  margin-left: .2rem;
  font-size: 1.3rem;
}

/* Optional badge */
.ms-optional-tag {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ms-text-muted, #475569);
  background: var(--ms-primary-faint, #f0f4fa);
  border-radius: 99px;
  padding: .15rem .7rem;
  margin-left: .5rem;
  vertical-align: middle;
  line-height: 1.5;
}

/* Required fields note at top of registration form */
.ms-co-required-note {
  font-size: 1.3rem;
  color: var(--ms-text-muted, #475569);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ms-co-required-note .ms-req { margin-left: 0; }

/* Icon span inside prepend-icon (replaces the label.field-icon) */
#order-standard_cart .prepend-icon > span.field-icon {
  position: absolute;
  top: 50%;
  left: 1.4rem;
  transform: translateY(-50%);
  color: var(--ms-text-muted, #475569);
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 4;
}

/* ── Checkout toggle row ─────────────────────────────────────── */
.ms-co-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.ms-co-intro-text {
  font-size: 1.5rem;
  color: var(--ms-text-muted, #475569);
  margin: 0;
}
.ms-co-toggle-btns { display: flex; gap: .8rem; flex-shrink: 0; }

/* ── Total due banner ────────────────────────────────────────── */
.ms-co-total-banner {
  font-size: 1.6rem;
  border-radius: var(--ms-radius-md, 1.4rem) !important;
  margin-bottom: 1.6rem;
}

/* ── Secure connection message ───────────────────────────────── */
.ms-co-secure-msg {
  margin-top: 2rem;
  border-radius: var(--ms-radius-md, 1.4rem);
  font-size: 1.4rem;
}

/* ── Spacing corrections ─────────────────────────────────────── */

/* form-group bottom gap inside our mosalam cards */
.ms-confproduct-card .form-group,
#order-standard_cart .ms-confproduct-card .form-group {
  margin-bottom: 2rem;
}
.ms-confproduct-card .form-group:last-child {
  margin-bottom: 0;
}

/* section title needs top breathing room when it follows other content */
.ms-confproduct-card > * + .ms-confproduct-section-title,
.ms-confproduct-card .ms-confproduct-required-note + .form-group,
.ms-confproduct-card .ms-confproduct-card__desc + .form-group {
  margin-top: .4rem;
}

/* section title when NOT the first child in a card (e.g. follows a required note) */
* + .ms-confproduct-section-title.ms-confproduct-section-title--loose {
  margin-top: 2rem;
}

/* radio-inline and radio labels in payment/credit area need vertical gap */
#order-standard_cart .radio,
#order-standard_cart .radio-inline {
  margin-top: .8rem;
  margin-bottom: .8rem;
}
#order-standard_cart .radio + .radio,
#order-standard_cart .radio-inline + .radio-inline {
  margin-top: .6rem;
}
#order-standard_cart .radio label,
#order-standard_cart .radio-inline label {
  padding-left: 2rem;
  font-size: 1.4rem;
  cursor: pointer;
}
#order-standard_cart .radio input[type="radio"],
#order-standard_cart .radio-inline input[type="radio"] {
  margin-left: -2rem;
}

/* checkbox-inline (ToS) gap */
#order-standard_cart .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  font-size: 1.4rem;
  cursor: pointer;
  padding-left: 0;
}
#order-standard_cart .checkbox-inline input[type="checkbox"] {
  position: static;
  margin: 0;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  cursor: pointer;
}

/* cycle pills — ensure bottom gap before next section */
.ms-cycle-pills { margin-top: .4rem; }

/* ── Checkout / configureproduct grid column row-gap fix ─────── */
/* Every .form-group inside a .col-* is the sole child, so it matches
   .ms-confproduct-card .form-group:last-child and gets margin-bottom:0.
   This override restores the row gap for grid-wrapped form fields. */
.ms-confproduct-card [class*="col-"] .form-group,
.ms-confproduct-card [class*="col-"] .form-group:last-child { margin-bottom: 2rem; }
/* Also give the columns themselves bottom margin so rows that wrap have
   vertical breathing room regardless of inner markup. */
.ms-confproduct-card .row > [class*="col-"] { margin-bottom: 1.6rem; }
.ms-confproduct-card .row:last-child > [class*="col-"]:last-child { margin-bottom: 0; }

/* ── Billing cycle dropdown ──────────────────────────────────── */
.ms-billing-select-wrap {
  position: relative;
  display: block;
}
.ms-billing-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--ms-surface, #fff);
  border: 2px solid var(--ms-border, rgba(0,48,87,.15));
  border-radius: var(--ms-radius-sm, .8rem);
  color: var(--ms-primary, #003057);
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1.1rem 4rem 1.1rem 1.4rem;
  width: 100%;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.ms-billing-select:focus {
  outline: none;
  border-color: var(--ms-primary, #003057);
  box-shadow: 0 0 0 3px rgba(0,48,87,.12);
}
.ms-billing-select-chevron {
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ms-primary, #003057);
  font-size: 1.2rem;
  pointer-events: none;
}

/* ── Domain page — gap between the two sibling forms ─────────── */
/* #frmProductDomain (radio options) and #frmProductDomainSelections
   (search results + continue btn) are adjacent block elements.
   Add top margin so results area breathes away from the options. */
#frmProductDomainSelections { margin-top: 2.4rem; }

/* ── Domain SLD/TLD input — tighter gutter ───────────────────── */
/* Bootstrap default 15px gutter creates a wide gap between the
   domain-name input (.col-xs-9 / .col-9) and the extension input
   (.col-xs-3 / .col-3). Reduce to 4px each side. */
#order-standard_cart .domains-row > .col-xs-9,
#order-standard_cart .domains-row > .col-9  { padding-right: .4rem; }
#order-standard_cart .domains-row > .col-xs-3,
#order-standard_cart .domains-row > .col-3  { padding-left: .4rem; }

/* ── Domain option spacing ───────────────────────────────────── */
#order-standard_cart .domain-selection-options .option {
  margin-bottom: 1.6rem;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--ms-border, rgba(0,48,87,.08));
}
#order-standard_cart .domain-selection-options .option:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
#order-standard_cart .domain-selection-options .option > label {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ms-primary, #003057);
  cursor: pointer;
  margin-bottom: 0;
  padding: .2rem 0;
}
#order-standard_cart .domain-selection-options .option > label input[type="radio"] {
  position: static;
  margin: 0;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  cursor: pointer;
  accent-color: var(--ms-primary, #003057);
}

/* ── Domain option groups — initial hidden state ─────────────── */
/* standard_cart/style.css provides this rule but is never loaded in
   mosalam-order (common.tpl skips all.min.css). Without it every
   .domain-input-group renders visible on page load; WHMCS JS only
   toggles them on radio change, not on init. */
#order-standard_cart .domain-input-group { display: none; margin-top: 1.2rem; }

/* ── RTL ────────────────────────────────────────────────────── */
.mosalam-is-rtl #order-standard_cart { direction: rtl; }

/* ── Domain checker status messages ─────────────────────────── */
/* standard_cart/style.css is never loaded in mosalam-order; these
   classes are written by WHMCS JS into the DOM and must be defined. */

/* Error / unavailable — red */
#order-standard_cart .domain-checker-unavailable,
#order-standard_cart .domain-checker-invalid,
#order-standard_cart .domain-error,
#order-standard_cart .domain-unavailable,
#order-standard_cart .domain-tld-unavailable,
#order-standard_cart .domain-checker-result-headline.domain-checker-unavailable {
  color: #c0392b;
  font-weight: 600;
}

/* Available / eligible — green */
#order-standard_cart .domain-checker-available,
#order-standard_cart .domain-checker-result-headline.domain-checker-available {
  color: #1a7a4a;
  font-weight: 600;
}

/* Dark-mode overrides — brighter tones readable on dark surface */
:root[data-theme="dark"] #order-standard_cart .domain-checker-unavailable,
:root[data-theme="dark"] #order-standard_cart .domain-checker-invalid,
:root[data-theme="dark"] #order-standard_cart .domain-error,
:root[data-theme="dark"] #order-standard_cart .domain-unavailable,
:root[data-theme="dark"] #order-standard_cart .domain-tld-unavailable,
:root[data-theme="dark"] #order-standard_cart .domain-checker-result-headline.domain-checker-unavailable {
  color: #f87171;
}

:root[data-theme="dark"] #order-standard_cart .domain-checker-available,
:root[data-theme="dark"] #order-standard_cart .domain-checker-result-headline.domain-checker-available {
  color: #4ade80;
}
