/* ============================================================
   Terapeuci Opinie – karta opinii (pełna szerokość)
   NeuroExpert brand · noomedica.pl
   ============================================================ */

/* ── Karta – layout poziomy ─────────────────────────────────── */
.to-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    transition: box-shadow .24s ease, border-color .22s ease;
}

.to-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .09);
    border-color: #cbd5e1;
}

/* ── Header: avatar · imię/data po lewej · gwiazdki po prawej ── */
.to-card__header {
    display: flex;
    align-items: center;    /* gwiazdki na poziomie imienia */
    gap: 14px;
}

/* Avatar */
.to-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #eaf4fa;
    color: #1577af;
    font-family: 'Title', Merriweather, Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 12px rgba(21, 119, 175, .12);
    letter-spacing: .02em;
}

/* Imię + data */
.to-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.to-card__name {
    font-family: 'Title', Merriweather, Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.to-card__date {
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 400;
}

/* Gwiazdki po prawej – wyrównane do środka imienia */
.to-card__stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.to-card__star {
    font-size: 16px;
    line-height: 1;
}

.to-card__star--on  { color: #f59e0b; }
.to-card__star--off { color: #e2e8f0; }

.to-card__score {
    margin-left: 6px;
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

/* ── Odpowiedź specjalisty ──────────────────────────────────── */
.to-card__reply {
    padding: 16px 18px;
    background: #eaf4fa;
    border-left: 3px solid #1577af;
    border-radius: 0 12px 12px 0;
}

.to-card__reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.to-card__reply-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1577af;
    color: #ffffff;
    font-family: 'Title', Merriweather, Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .02em;
}

.to-card__reply-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.to-card__reply-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #1577af;
    white-space: nowrap;
}

.to-card__reply-name {
    font-family: 'Title', Merriweather, Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.to-card__reply-date {
    margin-left: auto;
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
    white-space: nowrap;
}

.to-card__reply-text {
    margin: 0;
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: #334155;
}

/* ── Footer z badge ─────────────────────────────────────────── */
.to-card__footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.to-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    color: #047857;
    background: #ecfdf5;
    border-radius: 9999px;
    padding: 4px 12px;
    text-transform: uppercase;
    letter-spacing: .07em;
    white-space: nowrap;
}

.to-card__badge-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    font-size: 8px;
    font-weight: 800;
    background: #047857;
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Treść opinii ───────────────────────────────────────────── */
.to-card__text {
    padding-top: 2px;
}

.to-card__text p {
    margin: 0;
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 14.5px;
    line-height: 1.75;
    color: #475569;
}

/* ── Responsywność ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .to-card {
        padding: 18px 20px;
        border-radius: 16px;
        gap: 12px;
    }

    /* Na mobile: gwiazdki zawijają się pod imię */
    .to-card__stars {
        margin-left: 0;
        width: 100%;
    }
}

/* ══════════════════════════════════════════════════════════════
   Widget oceny terapeuty [terapeuta_ocena]
   ══════════════════════════════════════════════════════════════ */

.to-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    flex-wrap: nowrap;
}

.to-rating--empty {
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 12px;
    color: #94a3b8;
}

/* Liczba np. "4.9" */
.to-rating__avg {
    font-family: 'Title', Merriweather, Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-right: 2px;
}

/* Kontener gwiazdek SVG */
.to-rating__stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

/* Gwiazdki SVG */
.to-star {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.to-star--full  { fill: #f59e0b; stroke: #f59e0b; }
.to-star--half  { stroke: #f59e0b; }
.to-star--empty { fill: none;     stroke: #e2e8f0; }

/* Liczba opinii np. "(24 opinie)" */
.to-rating__count {
    font-family: 'Para', Inter, system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    margin-left: 2px;
}

/* Wariant mały */
.to-rating--sm .to-star        { width: 12px; height: 12px; }
.to-rating--sm .to-rating__avg { font-size: 12px; }
.to-rating--sm .to-rating__count { font-size: 11px; }
