/* ========================================
   Feedback-Widget
   ======================================== */

/* Schwebender Button unten rechts */
#pw-feedback-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 99990;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

#pw-feedback-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Verdunkelter Hintergrund */
#pw-feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99991;
    transition: opacity 0.2s;
}

#pw-feedback-overlay.pw-fb-hidden {
    display: none;
}

/* Formular-Fenster */
#pw-feedback-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 99992;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s, transform 0.2s;
}

#pw-feedback-modal.pw-fb-hidden {
    display: none;
}

.pw-fb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.pw-fb-header h3 {
    margin: 0;
    font-size: 17px;
    color: #1a1a1a;
}

#pw-fb-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    line-height: 1;
}

#pw-fb-close:hover {
    color: #333;
}

.pw-fb-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
}

.pw-fb-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    margin-top: 12px;
}

/* Kategorie-Auswahl */
.pw-fb-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pw-fb-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    transition: background 0.15s;
}

.pw-fb-cat:hover {
    background: #f8f8f8;
}

.pw-fb-cat input[type="radio"] {
    margin: 0;
    accent-color: #2271b1;
}

/* Textfeld */
#pw-fb-message {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

#pw-fb-message:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.1);
}

/* E-Mail-Feld */
#pw-fb-email {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

#pw-fb-email:focus {
    border-color: #2271b1;
    outline: none;
}

/* Status-Meldung */
#pw-fb-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
}

#pw-fb-status.success {
    color: #00a32a;
}

#pw-fb-status.error {
    color: #d63638;
}

/* Responsive: Auf dem Handy volle Breite */
@media (max-width: 480px) {
    #pw-feedback-modal {
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }
    
    #pw-feedback-btn {
        bottom: 16px;
        right: 16px;
    }
}
