/* ═══ Кнопка-звезда в панели сообщения ═══ */
.rag-fb-btn { color: #8b8b98; }
.rag-fb-btn:hover { color: #f0c040; }
.rag-fb-btn.rated { color: #f0c040; cursor: default; }
.rag-fb-btn svg { width: 16px; height: 16px; }

/* ═══ Overlay — как modal-overlay-unified ═══ */
.rag-fb-overlay {
    position: fixed; inset: 0;
    background: rgba(5, 8, 18, 0.7) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    display: flex; align-items: center; justify-content: center;
    z-index: var(--z-modal);
    animation: ragFbFadeIn .15s ease-out;
}
@keyframes ragFbFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══ Сама модалка — копия .modal-box + неоновое дыхание ═══ */
.rag-fb-modal {
    width: 100%;
    max-width: 480px;
    margin: 16px;
    color: #e4e4e7;
    display: flex; flex-direction: column;
    overflow: hidden;

    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(56, 139, 253, 0.05) 0%, transparent 50%),
        rgba(16, 20, 35, 0.75);
    backdrop-filter: blur(28px) saturate(1.5);
    -webkit-backdrop-filter: blur(28px) saturate(1.5);
    border: 1px solid rgba(167, 139, 250, 0.4) !important;
    border-radius: 18px;
    animation: ngBreatheSmooth 6s cubic-bezier(0.42, 0, 0.58, 1) infinite !important;
    will-change: box-shadow;
}

/* ═══ Шапка / тело / футер ═══ */
.rag-fb-modal .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rag-fb-modal .modal-header h3 {
    margin: 0; font-size: 15px; font-weight: 600; color: #f0f6fc;
}
.rag-fb-modal .modal-close {
    background: transparent; border: none; color: #8b8b98;
    font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px;
    transition: color .15s;
}
.rag-fb-modal .modal-close:hover { color: #fff; }

.rag-fb-modal .modal-body { padding: 18px; }

.rag-fb-modal .modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

/* ═══ Звёзды ═══ */
.rag-fb-stars {
    display: flex; gap: 10px; justify-content: center;
    margin: 4px 0 10px;
}
.rag-fb-star {
    cursor: pointer; color: #5a5a6a;
    padding: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color .15s, transform .15s;
}
.rag-fb-star svg { width: 30px; height: 30px; }
.rag-fb-star:hover { color: #f0c040; transform: scale(1.12); }
.rag-fb-star.filled { color: #f0c040; }

.rag-fb-hint {
    text-align: center; color: #8b8b98; font-size: 13px;
    margin-bottom: 14px; min-height: 18px;
}

/* ═══ Textarea — в стиле .modal-box textarea ═══ */
.rag-fb-comment {
    width: 100%; min-height: 90px; resize: vertical;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f0f6fc;
    font-family: inherit; font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.rag-fb-comment:focus {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}
.rag-fb-comment::placeholder { color: #6b6b78; }

.rag-fb-comment { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, 0.3) transparent; }
.rag-fb-comment::-webkit-scrollbar { width: 6px; }
.rag-fb-comment::-webkit-scrollbar-track { background: transparent; }
.rag-fb-comment::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.25); border-radius: 3px; }
.rag-fb-comment::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.45); }

/* ═══ Кнопки — наследуем глобальные .btn-primary (зелёная) / .btn-secondary ═══ */
/* ═══ Кнопка оценки транскрипции ═══ */
/* Текст — как у других нейтральных кнопок, только иконка золотая */
button.tr-fb-btn svg {
    color: #f0c040;
    vertical-align: -2px;
}
button.tr-fb-btn:hover svg {
    color: #ffd966;
}
/* Полая звезда — прозрачная заливка, золотой контур */
button.tr-fb-btn svg path {
    stroke: currentColor !important;
    fill: none !important;
}
/* После оценки — звезда залита, текст тоже золотой */
button.tr-fb-btn.rated {
    color: #f0c040 !important;
    cursor: default !important;
    opacity: 1 !important;
}
button.tr-fb-btn.rated svg,
button.tr-fb-btn.rated svg path {
    fill: currentColor !important;
    stroke: currentColor !important;
}
/* Перебиваем .btn-purple на нашей кнопке — нейтральный текст */
button.tr-fb-btn,
button.tr-fb-btn:hover,
button.tr-fb-btn.btn-purple,
button.tr-fb-btn.btn-purple:hover {
    color: #c9d1d9 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}
button.tr-fb-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}
/* Иконка остаётся золотой */
button.tr-fb-btn svg { color: #f0c040 !important; }
button.tr-fb-btn:hover svg { color: #ffd966 !important; }
/* После оценки — текст и звезда жёлтые */
button.tr-fb-btn.rated,
button.tr-fb-btn.rated.btn-purple {
    color: #f0c040 !important;
}
button.tr-fb-btn svg {
    margin-right: 2px;
    margin-left: -2px;
	vertical-align: 0;
}