/* 16.12.54: component-owned foregrounds and visible selection states. */
body.theme-light, body.admin-design-v8 {
  --control-accent: #086a72;
  --control-border: #75838e;
  --on-dark: #f8fafc;
  --on-dark-muted: #cbd5e1;
  --adm-primary: #08777b;
  --adm-secondary: #b54d00;
  --adm-border-strong: #75838e;
  --ui-line-strong: #75838e;
}

/* Native form controls keep their semantics, keyboard support and hit areas. */
:is(body.theme-light, body.admin-design-v8) input:is([type="checkbox"],[type="radio"]) {
  accent-color: var(--control-accent);
  flex-shrink: 0;
  border-color: var(--control-border) !important;
}
:is(body.theme-light, body.admin-design-v8) input:is([type="checkbox"],[type="radio"]):checked {
  background-color: var(--control-accent) !important;
  border-color: var(--control-accent) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
:is(body.theme-light, body.admin-design-v8) input.form-check-input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m5 10 3 3 7-7'/%3E%3C/svg%3E") !important;
}
:is(body.theme-light, body.admin-design-v8) input.form-check-input[type="radio"]:checked,
:is(body.theme-light, body.admin-design-v8) .form-switch input.form-check-input:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E") !important;
}
:is(body.theme-light, body.admin-design-v8) :is(input,button,a,select,textarea,[tabindex]):focus-visible {
  outline: 3px solid #086a72;
  outline-offset: 3px;
}
body.admin-design-v8 .admin-nav-submenu[hidden] { display: none !important; }

/* The product checkbox was checked, but a generic input rule painted it white. */
#dmProductPage .dm-single-addon-option__control { border-color: #75838e !important; }
#dmProductPage .dm-single-addon-option__control:checked {
  background: #086a72 !important;
  border-color: #086a72 !important;
  color: #fff !important;
}
#dmProductPage .dm-single-addon-option__control:checked::after {
  content: '✓';
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1;
  transform: none;
}
#dmProductPage .dm-single-addon-option__control:disabled { opacity: 1; }
#dmProductPage .dm-single-addon-option:has(input:checked) {
  border-color: #086a72;
  background: #f1faf8;
}
#dmProductPage .dm-single-addon-option:has(input:checked) .dm-single-addon-option__selected-label {
  display: inline-flex;
  color: #086057 !important;
}
#dmProductPage .dm-single-addon-option__content > small,
#dmProductPage .dm-single-addon-option__price > span,
#dmProductPage .dm-single-addon-option__price del { color: #526174 !important; }
#dmProductPage .dm-single-addon-option__type { color: #33495a !important; }

/* Text color belongs to the actual surface, not every strong/span on the page. */
body.theme-light :is(.dm-purchase-checkout-panel, [data-contrast-surface="dark"], .ai-shop-chat-launch),
body.admin-design-v8 [data-contrast-surface="dark"] {
  --text: var(--on-dark);
  --dc-text: var(--on-dark);
  --dc-muted: var(--on-dark-muted);
  --muted: var(--on-dark-muted);
  color: var(--on-dark) !important;
}
body.theme-light :is(.dm-purchase-checkout-panel, [data-contrast-surface="dark"], .ai-shop-chat-launch)
  :is(h1,h2,h3,h4,h5,h6,b,strong,span,small,p,label),
body.admin-design-v8 [data-contrast-surface="dark"] :is(h1,h2,h3,h4,h5,h6,b,strong,span,small,p,label) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}
#dmProductPage .dm-purchase-total { color: #f8fafc !important; flex-wrap: wrap; }
#dmProductPage .dm-purchase-total__copy > b { font-size: 12px; }
#dmProductPage .dm-purchase-total__copy > small { font-size: 11px; color: #cbd5e1 !important; }
#dmProductPage .dm-purchase-checkout-panel .single_add_to_cart_button {
  background: #b54d00 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.tier-basis-selector { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* Tabs, segmented controls and module navigation share complete state pairs. */
:is(body.theme-light, body.admin-design-v8) :is(
  .tab-btn,.nav-tabs .nav-link,.nav-pills .nav-link,[role="tab"],
  .settings-nav-item,.settings-group-list button,.seo-center-nav a,
  .tier-filter-tabs a,.account-filter-tabs button,.review-management-tabs button
) {
  background: #f1f5f7 !important;
  border-color: #9baab4 !important;
  color: #33495a !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}
:is(body.theme-light, body.admin-design-v8) :is(
  .tab-btn,.nav-tabs .nav-link,.nav-pills .nav-link,[role="tab"],
  .settings-nav-item,.settings-group-list button,.seo-center-nav a,
  .tier-filter-tabs a,.account-filter-tabs button,.review-management-tabs button
):is(.active,.is-active,[aria-selected="true"]) {
  background: #086a72 !important;
  border-color: #086a72 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
:is(body.theme-light, body.admin-design-v8) :is(
  .tab-btn,.nav-tabs .nav-link,.nav-pills .nav-link,[role="tab"],
  .settings-nav-item,.settings-group-list button,.seo-center-nav a,
  .tier-filter-tabs a,.account-filter-tabs button,.review-management-tabs button
) :is(span,b,strong,small,i,em) { color: inherit !important; -webkit-text-fill-color: currentColor !important; }

.dm-tier-benefits { margin: 16px 0; padding: 16px; border: 1px solid #739e94; border-radius: 14px; background: #f0faf6; color: #175347; }
.dm-tier-benefits h3 { margin: 0 0 10px; font-size: 15px; color: #175347; }
.dm-tier-benefits p { margin: 6px 0; font-size: 13px; line-height: 1.9; }
.dm-tier-benefits ul { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dm-tier-benefits li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 13px; }
.dm-tier-benefits progress { display: block; width: 100%; height: 10px; margin: 12px 0; accent-color: #086a72; }
.dm-tier-benefits .dm-tier-next { color: #33495a; }
@media (forced-colors: active) {
  #dmProductPage .dm-single-addon-option__control { appearance: auto; -webkit-appearance: auto; }
  #dmProductPage .dm-single-addon-option__control::after { content: none; }
}
