/* ============================================================
   GameHost — Dark Theme for WHMCS Standard Cart v5
   All selectors use #order-standard_cart prefix to beat
   specificity of the default style.css
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --gh-bg:       #0a0a0f;
  --gh-surface:  #12121a;
  --gh-surface2: #1a1a26;
  --gh-border:   rgba(255,255,255,0.08);
  --gh-text:     rgba(255,255,255,0.87);
  --gh-muted:    rgba(255,255,255,0.45);
  --gh-indigo:   #6366f1;
  --gh-indigo-d: #4f46e5;
  --gh-radius:   12px;
}

/* ── Base ───────────────────────────────────────────────── */
body { background: var(--gh-bg) !important; color: var(--gh-text) !important; font-family: 'Inter','Open Sans',system-ui,sans-serif !important; }
a { color: var(--gh-indigo) !important; }
a:hover { color: #818cf8 !important; }
h1,h2,h3,h4,h5,h6 { color: #fff !important; }
p, label, .text-muted { color: var(--gh-muted) !important; }
hr { border-color: var(--gh-border) !important; }

/* ── Hide left sidebar ──────────────────────────────────── */
#order-standard_cart .cart-sidebar,
#order-standard_cart .cart-sidebar.sidebar {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Cart body full width */
#order-standard_cart .cart-body {
  width: 100% !important;
  float: none !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* ── Page header ────────────────────────────────────────── */
#order-standard_cart .header-lined {
  border-bottom: 1px solid var(--gh-border) !important;
  margin-bottom: 24px !important;
  padding-bottom: 12px !important;
}
#order-standard_cart .header-lined h1 { color: #fff !important; font-size: 1.8rem !important; }

/* ── ============================================================
   PRODUCT CARDS (store/games page)
   ============================================================ */

/* Remove default float layout, use flex */
#order-standard_cart .products .product {
  background: var(--gh-surface) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: var(--gh-radius) !important;
  padding: 0 !important;
  margin: 0 0 20px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
  transition: border-color .2s, box-shadow .2s;
}

#order-standard_cart .products .product:hover {
  border-color: rgba(99,102,241,.5) !important;
  box-shadow: 0 0 0 1px rgba(99,102,241,.15), 0 8px 24px rgba(0,0,0,.5) !important;
}

/* Product name header */
#order-standard_cart .products .product header {
  background: var(--gh-surface2) !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid var(--gh-border) !important;
  float: none !important;
}

#order-standard_cart .products .product header span {
  color: #fff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
}

/* Features / description — flex-grow to push footer down */
#order-standard_cart .products .product div.product-desc {
  float: none !important;
  width: 100% !important;
  padding: 16px 20px !important;
  flex: 1 !important;
  color: var(--gh-muted) !important;
}

#order-standard_cart .products .product div.product-desc ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#order-standard_cart .products .product div.product-desc li {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 0 !important;
  font-size: .875rem !important;
  color: var(--gh-text) !important;
  border: none !important;
}

#order-standard_cart .products .product div.product-desc li::before {
  content: '' !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background: var(--gh-indigo) !important;
  flex-shrink: 0 !important;
}

#order-standard_cart .products .product div.product-desc .feature-value {
  color: #a5b4fc !important;
  font-weight: 600 !important;
  min-width: 48px !important;
}

/* Footer — price + button, side by side */
#order-standard_cart .products .product footer {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 20px !important;
  background: var(--gh-surface2) !important;
  border-top: 1px solid var(--gh-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  font-size: 1rem !important;
  text-align: left !important;
}

#order-standard_cart .products .product div.product-pricing {
  margin: 0 !important;
  line-height: 1.2 !important;
}

#order-standard_cart .products .product div.product-pricing span.price {
  display: block !important;
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  line-height: 1 !important;
}

#order-standard_cart .products .product div.product-pricing small,
#order-standard_cart .products .product div.product-pricing br + * {
  color: var(--gh-muted) !important;
  font-size: .75rem !important;
}

