/* Initech V2 dark floor for surfaces the child theme does not restyle:
   stock twenty-one Bootstrap components (non-overridden templates and
   includes, MarketConnect store, payment pages) and the non-overridden
   standard_cart templates. Everything is scoped under
   html[data-theme="dark"], kept low-specificity and token-driven.
   Floor, not ceiling: page-scoped bespoke styles out-specify this on
   purpose. Never use !important against stock JS inline styles. */

/* ---- Base surfaces and text ---- */
html[data-theme="dark"] body { background: var(--ixv2-paper); color: var(--ixv2-ink); }
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light { background-color: var(--ixv2-tint) !important; }
html[data-theme="dark"] .text-muted { color: var(--ixv2-mute) !important; }
html[data-theme="dark"] hr { border-top-color: var(--ixv2-line); }
html[data-theme="dark"] code, html[data-theme="dark"] pre {
  background: var(--ixv2-tint); color: var(--ixv2-ink);
}

/* ---- Cards, panels, list groups ---- */
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .list-group-item {
  background-color: var(--ixv2-paper); border-color: var(--ixv2-line); color: var(--ixv2-ink);
}
html[data-theme="dark"] .card-header, html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .card-footer, html[data-theme="dark"] .panel-footer {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line); color: var(--ixv2-ink);
}
html[data-theme="dark"] .list-group-item-action:hover,
html[data-theme="dark"] .list-group-item-action:focus { background-color: var(--ixv2-tint-blue); color: var(--ixv2-ink); }

/* ---- Forms ---- */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line-2); color: var(--ixv2-ink);
}
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .custom-select:focus {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-accent-deep);
  color: var(--ixv2-ink); box-shadow: 0 0 0 .2rem var(--ixv2-deep-a-16);
}
html[data-theme="dark"] .form-control::placeholder { color: var(--ixv2-mute-3); }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] { background-color: var(--ixv2-accent-tint); opacity: 1; }
html[data-theme="dark"] .input-group-text {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line-2); color: var(--ixv2-mute);
}
html[data-theme="dark"] label, html[data-theme="dark"] legend { color: var(--ixv2-ink); }

/* ---- Dropdowns ---- */
html[data-theme="dark"] .dropdown-menu {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line);
  box-shadow: 0 6px 20px var(--ixv2-shadow-18);
}
html[data-theme="dark"] .dropdown-item { color: var(--ixv2-ink); }
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus { background-color: var(--ixv2-tint-blue); color: var(--ixv2-ink); }
html[data-theme="dark"] .dropdown-divider { border-top-color: var(--ixv2-line); }

/* ---- Modals ---- */
html[data-theme="dark"] .modal-content {
  background-color: var(--ixv2-paper); border-color: var(--ixv2-line); color: var(--ixv2-ink);
}
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer { background-color: var(--ixv2-tint); border-color: var(--ixv2-line); }
html[data-theme="dark"] .modal-content .close { color: var(--ixv2-mute); }
html[data-theme="dark"] .modal-content .close:hover { color: var(--ixv2-ink); }

