.rx-resource-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rx-feedback-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--lg-pill-line, rgba(255, 255, 255, .64));
    border-radius: 999px;
    background: var(--lg-pill-bg, rgba(255, 255, 255, .30));
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76), 0 2px 8px -4px rgba(15, 23, 42, .06);
    color: var(--lg-subink, var(--rx-muted));
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

[data-theme="dark"] .rx-feedback-toggle {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 12px -6px rgba(0, 0, 0, .35);
}

.rx-feedback-toggle:hover,
.rx-feedback-toggle[aria-expanded="true"] {
    transform: translateY(-0.5px);
    border-color: rgba(45, 108, 223, .45);
    color: var(--lg-accent, var(--rx-blue));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 14px -6px rgba(45, 108, 223, .22);
}

.rx-feedback-toggle svg {
    width: 12.5px;
    height: 12.5px;
}

.rx-feedback-dialog {
    width: min(440px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 24px);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .74);
    border-radius: 22px;
    background-color: rgba(246, 248, 252, .92);
    background-image:
        radial-gradient(120% 90% at 15% -5%, rgba(255, 255, 255, .78) 0%, transparent 65%),
        linear-gradient(160deg, rgba(255, 255, 255, .45), rgba(238, 242, 248, .28));
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: rgba(15, 23, 42, .92);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", sans-serif;
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, .95),
        inset 1.5px 1.5px 0 -0.4px rgba(130, 210, 255, .20),
        inset -1.5px -1.5px 0 -0.4px rgba(255, 178, 214, .15),
        0 28px 72px -18px rgba(15, 23, 42, .18);
    overflow: auto;
}

[data-theme="dark"] .rx-feedback-dialog {
    border-color: rgba(255, 255, 255, .18);
    background-color: rgba(18, 23, 33, .92);
    background-image:
        radial-gradient(120% 90% at 15% -5%, rgba(255, 255, 255, .12) 0%, transparent 65%),
        linear-gradient(160deg, rgba(30, 38, 54, .45), rgba(14, 18, 28, .35));
    color: rgba(244, 247, 252, .94);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .24),
        inset 1.5px 1.5px 0 -0.4px rgba(130, 210, 255, .18),
        inset -1.5px -1.5px 0 -0.4px rgba(255, 178, 214, .13),
        0 32px 84px rgba(0, 0, 0, .55);
}

.rx-feedback-dialog::backdrop {
    background: rgba(226, 232, 240, .52);
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
[data-theme="dark"] .rx-feedback-dialog::backdrop {
    background: rgba(5, 9, 16, .66);
}

.rx-feedback-form {
    padding: 24px;
}

.rx-feedback-form > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.rx-feedback-form h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.35;
}

.rx-feedback-form header p {
    margin: 5px 0 0;
    color: var(--rx-muted);
    font-size: 12px;
}

.rx-feedback-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 999px;
    background: rgba(255, 255, 255, .42);
    color: var(--rx-muted);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}
[data-theme="dark"] .rx-feedback-close {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.rx-feedback-close:hover { color: var(--rx-text); }
.rx-feedback-close svg { width: 16px; height: 16px; }

.rx-feedback-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.rx-feedback-form fieldset + fieldset { margin-top: 18px; }
.rx-feedback-form legend { margin-bottom: 9px; color: var(--rx-muted); font-size: 11px; font-weight: 600; }

.rx-feedback-options { display: grid; gap: 9px; }
.rx-feedback-providers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rx-feedback-issues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rx-feedback-options label { position: relative; cursor: pointer; }
.rx-feedback-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.rx-feedback-options span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 13px;
    background: rgba(255, 255, 255, .45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 2px 6px -3px rgba(15, 23, 42, .06);
    color: inherit;
    font-size: 12px;
    font-weight: 550;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
[data-theme="dark"] .rx-feedback-options span {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.rx-feedback-options label:hover span {
    border-color: rgba(45, 108, 223, .46);
}

.rx-feedback-options input:checked + span {
    border-color: rgba(45, 108, 223, .65);
    background: rgba(56, 118, 226, .12);
    color: #1d5bd6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(45, 108, 223, .38);
}
[data-theme="dark"] .rx-feedback-options input:checked + span {
    background: rgba(75, 141, 255, .20);
    color: #9dc2ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 0 0 1px rgba(110, 168, 255, .48);
}

.rx-feedback-options input:focus-visible + span {
    outline: 2px solid var(--rx-blue);
    outline-offset: 2px;
}

.rx-feedback-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.rx-feedback-actions > button {
    min-height: 40px;
    padding: 9px 20px;
    border: 1px solid rgba(45, 108, 223, .45);
    border-radius: 999px;
    background: linear-gradient(155deg, rgba(48, 112, 232, .88), rgba(37, 94, 210, .92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px -8px rgba(37, 99, 235, .45);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.rx-feedback-actions > button:hover { filter: brightness(1.06); }
.rx-feedback-actions > button:disabled { cursor: wait; opacity: .62; }

.rx-feedback-status {
    flex: 1;
    min-width: 0;
    margin: 0;
    color: var(--rx-muted);
    font-size: 11px;
    line-height: 1.5;
}
.rx-feedback-status.is-success { color: #169869; }
.rx-feedback-status.is-error { color: #d94c5c; }

.rx-feedback-trap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

@media (max-width: 480px) {
    .rx-resource-heading { gap: 6px; }
    .rx-feedback-toggle { min-height: 36px; padding: 6px 11px; font-size: 11px; }
    .rx-feedback-toggle svg { width: 14px; height: 14px; }
    .rx-feedback-form { padding: 20px 16px 18px; }
    .rx-feedback-form h3 { font-size: 17px; }
    .rx-feedback-close { width: 40px; height: 40px; }
    .rx-feedback-options span { min-height: 48px; padding: 9px 6px; font-size: 11.5px; }
    .rx-feedback-actions > button { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .rx-feedback-toggle, .rx-feedback-options span { transition: none; }
}