/* Order Now button */
#order-standard_cart .products .btn-order-now,
#order-standard_cart .btn-order-now {
  background: var(--gh-indigo) !important;
  border-color: var(--gh-indigo) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: .875rem !important;
  padding: 8px 16px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: background .2s !important;
}
#order-standard_cart .products .btn-order-now:hover { background: var(--gh-indigo-d) !important; }

/* Row spacing */
#order-standard_cart .products .col-md-6 { padding: 8px !important; }

/* ── ============================================================
   CONFIGURE PAGE
   ============================================================ */

/* Product info box at top */
#order-standard_cart .product-info {
  background: var(--gh-surface) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: var(--gh-radius) !important;
  padding: 16px 20px !important;
  margin-bottom: 16px !important;
}

#order-standard_cart .product-info .product-title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin-bottom: 4px !important;
}

#order-standard_cart .product-info p { color: var(--gh-muted) !important; margin: 0 !important; }

/* Sub-headings */
#order-standard_cart .sub-heading {
  border-bottom: 1px solid var(--gh-border) !important;
  margin: 20px 0 12px !important;
  padding-bottom: 8px !important;
}
#order-standard_cart .sub-heading span,
#order-standard_cart .sub-heading .primary-bg-color {
  background: transparent !important;
  color: var(--gh-muted) !important;
  font-size: .75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
}

/* Secondary cart body (left/main column on configure) */
#order-standard_cart .secondary-cart-body { width: 65% !important; }
#order-standard_cart .secondary-cart-sidebar { width: 33% !important; }

/* ── Order Summary sidebar ──────────────────────────────── */
#order-standard_cart .order-summary {
  background: var(--gh-surface) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: var(--gh-radius) !important;
  padding: 20px !important;
  margin-bottom: 16px !important;
  color: var(--gh-text) !important;
}

#order-standard_cart .order-summary h2 {
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  margin-bottom: 14px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--gh-border) !important;
}

#order-standard_cart .order-summary .product-name {
  display: block !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin-bottom: 4px !important;
}

#order-standard_cart .order-summary .product-group {
  display: block !important;
  font-size: .8rem !important;
  color: var(--gh-muted) !important;
  margin-bottom: 10px !important;
}

#order-standard_cart .order-summary .clearfix {
  display: flex !important;
  justify-content: space-between !important;
  padding: 5px 0 !important;
  font-size: .875rem !important;
  color: var(--gh-text) !important;
  border-bottom: 1px solid var(--gh-border) !important;
}

#order-standard_cart .order-summary .total-due-today {
  background: rgba(99,102,241,.1) !important;
  border: 1px solid rgba(99,102,241,.3) !important;
  border-radius: 8px !important;
  padding: 14px 16px !important;
  margin-top: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

#order-standard_cart .order-summary .total-due-today .amt {
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: #fff !important;
}

/* ── ============================================================
   REVIEW & CHECKOUT (cart table)
   ============================================================ */

/* Override blue Bootstrap table-primary header */
#order-standard_cart .table thead,
#order-standard_cart .table thead tr,
#order-standard_cart .table > thead > tr > th,
#order-standard_cart .table thead th {
  background: var(--gh-surface2) !important;
  background-color: var(--gh-surface2) !important;
  color: var(--gh-muted) !important;
  border-bottom: 1px solid var(--gh-border) !important;
  font-size: .75rem !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
}

#order-standard_cart .table {
  background: var(--gh-surface) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: var(--gh-radius) !important;
  overflow: hidden !important;
}

#order-standard_cart .table tbody td {
  background: transparent !important;
  color: var(--gh-text) !important;
  border-color: var(--gh-border) !important;
  vertical-align: middle !important;
}

#order-standard_cart .table tbody tr { border-bottom: 1px solid var(--gh-border) !important; }

/* ── Checkout fieldsets ─────────────────────────────────── */
#frmCheckout fieldset,
.checkout-fieldset {
  background: var(--gh-surface) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: var(--gh-radius) !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
}

