/* ==========================================================================
   TPA Social Proof — Рейтинг «Мам-экспертов»
   ========================================================================== */

/* --- Одиночный бейдж --- */
.tpasp-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    line-height: 1.35;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1fae5;
    background: #f0fdf4;
    color: #166534;
}
.tpasp-badge.tpasp-state-new {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #475569;
}
.tpasp-badge.tpasp-state-disputed {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}
.tpasp-badge.is-busy {
    opacity: .6;
    pointer-events: none;
}
.tpasp-badge-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tpasp-check {
    font-size: 15px;
}
.tpasp-text b.tpasp-count {
    font-weight: 800;
}
.tpasp-when {
    opacity: .85;
}
.tpasp-dispute-note {
    font-size: 12px;
    color: #b45309;
    background: #fef3c7;
    border-radius: 999px;
    padding: 2px 8px;
}

/* Кнопки голосования */
.tpasp-actions {
    display: inline-flex;
    gap: 6px;
    margin-left: 2px;
}
.tpasp-btn {
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    transition: all .15s ease;
    line-height: 1.4;
}
.tpasp-btn:hover {
    border-color: #94a3b8;
}
.tpasp-btn-yes.is-active {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.tpasp-btn-no.is-active {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
}

/* Всплывающее уведомление после голоса */
.tpasp-flash {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 5;
}
.tpasp-flash.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.tpasp-flash.is-error {
    background: #b91c1c;
}

/* --- Блок рейтинга --- */
.tpasp-rating {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    margin: 18px 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}
.tpasp-rating-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.tpasp-rating-emoji {
    font-size: 30px;
    line-height: 1;
}
.tpasp-rating-title {
    margin: 0 0 2px;
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
}
.tpasp-rating-sub {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}
.tpasp-rating-total {
    margin-left: auto;
    white-space: nowrap;
    background: #ecfdf5;
    color: #047857;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
}
.tpasp-rating-total b {
    font-weight: 800;
}
.tpasp-rating-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.tpasp-rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.tpasp-rating-item:last-child {
    border-bottom: 0;
}
.tpasp-rating-fact {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}
.tpasp-rating-fact .tpasp-fi {
    margin-right: 4px;
}
.tpasp-rating-foot {
    margin: 14px 0 0;
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* Компактный бейдж внутри списка */
.tpasp-badge.tpasp-compact {
    font-size: 13px;
    padding: 4px 8px;
}

@media (max-width: 600px) {
    .tpasp-rating-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .tpasp-rating-total {
        margin-left: 0;
    }
}
