/**
 * Dash Horizon shared components — dark glass system
 * Loaded by client-area and order-form themes.
 */

/* Breadcrumb — dark glass, not bright white */
body.dh-theme .master-breadcrumb {
  background: transparent;
  padding: 12px 0 4px;
  overflow: visible !important;
}

body.dh-theme .master-breadcrumb .breadcrumb {
  background: var(--dh-bg-panel) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  box-shadow: none;
  margin-bottom: 1rem;
}

body.dh-theme .breadcrumb-item,
body.dh-theme .breadcrumb-item a {
  color: var(--dh-text-muted) !important;
}

body.dh-theme .breadcrumb-item.active {
  color: var(--dh-text-primary) !important;
}

body.dh-theme .breadcrumb-item + .breadcrumb-item::before {
  color: var(--dh-text-muted);
}

/* Cards / panels — glass (scoped, not body * colour) */
body.dh-theme .card,
body.dh-theme .panel,
body.dh-theme .sidebar .card,
body.dh-theme .tiles .tile,
body.dh-theme .announcement,
body.dh-theme .kb-article,
body.dh-theme .md-editor {
  background: var(--dh-bg-panel) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius-lg) !important;
  box-shadow: var(--dh-shadow-soft) !important;
  color: var(--dh-text-secondary);
  backdrop-filter: blur(12px);
}

body.dh-theme .card-header,
body.dh-theme .panel-heading,
body.dh-theme .card-footer,
body.dh-theme .panel-footer {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .card-title,
body.dh-theme .panel-title,
body.dh-theme h1,
body.dh-theme h2,
body.dh-theme h3,
body.dh-theme h4,
body.dh-theme h5 {
  color: var(--dh-text-primary);
}

body.dh-theme .card-body,
body.dh-theme .panel-body,
body.dh-theme .card-text,
body.dh-theme .announcement .card-text,
body.dh-theme .announcements .card-body p {
  color: var(--dh-text-secondary);
}

/* Domain search — dark glass */
body.dh-theme .home-domain-search,
body.dh-theme .domain-checker-container,
body.dh-theme .domainchecker-homepage,
body.dh-theme #frmDomainChecker,
body.dh-theme .domain-lookup-result,
body.dh-theme .domain-pricing {
  background: var(--dh-gradient-hero) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius-xl) !important;
  color: var(--dh-text-secondary) !important;
  box-shadow: var(--dh-shadow-soft);
}

body.dh-theme .home-domain-search h2,
body.dh-theme .home-domain-search .domain-checker-bg,
body.dh-theme .domain-checker-bg {
  background: transparent !important;
  color: var(--dh-text-primary) !important;
}

body.dh-theme .home-domain-search .form-control,
body.dh-theme .domain-checker-container .form-control {
  background: var(--dh-bg-input) !important;
  border: 1px solid var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
}

/* Forms */
body.dh-theme .form-control,
body.dh-theme select.form-control,
body.dh-theme textarea.form-control,
body.dh-theme .logincontainer .form-control {
  background: var(--dh-bg-input) !important;
  border: 1px solid rgba(216, 233, 255, 0.22) !important;
  border-radius: var(--dh-radius-sm) !important;
  color: var(--dh-text-primary) !important;
  min-height: 44px;
}

body.dh-theme .form-control::placeholder {
  color: var(--dh-text-muted);
  opacity: 0.85;
}

body.dh-theme .form-control:focus {
  border-color: var(--dh-accent-2) !important;
  box-shadow: var(--dh-focus) !important;
}

body.dh-theme label,
body.dh-theme .control-label,
body.dh-theme .form-control-label {
  color: var(--dh-text-secondary);
  font-weight: 600;
}

body.dh-theme .input-group-text {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(216, 233, 255, 0.22);
  color: var(--dh-text-muted);
}

/* Buttons */
body.dh-theme .btn-primary,
body.dh-theme .btn-success {
  background: var(--dh-gradient-btn) !important;
  border-color: transparent !important;
  border-radius: var(--dh-radius) !important;
  font-weight: 700;
  min-height: 42px;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(26, 63, 107, 0.35);
}

body.dh-theme .btn-default,
body.dh-theme .btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--dh-border) !important;
  color: var(--dh-text-primary) !important;
  border-radius: var(--dh-radius) !important;
  min-height: 42px;
}

body.dh-theme .btn:focus-visible {
  outline: none;
  box-shadow: var(--dh-focus) !important;
}

/* Tables */
body.dh-theme .table-container,
body.dh-theme .table-responsive,
body.dh-theme .dataTables_wrapper {
  background: var(--dh-bg-panel);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow-x: auto;
}

body.dh-theme .table,
body.dh-theme table.dataTable {
  color: var(--dh-text-secondary) !important;
  background: transparent !important;
}

body.dh-theme .table thead th,
body.dh-theme table.dataTable thead th {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--dh-text-primary) !important;
  border-color: var(--dh-border) !important;
}

body.dh-theme .table td,
body.dh-theme table.dataTable td {
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary);
}

