/* Action feedback shared by the storefront, account pages and Django admin. */
.action-feedback {
  position: fixed;
  z-index: 1100;
  inset: auto auto max(1rem, env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .7rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  padding: .75rem 1rem;
  box-sizing: border-box;
  border: 1px solid #ffffff38;
  border-radius: .8rem;
  background: #173529;
  color: white;
  font: 600 .92rem/1.45 "DM Sans", system-ui, sans-serif;
  box-shadow: 0 5px 22px #132d2426;
  pointer-events: none;
}
.action-feedback:empty { width: 1px; height: 1px; clip-path: inset(50%); padding: 0; border: 0; overflow: hidden; }
.action-feedback:not(:empty):not(.action-error,.action-success)::before,
:is(button,.btn,.button,.dash-primary)[aria-busy="true"]::after {
  display: inline-block;
  content: "";
  flex: none;
  width: .86em;
  height: .86em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
}
:is(button,.btn,.button,.dash-primary)[aria-busy="true"]::after { margin-inline-start: .45em; vertical-align: -.1em; }
.flash > [hidden], .messagelist > [hidden] { display: none; }
.action-pending, button[aria-busy="true"] { cursor: progress; }
input[type="submit"].action-pending {
  background-image: linear-gradient(110deg, transparent 25%, #ffffff42 49%, transparent 74%);
  background-size: 200% 100%;
}
.action-error { background: #762e24; }
.action-success::before {
  content: "";
  width: .45rem;
  height: .75rem;
  flex: none;
  border: solid #a5e8aa;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.flash .error, .flash .warning, form .errorlist:not(:empty) {
  border-radius: .45rem;
  background: #fff2ef;
  color: #822f25;
}
.flash .error, .flash .warning { border-inline-start-color: #b74d39; }
form .errorlist:not(:empty) { padding: .45rem .75rem; margin-block: .45rem; list-style: none; font-size: .91rem; }
form [aria-invalid="true"] { border-color: #ad4332; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #358047;
  outline-offset: 3px;
}

/* Phone numbers and standalone text actions have a persistent directional cue. */
:is(.text-link,.quiet-link,.story-resources a,.policy-index a,.model-comparison a,
    .source-note,.center-contacts a,.direct-contacts a,.home-benefits a,.reach-options a),
.policies-page .policy-index a:is(:hover,:focus-visible) { text-decoration: none; }
:is(.text-link,.quiet-link,.direct-contacts a,.center-contacts a)::after {
  content: "";
  display: inline-block;
  height: .4em;
  width: .4em;
  margin-inline: .45em .18em;
  border-block-start: 1.7px solid currentColor;
  border-inline-end: 1.7px solid currentColor;
  transform: rotate(45deg);
  vertical-align: .08em;
}
.contact-page .direct-contacts a, .centers-page .center-contacts a {
  max-width: 100%;
  padding: .25rem .65rem;
  border-radius: .55rem;
  background: #edf6ef;
}
.wide-nav a::after { content: none; }
.wide-nav a { padding-inline: .48rem; border-radius: .45rem; }
.wide-nav a[aria-current] { background: #e7f4e9; color: #215e34; }
.foot a:hover, .basket-copy h2 a:hover, .basket-controls .remove-item,
:is(.home-page,.refined-page) .product-card:is(:hover,:focus-visible) h3,
.installer-body .job-link:is(:hover,:focus-visible) strong,
.account-detail a.record:hover strong, .order-target:is(:hover,:focus-visible) strong,
.order-line a:hover, a.dash-row:hover strong { text-decoration: none; }
.product-art::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: .7rem .7rem auto auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2329783e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18 18 6M7 6h11v11'/%3E%3C/svg%3E") center / 1rem no-repeat;
  box-shadow: 0 2px 8px #193d251a;
  pointer-events: none;
}
.product-card:focus-visible .product-art, .family:focus-visible { box-shadow: inset 0 0 0 2px #81b58f; }

@media (hover: hover) and (pointer: fine) {
  .wide-nav a:hover { background: #edf6ee; color: #215e34; }
  .product-art::before { opacity: 0; transform: translate(-.25rem,.25rem); }
  .product-card:is(:hover,:focus-visible) .product-art::before { opacity: 1; transform: none; }
  :is(.home-page,.refined-page) .product-card:hover .product-art {
    background: #edf5ef;
    box-shadow: 0 .5rem 1.35rem #18392412;
  }
  :is(.home-page,.refined-page) .product-card:hover h3 { color: #206239; }
  .contact-page .direct-contacts a:hover, .centers-page .center-contacts a:hover { background: #d9eddd; }
  .foot a:hover { color: #c3f3c6; }
  .basket-controls .remove-item:hover { background: #fff1ed; color: #88392e; }
}
@media (prefers-reduced-motion: no-preference) {
  .action-feedback:not(:empty):not(.action-error,.action-success)::before, :is(button,.btn,.button,.dash-primary)[aria-busy="true"]::after {
    animation: action-spin .8s linear infinite;
  }
  @keyframes action-spin { to { transform: rotate(1turn); } }
  input[type="submit"].action-pending { animation: action-sweep 1.2s ease-in-out infinite; }
  @keyframes action-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .product-art, .product-art img, .product-art::before, .family,
  :is(.text-link,.quiet-link,.direct-contacts a,.center-contacts a)::after,
  .btn, .dash-primary, .button, button, .wide-nav a {
    transition: transform .2s ease-out, background-color .2s ease-out, box-shadow .2s ease-out, opacity .2s ease-out;
  }
  :is(.home-page,.refined-page) .product-card:hover .product-art img { transform: scale(1.045); }
  .home-page .family:hover, .btn:hover, .dash-primary:hover, .button:hover { transform: translateY(-2px); }
  :is(.text-link,.quiet-link,.direct-contacts a,.center-contacts a):hover::after { transform: translateX(.18rem) rotate(45deg); }
  .btn:active, .button:active, .dash-primary:active { transform: none; }
}
