/* The feedback dialog behind the status bar's Feedback button (Pages/Shared/_Feedback.cshtml, or
   Components/Feedback.razor in a Blazor tool). The same file in every web tool - the canonical copy
   is shared/feedback-and-privacy/feedback.css. Its colours come from the --fxm-* custom properties
   each tool maps onto its own tokens in css/app.css; the fallbacks are the house greys. */

.feedback:not([open]) {
    display: none;
}

.feedback {
    width: min(30rem, 94vw);
    max-height: 90vh;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--fxm-border, #262f3a);
    border-radius: 10px;
    background: var(--fxm-pane, #15191f);
    color: var(--fxm-text, #dde5ee);
    font-family: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.8125rem;
}

.feedback::backdrop {
    background: rgba(4, 7, 10, 0.62);
}

.feedback-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--fxm-border, #262f3a);
    background: var(--fxm-pane-alt, #11151a);
}

.feedback-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.feedback-close {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--fxm-muted, #8391a2);
    font: inherit;
    cursor: pointer;
}

.feedback-close:hover {
    border-color: var(--fxm-border, #262f3a);
    background: var(--fxm-hover, #1e242d);
    color: var(--fxm-text, #dde5ee);
}

.feedback-form,
.feedback-thanks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

/* The script swaps the form for the thanks with `hidden`, which the display above would outweigh. */
.feedback [hidden] {
    display: none;
}

.feedback-thanks p {
    margin: 0;
}

.feedback-moods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0 0 0.25rem;
    padding: 0;
    border: 0;
}

.feedback-label {
    padding: 0;
    color: var(--fxm-muted, #8391a2);
    font-size: 0.75rem;
}

.feedback-moods .feedback-label {
    width: 100%;
    margin-bottom: 0.375rem;
}

.feedback-mood input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-mood > span {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border: 1px solid var(--fxm-border, #262f3a);
    border-radius: 999px;
    background: var(--fxm-field, #12161c);
    color: var(--fxm-muted, #8391a2);
    font-size: 0.75rem;
    cursor: pointer;
}

.feedback-mood > span:hover {
    background: var(--fxm-hover, #1e242d);
    color: var(--fxm-text, #dde5ee);
}

.feedback-mood input:checked + span {
    border-color: var(--fxm-accent-dim, rgba(131, 145, 162, 0.45));
    background: var(--fxm-accent-wash, rgba(131, 145, 162, 0.14));
    color: var(--fxm-accent, #8391a2);
}

.feedback-mood input:focus-visible + span {
    outline: 2px solid var(--fxm-accent, #8391a2);
    outline-offset: 1px;
}

.feedback-input {
    padding: 0.4375rem 0.625rem;
    border: 1px solid var(--fxm-border, #262f3a);
    border-radius: 6px;
    background: var(--fxm-field, #12161c);
    color: var(--fxm-text, #dde5ee);
    font: inherit;
    resize: vertical;
}

.feedback-input:focus-visible {
    border-color: var(--fxm-accent-dim, rgba(131, 145, 162, 0.45));
    outline: none;
}

/* The honeypot: off screen rather than display: none, which some bots know to skip. */
.feedback-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.feedback-note {
    margin: 0.25rem 0 0;
    color: var(--fxm-faint, #56626f);
    font-size: 0.6875rem;
    line-height: 1.5;
}

.feedback-note a {
    color: var(--fxm-muted, #8391a2);
}

.feedback-error {
    margin: 0;
    color: var(--fxm-danger, #f2777a);
    font-size: 0.75rem;
}

.feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.feedback-btn {
    padding: 0.3125rem 0.875rem;
    border: 1px solid var(--fxm-border, #262f3a);
    border-radius: 6px;
    background: transparent;
    color: var(--fxm-text, #dde5ee);
    font: inherit;
    cursor: pointer;
}

.feedback-btn:hover:not(:disabled) {
    background: var(--fxm-hover, #1e242d);
}

.feedback-btn.is-primary {
    border-color: var(--fxm-accent-dim, rgba(131, 145, 162, 0.45));
    background: var(--fxm-accent-wash, rgba(131, 145, 162, 0.14));
    color: var(--fxm-accent, #8391a2);
}

.feedback-btn:disabled {
    cursor: default;
    opacity: 0.5;
}