#frmCheckout legend,
.checkout-fieldset legend,
fieldset legend {
  background: var(--gh-surface2) !important;
  color: var(--gh-text) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: 6px !important;
  padding: 4px 14px !important;
  font-size: .8rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  width: auto !important;
  float: none !important;
}

/* ── Forms ──────────────────────────────────────────────── */
.form-control,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"] {
  background: var(--gh-surface2) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: 8px !important;
  color: var(--gh-text) !important;
}
.form-control:focus, select:focus, input:focus {
  border-color: var(--gh-indigo) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important;
  outline: none !important;
  background: var(--gh-surface2) !important;
}
.form-control::placeholder { color: var(--gh-muted) !important; }
.input-group-addon, .input-group-text {
  background: var(--gh-surface2) !important;
  border: 1px solid var(--gh-border) !important;
  color: var(--gh-muted) !important;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary, .btn-success, #btnCompleteOrder, .complete-order-btn,
#btnCompleteProductConfig {
  background: var(--gh-indigo) !important;
  border-color: var(--gh-indigo) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}
.btn-primary:hover, .btn-success:hover, #btnCompleteOrder:hover { background: var(--gh-indigo-d) !important; }

.btn-default, .btn-secondary {
  background: var(--gh-surface2) !important;
  border: 1px solid var(--gh-border) !important;
  color: var(--gh-text) !important;
  border-radius: 8px !important;
}

.btn-info {
  background: rgba(99,102,241,.2) !important;
  border-color: rgba(99,102,241,.4) !important;
  color: #a5b4fc !important;
  border-radius: 8px !important;
}

/* ── Cards / panels ─────────────────────────────────────── */
.panel, .card, .well {
  background: var(--gh-surface) !important;
  border: 1px solid var(--gh-border) !important;
  border-radius: var(--gh-radius) !important;
  color: var(--gh-text) !important;
}
.panel-heading, .card-header {
  background: var(--gh-surface2) !important;
  border-bottom: 1px solid var(--gh-border) !important;
  color: #fff !important;
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert { border-radius: 10px !important; border-left: 3px solid; }
.alert-danger  { background: rgba(239,68,68,.1)  !important; border-color: #ef4444 !important; color: #fca5a5 !important; }
.alert-success { background: rgba(34,197,94,.1)  !important; border-color: #22c55e !important; color: #86efac !important; }
.alert-info    { background: rgba(99,102,241,.1) !important; border-color: var(--gh-indigo) !important; color: #a5b4fc !important; }
.alert-warning { background: rgba(245,158,11,.1) !important; border-color: #f59e0b !important; color: #fcd34d !important; }

/* ── Nav tabs ───────────────────────────────────────────── */
.nav-tabs { border-bottom: 1px solid var(--gh-border) !important; }
.nav-tabs .nav-link { color: var(--gh-muted) !important; border: none !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; }
.nav-tabs .nav-link:hover { color: #fff !important; }
.nav-tabs .nav-link.active { color: #fff !important; border-bottom-color: var(--gh-indigo) !important; background: transparent !important; }

/* ── Payment gateway ────────────────────────────────────── */
#paymentGatewaysContainer .text-center { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin-top: 8px; }
#paymentGatewaysContainer .radio-inline input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
#paymentGatewaysContainer .radio-inline {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--gh-surface2);
  border: 1.5px solid var(--gh-border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--gh-text) !important;
  transition: border-color .2s, background .2s;
  position: relative;
}
#paymentGatewaysContainer .radio-inline::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--gh-border); flex-shrink: 0;
  background: var(--gh-surface); transition: border-color .2s, background .2s;
}
#paymentGatewaysContainer .radio-inline:has(input:checked) { border-color: var(--gh-indigo); background: rgba(99,102,241,.08); }
#paymentGatewaysContainer .radio-inline:has(input:checked)::before { border-color: var(--gh-indigo); background: var(--gh-indigo); box-shadow: inset 0 0 0 4px var(--gh-surface2); }
#paymentGatewaysContainer img, .gateway-logo { display: none !important; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gh-bg); }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.4); border-radius: 3px; }
