/*
 * Hover surfaces in dark mode.
 *
 * The bug this file exists for: the light theme paints its card hover states
 * near-white (`#fbfdfd`, `#f1f8f8`, `#fcfefe`, `#f8fbfb`, `#fff4f6`, …) and it
 * does so with `!important`. In dark mode those rules still won, so hovering an
 * account shortcut — or an order row, a service card, a checkout address — turned
 * the card white while the ink stayed a dark-mode light colour. Result: the text
 * disappeared exactly under the cursor (the first report was «آدرس‌های من» on the
 * account dashboard, measured white card + #d7e2e4 ink).
 *
 * `:hover` cannot be probed from JavaScript, so this file is the mirror of the
 * light rules: same selectors, a dark surface, and the text re-stated. Ratios
 * below are measured on the hover state itself (see `.freebuff/qa-hover.php`),
 * not on the resting card.
 *
 * Kept separate from `dark-mode-hardening.css` so the hover layer can be read (and
 * removed) as one thing, and loaded right after it — before `release-polish.css`.
 */

/* --- account shortcuts and support cards: the reported case --- */
html[data-theme="dark"] body.papillon-account-screen :where(.profile-quick-links>a,.support-options>a):hover,
html[data-theme="dark"] body.papillon-account-screen :where(.profile-quick-links>a,.support-options>a):focus-visible{
  border-color:var(--dk-border-strong)!important;
  background:var(--dk-surface-2)!important;
  color:var(--dk-text)!important;
}
html[data-theme="dark"] body.papillon-account-screen :where(.profile-quick-links a,.support-options a):hover :where(strong,span,small),
html[data-theme="dark"] body.papillon-account-screen :where(.profile-quick-links a,.support-options a):hover .profile-quick-link-arrow{
  color:var(--dk-text)!important;
}
html[data-theme="dark"] body.papillon-account-screen .profile-quick-links a:hover .profile-quick-link-icon{
  border-color:var(--dk-border-strong)!important;
  background:var(--dk-surface-3)!important;
  color:var(--dk-accent)!important;
}

/* --- account tables and their rows --- */
html[data-theme="dark"] body.papillon-account-screen .woocommerce-orders-table tbody tr:hover td,
html[data-theme="dark"] body.papillon-account-screen .woocommerce-orders-table tbody tr:hover th{
  background:var(--dk-surface-2)!important;
  color:var(--dk-text)!important;
}
html[data-theme="dark"] body.papillon-account-screen .papillon-address-default-form button:hover{
  border-color:var(--dk-border-strong)!important;
  background:var(--dk-surface-3)!important;
  color:var(--dk-accent)!important;
}
html[data-theme="dark"] body.papillon-account-screen .pap-orders__action--cancel:hover{
  border-color:var(--dk-danger-border)!important;
  background:var(--dk-danger-bg)!important;
  color:var(--dk-danger-text)!important;
}

/* --- checkout and cart --- */
html[data-theme="dark"] body.papillon-checkout-screen .papillon-checkout-address-edit:hover{
  border-color:var(--dk-border-strong)!important;
  background:var(--dk-surface-2)!important;
}
html[data-theme="dark"] body.papillon-cart-screen .shop_table.cart .product-remove a:hover{
  border-color:var(--dk-danger-border)!important;
  background:var(--dk-danger-bg)!important;
  color:var(--dk-danger-text)!important;
}
html[data-theme="dark"] body.papillon-cart-screen .pap-cart-quantity-button:hover:not(:disabled){
  background:var(--dk-hover)!important;
  color:var(--dk-accent)!important;
}

/* --- homepage links and cards, header actions, toasts --- */
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine :where(.text-link,.spotlight-list a,.home-service-card):hover{
  border-color:var(--dk-border-strong)!important;
  background:var(--dk-surface-2)!important;
  color:var(--dk-text)!important;
}
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine .spotlight-list a:hover :where(strong,b,span){
  color:var(--dk-text)!important;
}
html[data-theme="dark"] body.papillon-theme .site-header .header-action:hover{
  border-color:var(--dk-border-strong)!important;
  background:var(--dk-surface-2)!important;
  color:var(--dk-accent)!important;
}
html[data-theme="dark"] body.papillon-theme .pap-toast-close:hover{
  background:var(--dk-surface-3)!important;
  color:var(--dk-text)!important;
}

/*
 * The reverse trap: a few light hover rules pair a *light* background with a
 * dark ink (e.g. the hero's primary button). Those keep working in dark mode
 * because the whole hero panel is dark in both themes — listed here so a later
 * pass does not "fix" them:
 *   .hero-actions .btn.primary:hover  → #f6e4c1 with #12343d ink (8.0:1)
 *   .market-buy-button:hover .market-buy-arrow → rgba(255,255,255,.16) + #fff
 */
