/* Global feedback reporting keeps one accessible form available across authenticated pages. */
.feedback-report-trigger {
    position: fixed;
    z-index: 190;
    right: 24px;
    bottom: 24px;
    min-height: 46px;
    padding: 11px 17px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: var(--navy-900);
    box-shadow: 0 10px 28px rgba(7, 23, 39, .24);
}

.feedback-report-trigger:hover {
    background: var(--navy-800);
    box-shadow: 0 14px 34px rgba(7, 23, 39, .3);
}

.feedback-report-trigger:focus-visible,
.feedback-report-close:focus-visible {
    outline: 3px solid rgba(49, 146, 208, .3);
    outline-offset: 3px;
}

.feedback-report-trigger svg,
.feedback-report-heading-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feedback-report-dialog {
    width: min(760px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--interface-border);
    border-radius: var(--interface-card-radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 28px 80px rgba(7, 23, 39, .34);
}

.feedback-report-dialog::backdrop {
    background: rgba(7, 23, 39, .6);
    backdrop-filter: blur(3px);
}

.feedback-report-panel {
    max-height: calc(100dvh - 34px);
    overflow-y: auto;
}

.feedback-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: var(--interface-card-padding);
    border-bottom: 1px solid var(--interface-divider);
    background: #fff;
}

.feedback-report-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.feedback-report-heading-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: var(--interface-tile-radius);
    background: var(--blue-100);
    color: var(--blue-700);
}

.feedback-report-heading p,
.feedback-report-heading h2 {
    margin: 0;
}

.feedback-report-heading h2 {
    color: var(--navy-950);
    font-size: var(--interface-heading-size);
    line-height: 1.25;
}

.feedback-report-close {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    box-shadow: var(--shadow-small);
}

.feedback-report-close:hover {
    border-color: var(--blue-500);
    background: var(--blue-050);
    color: var(--navy-900);
}

.feedback-report-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.feedback-report-body {
    padding: var(--interface-card-padding);
}

.feedback-report-introduction {
    margin: 0 0 21px;
    color: var(--muted);
    font-size: var(--interface-helper-size);
    font-weight: 500;
    line-height: 1.5;
}

/* The visible location explains the minimized context sent with each report. */
.feedback-report-context {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 8px 10px;
    border: 1px solid var(--blue-200);
    border-radius: var(--interface-tile-radius);
    background: var(--blue-050);
}

.feedback-report-location {
    display: flex;
    align-items: center;
    gap: 9px;
}

.feedback-report-location.is-general .feedback-report-location-icon {
    background: #f6f8fa;
    color: var(--muted);
}

.feedback-report-location.is-general .feedback-report-location-copy small {
    color: var(--muted);
}

.feedback-report-location-icon {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fff;
    color: var(--blue-700);
}

