/* ============================================================
   Floating feedback widget ("Задать вопрос")
   Bottom-right FAB + slide-in panel form.
   ============================================================ */

.feedback-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1030;
    font-family: inherit;
}

/* ---- Floating button ---- */
.feedback-fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feedback-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(124, 58, 237, 0.5);
    color: #fff;
}
.feedback-fab:active { transform: translateY(0); }
.feedback-fab i { font-size: 18px; }

/* ---- Panel ---- */
.feedback-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    width: 340px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s;
    z-index: 1090;
}
.feedback-panel.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}
.feedback-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
}
.feedback-panel-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.feedback-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.feedback-panel-close:hover { background: rgba(255, 255, 255, 0.35); }
.feedback-panel-body { padding: 16px; }
.feedback-panel-body .form-label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
}
.feedback-panel-body .form-control { font-size: 14px; }
.feedback-panel-body .mb-2 { margin-bottom: 10px !important; }
.feedback-submit {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.feedback-submit:hover { opacity: 0.92; }
.feedback-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.feedback-hint {
    font-size: 12px;
    color: #6c757d;
    margin: 8px 0 0;
    text-align: center;
}

/* ---- Admin settings (only rendered for admins) ---- */
.feedback-admin {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #d9c7f5;
}
.feedback-admin > summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #6f42c1;
    margin-bottom: 8px;
    list-style: none;
}
.feedback-admin > summary::-webkit-details-marker { display: none; }
.feedback-admin[open] > summary { margin-bottom: 12px; }
.feedback-admin .form-label { font-size: 12px; }
.feedback-submit-sm { padding: 7px; font-size: 13px; }

/* ---- Mobile: icon-only FAB ---- */
@media (max-width: 480px) {
    .feedback-fab .fw-label { display: none; }
    .feedback-fab { padding: 14px; }
}

/* Honeypot: убран с экрана, но доступен ботам, которые заполняют все поля */
.feedback-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
