/* ============================
   KitchenCloud – Nachrichten-Widget
   ============================
   Globales Icon (unten rechts) für eingeloggte Nicht-Admins, um eine Nachricht
   an den Admin zu schicken. Wird in _Layout.cshtml eingebunden, siehe kc-nachricht.js.
*/

#kc-nachricht-widget {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1050;
}

.kc-nachricht-fab {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--kc-primary);
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(47, 58, 29, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

    .kc-nachricht-fab:hover {
        background: var(--kc-primary-light);
        transform: translateY(-2px);
    }

.kc-nachricht-panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    width: 320px;
    max-width: calc(100vw - 3rem);
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.kc-nachricht-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--kc-primary);
    color: white;
    font-weight: 600;
}

.kc-nachricht-close {
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.85;
}

    .kc-nachricht-close:hover {
        opacity: 1;
    }

.kc-nachricht-panel-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.kc-nachricht-panel-body textarea {
    resize: vertical;
}

.kc-nachricht-feedback {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.kc-nachricht-feedback--success {
    background: var(--kc-bg-soft);
    color: var(--kc-primary);
}

.kc-nachricht-feedback--error {
    background: #fdecea;
    color: #c0392b;
}

/* ----------------------------
   Admin-Postkorb (Views/AdminGui/Postkorb.cshtml)
   ---------------------------- */
.kc-nachricht-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kc-nachricht-item {
    background: white;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 4px 14px rgba(47, 58, 29, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.kc-nachricht-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.kc-nachricht-item-absender {
    font-weight: 700;
    color: var(--kc-primary);
}

.kc-nachricht-item-datum {
    font-size: 0.8rem;
    color: #9aa08c;
}

.kc-nachricht-item-rezept {
    align-self: flex-start;
    text-decoration: none;
}

/* Inline-Formular in der Passwortanfragen-Liste (Views/AdminGui/Passwortanfragen.cshtml) -
   nutzt dieselbe .kc-nachricht-item-Karte, braucht aber Eingabefeld + Button nebeneinander. */
.kc-passwortanfrage-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

    .kc-passwortanfrage-form input {
        flex: 1;
        min-width: 220px;
    }

.kc-nachricht-item-text {
    white-space: pre-wrap;
    margin: 0;
    color: var(--kc-text);
}

/* ----------------------------
   Responsive
   ---------------------------- */
@media (max-width: 480px) {
    #kc-nachricht-widget {
        right: 1rem;
        bottom: 1rem;
    }

    .kc-nachricht-panel {
        width: calc(100vw - 2rem);
    }
}