/* ---- Tables and DataTables ---- */
html[data-theme="dark"] .table { color: var(--ixv2-ink); }
html[data-theme="dark"] .table td, html[data-theme="dark"] .table th { border-color: var(--ixv2-line); }
html[data-theme="dark"] .table thead th { border-bottom-color: var(--ixv2-line-2); }
html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: var(--ixv2-tint); }
html[data-theme="dark"] .table-hover tbody tr:hover { background-color: var(--ixv2-tint-blue); color: var(--ixv2-ink); }
html[data-theme="dark"] .dataTables_wrapper .dataTables_length,
html[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
html[data-theme="dark"] .dataTables_wrapper .dataTables_info,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate { color: var(--ixv2-mute); }

/* ---- Alerts: dark translucent variants ---- */
html[data-theme="dark"] .alert-success {
  color: var(--ixv2-ok-deep); background-color: var(--ixv2-ok-wash); border-color: var(--ixv2-ok-tint);
}
html[data-theme="dark"] .alert-info {
  color: var(--ixv2-accent-deep); background-color: var(--ixv2-tint-blue); border-color: var(--ixv2-accent-tint-2);
}
html[data-theme="dark"] .alert-warning {
  color: var(--ixv2-amber-deep); background-color: var(--ixv2-amber-wash); border-color: var(--ixv2-amber-tint);
}
html[data-theme="dark"] .alert-danger {
  color: var(--ixv2-red-deep); background-color: var(--ixv2-red-wash); border-color: var(--ixv2-red-tint);
}

/* ---- Pagination, tabs, breadcrumb, badges ---- */
html[data-theme="dark"] .page-link {
  background-color: var(--ixv2-paper); border-color: var(--ixv2-line); color: var(--ixv2-accent-deep);
}
html[data-theme="dark"] .page-link:hover { background-color: var(--ixv2-tint-blue); border-color: var(--ixv2-line); color: var(--ixv2-ink); }
html[data-theme="dark"] .page-item.active .page-link {
  background-color: var(--ixv2-accent); border-color: var(--ixv2-accent); color: #17191d;
}
html[data-theme="dark"] .page-item.disabled .page-link { background-color: var(--ixv2-tint); color: var(--ixv2-mute-3); border-color: var(--ixv2-line); }
html[data-theme="dark"] .nav-tabs { border-bottom-color: var(--ixv2-line); }
html[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: var(--ixv2-line); }
html[data-theme="dark"] .nav-tabs .nav-link.active {
  background-color: var(--ixv2-paper); border-color: var(--ixv2-line) var(--ixv2-line) var(--ixv2-paper); color: var(--ixv2-ink);
}
html[data-theme="dark"] .breadcrumb { background-color: transparent; }
html[data-theme="dark"] .badge-light { background-color: var(--ixv2-tint); color: var(--ixv2-ink); }

/* ---- Neutral buttons ---- */
html[data-theme="dark"] .btn-default,
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-outline-secondary {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line-2); color: var(--ixv2-ink);
}
html[data-theme="dark"] .btn-default:hover,
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-light:hover,
html[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--ixv2-tint-blue); border-color: var(--ixv2-accent-hover); color: var(--ixv2-ink);
}

/* ---- Popovers, tooltips, progress ---- */
html[data-theme="dark"] .popover {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line);
}
html[data-theme="dark"] .popover-body { color: var(--ixv2-ink); }
html[data-theme="dark"] .popover-header { background-color: var(--ixv2-tint-blue); border-bottom-color: var(--ixv2-line); color: var(--ixv2-ink); }
html[data-theme="dark"] .tooltip-inner { background-color: var(--ixv2-line-2); color: var(--ixv2-ink); }
html[data-theme="dark"] .progress { background-color: var(--ixv2-line); }

/* ---- Scrollbars (WebKit; Firefox follows color-scheme) ---- */
html[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--ixv2-tint); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--ixv2-line-2); }

/* ---- Light plate: white backing for raster art drawn for light mode
   (CVV diagram, SSL status icons, captcha bitmap, core spinner) ---- */
html[data-theme="dark"] .ixv2-lightplate,
html[data-theme="dark"] img[src*="verifyimage.php"],
html[data-theme="dark"] #fullpage-overlay img {
  background: #fff; border-radius: 4px; padding: 2px;
}

/* ---- Non-overridden standard_cart templates (addons, domain transfer,
   fraud check, service renewals, sidebar categories) ---- */
html[data-theme="dark"] #order-standard_cart a.btn-primary,
html[data-theme="dark"] #order-standard_cart .btn-primary {
  color: var(--ixv2-on-accent);
}
html[data-theme="dark"] #order-standard_cart .header-lined h1,
html[data-theme="dark"] #order-standard_cart .header-lined h2 { border-bottom-color: var(--ixv2-line); color: var(--ixv2-ink); }
html[data-theme="dark"] #order-standard_cart .sub-heading span,
html[data-theme="dark"] #order-standard_cart .sub-heading-borderless span {
  background-color: var(--ixv2-paper); color: var(--ixv2-mute);
}
html[data-theme="dark"] #order-standard_cart .field-container,
html[data-theme="dark"] #order-standard_cart .field-group { color: var(--ixv2-ink); }
html[data-theme="dark"] #order-standard_cart .view-cart-items .item,
html[data-theme="dark"] #order-standard_cart .view-cart-items .item-domain {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line); color: var(--ixv2-ink);
}
html[data-theme="dark"] #order-standard_cart .summary-container {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line); color: var(--ixv2-ink);
}
html[data-theme="dark"] #order-standard_cart .summary-container .subtotal,
html[data-theme="dark"] #order-standard_cart .summary-container .total-due-today { color: var(--ixv2-ink); }
html[data-theme="dark"] #order-standard_cart .sidebar-collapsed .panel,
html[data-theme="dark"] #order-standard_cart .panel-sidebar-categories .panel-body { background-color: var(--ixv2-paper); }
html[data-theme="dark"] #order-standard_cart .assisted-selection,
html[data-theme="dark"] #order-standard_cart .promo-container {
  background-color: var(--ixv2-tint); border-color: var(--ixv2-line); color: var(--ixv2-ink);
}