.feedback-report-location-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.feedback-report-location-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.feedback-report-location-copy small {
    color: var(--blue-700);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.feedback-report-location-copy [data-feedback-location-label] {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: var(--interface-helper-size);
    font-weight: 500;
    line-height: 1.45;
}

.feedback-report-general-option {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 9px;
    margin: 0;
    padding: 1px 0 1px 10px;
    border-left: 1px solid var(--blue-200);
    cursor: pointer;
}

.feedback-report-general-option input {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    min-height: 0;
    margin: 0;
    accent-color: var(--blue-700);
}

.feedback-report-general-option > span {
    display: grid;
    gap: 1px;
}

.feedback-report-general-option strong {
    color: var(--navy-900);
    font-size: var(--interface-tile-heading-size);
    line-height: 1.25;
}

.feedback-report-general-option small {
    color: var(--muted);
    font-size: var(--interface-helper-size);
    line-height: 1.5;
}

/* Keep the opt-out explanation compact when the dialog has desktop room. */
@media (min-width: 621px) {
    .feedback-report-general-option small {
        white-space: nowrap;
    }
}

.feedback-report-types {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.feedback-report-types legend,
.feedback-report-description-field > label,
.feedback-report-impact-field > label,
.feedback-report-attachment-field > label {
    display: block;
    margin: 0 0 5px;
    color: var(--navy-800);
    font-size: var(--interface-label-size);
    font-weight: 750;
}

/* Impact and attachment fields remain explicit without enlarging the trusted payload. */
.feedback-report-impact-field,
.feedback-report-description-field,
.feedback-report-attachment-field {
    margin-bottom: 18px;
}

.feedback-report-impact-field select {
    width: 100%;
}

.feedback-report-impact-field > small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: var(--interface-helper-size);
    line-height: 1.5;
}

.feedback-report-type-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.feedback-report-type {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    margin: 0;
    padding: 13px 14px;
    border: 1px solid var(--interface-border);
    border-radius: var(--interface-tile-radius);
    background: var(--interface-edit-surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.feedback-report-type:hover {
    border-color: var(--blue-500);
    background: var(--blue-050);
}

.feedback-report-type:has(input:checked) {
    border-color: var(--blue-600);
    background: var(--blue-050);
    box-shadow: 0 0 0 3px rgba(49, 146, 208, .12);
}

.feedback-report-type:has(input:focus-visible) {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(49, 146, 208, .2);
}

.feedback-report-type input {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.feedback-report-type-copy {
    display: grid;
    gap: 2px;
}

.feedback-report-type-copy strong {
    color: var(--navy-900);
    font-size: var(--interface-tile-heading-size);
    line-height: 1.25;
}

.feedback-report-type-copy small {
    color: var(--muted);
    font-size: var(--interface-helper-size);
    font-weight: 500;
}

.feedback-report-type > svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: var(--blue-600);
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feedback-report-description-field textarea {
    min-height: 122px;
}

.feedback-report-attachment-field input[type="file"] {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--interface-border);
    border-radius: var(--control-radius);
    background: #fff;
    color: var(--text);
    font-size: var(--interface-value-size);
    font-weight: 450;
}

.feedback-report-attachment-field small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.feedback-report-field-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 6px;
    color: var(--muted);
}

.feedback-report-field-meta small {
    font-size: 11px;
}

.feedback-report-field-meta small:last-child {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.feedback-report-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 17px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6f8fa;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.feedback-report-privacy svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: var(--blue-700);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feedback-report-status {
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid #f0d296;
    border-radius: 8px;
    background: #fff8e8;
    color: #7b5604;
    font-size: 12px;
    font-weight: 650;
}

.feedback-report-status.is-success {
    border-color: #add8bb;
    background: #effaf2;
    color: #176332;
}

.feedback-report-status.is-error {
    border-color: #efb4b4;
    background: #fff1f1;
    color: #8d2424;
}

.feedback-report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 21px;
}

.feedback-report-actions .button {
    min-width: 108px;
}

.feedback-report-history-link {
    align-self: center;
    margin-right: auto;
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 620px) {
    .feedback-report-trigger {
        right: 14px;
        bottom: 14px;
        width: 46px;
        min-width: 46px;
        height: 46px;
        padding: 0;
    }

    .feedback-report-trigger span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .feedback-report-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 13px;
    }

    .feedback-report-panel {
        max-height: calc(100dvh - 18px);
    }

    .feedback-report-header,
    .feedback-report-body {
        padding-right: 17px;
        padding-left: 17px;
    }

    .feedback-report-type-options {
        grid-template-columns: 1fr;
    }

    .feedback-report-context {
        grid-template-columns: 1fr;
    }

    .feedback-report-general-option {
        margin-top: 2px;
        padding: 9px 0 0;
        border-top: 1px solid var(--blue-200);
        border-left: 0;
    }

    .feedback-report-type {
        min-height: 66px;
    }

    .feedback-report-field-meta small:first-child {
        display: none;
    }

    .feedback-report-field-meta {
        justify-content: flex-end;
    }

    .feedback-report-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .feedback-report-actions .button {
        width: 100%;
    }

    .feedback-report-history-link {
        align-self: center;
        margin: 3px 0 0;
    }
}
