/* REWAA 40.0 — product stock alert UI. No changes to the header ticker or existing purchase flow. */
.stock-alert40 { width: 100%; min-width: 0; margin: 0; }
.stock-alert40 > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid #183d80; border-radius: 12px; background: #17346f; color: #fff; font-size: 14px; font-weight: 800; line-height: 1.5; text-align: center; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.stock-alert40 > summary::-webkit-details-marker { display: none; }
.stock-alert40 > summary::marker { content: ''; }
.stock-alert40 > summary svg, [data-stock-alert-scroll] svg, .stock-alert-card-link svg, .compare-stock-alert40 svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stock-alert40 > summary:hover { background: #21458b; }
.stock-alert40 > summary:focus-visible, .stock-alert40-form input:focus-visible, .stock-alert40-form button:focus-visible { outline: 3px solid #22a9e0; outline-offset: 3px; }
.stock-alert40[open] > summary { border-radius: 12px 12px 0 0; }
.stock-alert40-form { display: grid; gap: 10px; padding: 14px; border: 1px solid #d9e4f2; border-top: 0; border-radius: 0 0 12px 12px; background: #fff; }
.stock-alert40-form > label { color: #344b67; font-size: 12px; font-weight: 700; }
.stock-alert40-form > input[type="email"] { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #cbd9eb; border-radius: 9px; padding: 10px 12px; background: #fbfdff; color: #091426; font: inherit; font-size: 13px; direction: ltr; text-align: left; }
.stock-alert40-form > input[type="email"]::placeholder { color: #91a0b2; }
.stock-alert40-submit { min-height: 42px; border: 0; border-radius: 9px; background: #22a9e0; color: #091426; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.stock-alert40-submit:hover { background: #6fcdf4; }
.stock-alert40-submit:disabled { opacity: .65; cursor: wait; }
.stock-alert40-form > small { color: #6b7d92; font-size: 11px; line-height: 1.8; }
.stock-alert40-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }
.stock-alert40-feedback { margin-top: 8px; padding: 10px 12px; border: 1px solid #dce6ef; border-radius: 9px; background: #f7fafc; color: #344b67; font-size: 12px; line-height: 1.8; }
.stock-alert40-feedback.is-success { border-color: #a1e7c6; background: #eafaf2; color: #0e6b47; }
.stock-alert40-feedback.is-error { border-color: #f0c7c4; background: #fff5f4; color: #a92b23; }
.stock-alert-card-link { text-decoration: none !important; }
.stock-alert-card-link:hover { filter: brightness(.98); }
.compare-stock-alert40 { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 7px 9px; border: 1px solid #cbd9eb; border-radius: 8px; background: #f4f8fc; color: #17346f; font-size: 11px; font-weight: 700; line-height: 1.5; text-decoration: none !important; }
.compare-stock-alert40 svg { width: 15px; height: 15px; }
[data-stock-alert-scroll] { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
[data-stock-alert-scroll] svg { width: 16px; height: 16px; }
@media (max-width: 480px) {
  .stock-alert40 > summary { min-height: 48px; padding: 11px 12px; font-size: 13px; }
  .stock-alert40-form { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) { .stock-alert40 > summary { transition: none; } }


/* Phase 40.1 — differentiate stock alerts from purchase actions. */
.stock-alert40 > summary,
.stock-alert-card-link,
.product-card .quick-add.stock-alert-card-link,
.compare-stock-alert40,
[data-stock-alert-scroll] {
    border-color: #E8C86C !important;
    background: #FFF1C2 !important;
    color: #684B00 !important;
}
.stock-alert40 > summary:hover,
.stock-alert-card-link:hover,
.product-card .quick-add.stock-alert-card-link:hover,
.compare-stock-alert40:hover,
[data-stock-alert-scroll]:hover {
    border-color: #D9B64D !important;
    background: #FFE7A0 !important;
    color: #5A4000 !important;
}
.stock-alert40 > summary:focus-visible,
.stock-alert-card-link:focus-visible,
.compare-stock-alert40:focus-visible,
[data-stock-alert-scroll]:focus-visible {
    outline: 3px solid #B78300 !important;
    outline-offset: 3px;
}
.stock-alert40 > summary svg,
.stock-alert-card-link svg,
.compare-stock-alert40 svg,
[data-stock-alert-scroll] svg {
    color: currentColor;
}