body.dh-theme .table-striped tbody tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Alerts */
body.dh-theme .alert {
  border-radius: var(--dh-radius) !important;
  border-width: 1px !important;
}

body.dh-theme .alert-success { background: var(--dh-success-bg) !important; border-color: rgba(61,214,140,.35) !important; color: #b6f5d3 !important; }
body.dh-theme .alert-warning { background: var(--dh-warning-bg) !important; border-color: rgba(245,200,76,.35) !important; color: #ffe6a3 !important; }
body.dh-theme .alert-danger  { background: var(--dh-danger-bg) !important; border-color: rgba(255,107,107,.35) !important; color: #ffc9c9 !important; }
body.dh-theme .alert-info    { background: var(--dh-info-bg) !important; border-color: rgba(110,168,255,.35) !important; color: #d6e6ff !important; }

/* Modals */
body.dh-theme .modal-content {
  background: var(--dh-bg-panel-raised) !important;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius-lg) !important;
  color: var(--dh-text-secondary);
  z-index: var(--z-modal);
}

body.dh-theme .modal-header,
body.dh-theme .modal-footer {
  border-color: var(--dh-border) !important;
  color: var(--dh-text-primary);
}

/* Tickets / invoices */
body.dh-theme .ticket-reply,
body.dh-theme .ticket-message,
body.dh-theme .invoice-container,
body.dh-theme .view-invoice {
  background: var(--dh-bg-panel) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius) !important;
  color: var(--dh-text-secondary);
}

body.dh-theme .verification-banner {
  background: var(--dh-warning-bg) !important;
  border-bottom: 1px solid rgba(245, 200, 76, 0.3);
  color: #ffe6a3;
}

body.dh-theme .list-group-item {
  background: transparent !important;
  border-color: var(--dh-border) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .list-group-item-action:hover,
body.dh-theme .list-group-item.active {
  background: rgba(111, 152, 197, 0.14) !important;
  color: #fff !important;
}

body.dh-theme .tiles .tile .stat { color: var(--dh-text-primary); }
body.dh-theme .tiles .tile .title { color: var(--dh-text-muted); }

body.dh-theme .text-muted { color: var(--dh-text-muted) !important; }

/* Links — scoped, not global force on all text */
body.dh-theme .primary-content a:not(.btn):not(.nav-link):not(.dropdown-item):not(.list-group-item):not(.dhx-card):not(.dhx-service-link):not(.dhx-cta):not(.dhx-wide-cta):not(.dhx-hosting-banner) {
  color: var(--dh-accent-2);
}

body.dh-theme .primary-content a:not(.btn):not(.nav-link):not(.dropdown-item):not(.list-group-item):hover {
  color: var(--dh-soft);
}

/* Product / configure descriptions — dark readable richtext */
body.dh-theme .product-details,
body.dh-theme .product-info,
body.dh-theme #productConfigurableOptions,
body.dh-theme .product-configurable-options,
body.dh-theme .order-summary,
body.dh-theme .summary-container {
  background: var(--dh-bg-panel) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius-lg) !important;
  color: var(--dh-text-secondary) !important;
}

body.dh-theme .product-details .product-desc,
body.dh-theme .product-info,
body.dh-theme .tab-content.product-desc,
body.dh-theme #tabOverview .product-desc,
body.dh-theme .dh-richtext.dh-dark-content {
  color: var(--dh-text-secondary) !important;
  background: transparent !important;
}

body.dh-theme .product-details .product-desc p,
body.dh-theme .product-info p,
body.dh-theme .dh-richtext.dh-dark-content p,
body.dh-theme .dh-richtext.dh-dark-content li {
  color: var(--dh-text-secondary) !important;
}

/* If third-party HTML forces white backgrounds, use light-content readability */
body.dh-theme .dh-light-content,
body.dh-theme .dh-module-output.dh-light-content {
  background: #fff !important;
  color: var(--dh-text-on-light) !important;
}

/* Knowledgebase search */
body.dh-theme .kb-search,
body.dh-theme #kb-search,
body.dh-theme .kbsearch {
  background: var(--dh-bg-panel) !important;
  border: 1px solid var(--dh-border) !important;
  border-radius: var(--dh-radius-lg) !important;
  padding: 1rem;
  color: var(--dh-text-secondary);
}

/* Hide default Twenty-One footer chrome when website footer is active */
body.dh-theme #footer.footer:not(.dhds-footer) {
  display: none !important;
}

/* Main body */
body.dh-theme #main-body {
  background: transparent !important;
  position: relative;
  z-index: var(--z-base);
}

body.dh-theme #main-body > .container {
  max-width: var(--dh-container);
}

/* Login */
body.dh-theme .login-form .card,
body.dh-theme .logincontainer {
  max-width: 540px;
}

/* MarketConnect / module output default to dark readable */
body.dh-theme .mc-promo,
body.dh-theme .store-promo,
body.dh-theme .landing-page {
  color: var(--dh-text-secondary);
}
