/*
 * DrugsGeneral UI polish
 * Kept deliberately small and independent from the generated main stylesheet.
 * No layout primitives are changed here; this is safe for existing templates.
 */
:root {
  --dg-focus-ring: 0 0 0 3px rgba(45, 139, 166, .28);
  --dg-surface-hover: #eef6f8;
}

/* Keyboard users get a visible, brand-consistent focus state. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--primary-400, #2d8ba6);
  outline-offset: 2px;
  box-shadow: var(--dg-focus-ring);
}

/* Keep controls comfortable on touch screens without changing desktop sizing. */
@media (pointer: coarse) {
  :where(button, [type="button"], [type="submit"], .dg-btn, .dg-btn-cart, .dg-btn-view) {
    min-height: 42px;
  }
}

::selection {
  color: #fff;
  background: var(--primary-700, #0b3954);
}

/* Avoid motion-triggered discomfort and reduce unnecessary animation work. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Prevent long product names and notices from creating horizontal scroll. */
:where(.dg-product-name, .woocommerce-message, .woocommerce-error, .woocommerce-info) {
  overflow-wrap: anywhere;
}