/*!
 * WN Report — shared "Report content" action + modal. Token-driven, RTL-aware, mobile bottom sheet.
 * Deliberately quiet: the report action must never dominate legitimate content.
 */

/* --- trigger button ------------------------------------------------------- */
.wn-report-btn {
    display: inline-flex; align-items: center; gap: 5px;
    font: inherit; font-size: 13px; font-weight: 500; line-height: 1.2; cursor: pointer;
    border: 0; background: transparent; color: #94a3b8; padding: 4px 6px; border-radius: 6px;
    transition: color .15s ease, background-color .15s ease;
}
.wn-report-btn:hover, .wn-report-btn:focus-visible { color: #dc2626; background: rgba(220, 38, 38, .06); }
.wn-report-btn:focus-visible { outline: 2px solid rgba(220, 38, 38, .35); outline-offset: 1px; }
.wn-report-btn__icon { font-size: 17px; line-height: 1; width: 1em; height: 1em; flex: none; }
.wn-report-btn--icon { padding: 4px; }
/* Product buy-box (text variant, not the Q&A inline link): a small outlined control that reads as a
   real action alongside the other buy-box buttons, with a neutral resting state so it never accuses
   the seller. The Q&A "Report" keeps its quiet text-link look via the :not() guard. */
.wn-report-btn--text:not(.wn-qa__link) {
    gap: 6px; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px;
    border: 1px solid var(--rfq-border, #cbd5e1); background: var(--rfq-surface, #fff); color: var(--rfq-ink, #475569);
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.wn-report-btn--text:not(.wn-qa__link):hover,
.wn-report-btn--text:not(.wn-qa__link):focus-visible {
    border-color: #dc2626; color: #dc2626; background: rgba(220, 38, 38, .04);
}
/* Always visible on every card (no longer hover-gated) so the report action is
   reliably discoverable. Kept quiet via the resting grey + translucent pill. */
.wn-report-btn--card { opacity: 1; position: absolute; inset-inline-end: 8px; bottom: 8px; z-index: 3; background: rgba(255, 255, 255, .92); }
.wn-report-btn--menu-item { width: 100%; justify-content: flex-start; padding: 8px 12px; border-radius: 0; font-size: 14px; }

/* --- modal ---------------------------------------------------------------- */
.wnr-modal { position: fixed; inset: 0; z-index: 10060; display: none; }
.wnr-modal.is-open { display: block; }
body.wnr-open { overflow: hidden; }
.wnr-modal__overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.wnr-modal__dialog {
    position: relative; max-width: 460px; width: calc(100% - 32px); margin: 7vh auto;
    max-height: 86vh; overflow-y: auto;
    background: var(--rfq-surface, #fff); color: var(--rfq-ink, #0f172a);
    border-radius: 14px; padding: 24px; box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
}
.wnr-modal__close { position: absolute; top: 10px; inset-inline-end: 14px; border: 0; background: transparent; font-size: 26px; cursor: pointer; color: #64748b; line-height: 1; }
.wnr-modal__title { font-size: 18px; font-weight: 700; margin: 0 0 10px; padding-inline-end: 24px; }
.wnr-target { font-size: 13px; color: #475569; margin: 0 0 6px; overflow-wrap: anywhere; }
.wnr-intro { font-size: 12.5px; color: #94a3b8; margin: 0 0 14px; line-height: 1.5; }

.wnr-field { display: block; margin-bottom: 12px; }
.wnr-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.wnr-field em { font-style: normal; font-weight: 400; color: #94a3b8; font-size: 12px; }
.wnr-field em.wnr-required { color: #dc2626; font-weight: 600; }
.wnr-input { width: 100%; border: 1px solid var(--rfq-border, #cbd5e1); border-radius: 8px; padding: 9px 11px; font: inherit; background: var(--rfq-surface, #fff); color: inherit; }
.wnr-input:focus { outline: none; border-color: var(--rfq-accent, #2563eb); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.wnr-textarea { resize: vertical; min-height: 84px; }
.wnr-help { font-size: 12.5px; color: #64748b; background: #f8fafc; border-radius: 8px; padding: 8px 10px; margin: -4px 0 12px; }

.wnr-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; cursor: pointer; margin: 4px 0 14px; user-select: none; }
.wnr-check input { flex: none; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--rfq-accent, #2563eb); }

.wnr-actions { display: flex; justify-content: flex-end; gap: 10px; }
.wnr-cancel { border: 1px solid var(--rfq-border, #cbd5e1); background: transparent; color: #475569; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.wnr-submit { border: 0; border-radius: 8px; cursor: pointer; background: #dc2626; color: #fff; font-weight: 600; padding: 10px 18px; font-size: 14px; }
.wnr-submit:hover { background: #b91c1c; }
.wnr-submit:disabled { opacity: .7; cursor: progress; }

.wnr-feedback { margin-top: 12px; border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.wnr-feedback--ok { background: #dcfce7; color: #166534; }
.wnr-feedback--warn { background: #fef9c3; color: #854d0e; }

/* --- mobile bottom sheet --------------------------------------------------- */
@media (max-width: 575.98px) {
    .wnr-modal__dialog {
        margin: 0; max-width: none; width: 100%;
        position: absolute; inset-inline: 0; bottom: 0;
        border-radius: 16px 16px 0 0; max-height: 92vh;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
    .wnr-actions { flex-direction: column-reverse; }
    .wnr-actions button { width: 100%; }
}

/* --- RTL ------------------------------------------------------------------- */
[dir="rtl"] .wnr-actions { justify-content: flex-start; }
[dir="rtl"] .wn-report-btn__icon { transform: scaleX(-1); }
