/* PantryPrep — the report button in the corner and the admin Feedback tab. */

/* ---------- report button ----------
   It used to float in the corner, where it covered list rows and form fields
   on every page, worst of all on a phone. It now sits in the footer: always
   there, never in the way. The class name stays so the dialog wiring and tests
   are unchanged. */

.feedback-fab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.35rem 0.9rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    cursor: pointer;
}

.feedback-fab:hover { color: var(--herb-deep); border-color: var(--herb); }

/* ---------- confirmation after a no-JavaScript submit ---------- */

.feedback-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 4.5rem;
    z-index: 15;
    margin: 0;
    text-align: left;
    color: var(--ink);
    box-shadow: 0 6px 20px rgba(27, 42, 32, 0.18);
    animation: feedback-toast-out 0.4s ease 6s forwards;
}

@keyframes feedback-toast-out {
    to { opacity: 0; visibility: hidden; }
}

/* ---------- dialog ---------- */

/* The dialog sits inside the footer, which centres small grey text. The
   dialog resets that so it reads like every other dialog. */
.feedback-dialog {
    text-align: left;
    font-size: 1rem;
}

.feedback-kind {
    border: 0;
    padding: 0;
    margin: 0 0 1.15rem;
}

.feedback-kind legend {
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.feedback-kind__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.95rem;
    cursor: pointer;
}

/* Undo the full-width, tall text-field styling that .field gives every input. */
.field .feedback-kind__option input {
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
}

.feedback-dialog textarea { resize: vertical; }

/* ---------- admin tab ---------- */

.feedback-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
}

.feedback__when { white-space: nowrap; }

.feedback__report { max-width: 32rem; }

.feedback__details {
    margin: 0.35rem 0 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

@media (max-width: 40rem) {
    .feedback-fab { min-height: 2.5rem; padding: 0 1rem; }

    .feedback-toast {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 3.75rem;
        max-width: none;
    }
}
