/* =========================================================
 *  COMMENT CARD — M.E.R.Y.O.S.A.B Electronics
 *  Лёгкий стиль карточки отзыва для виджетов (Google Reviews style)
 * ======================================================= */

/* ---------- ОСНОВНАЯ КАРТОЧКА ---------- */

.msb-comment-card {
    position: relative;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(71, 85, 105, 0.7);
    padding: 18px 20px;
    color: #e2e8f0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Цвет ссылок внутри карточки, без подчёркиваний */
.msb-comment-card a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.msb-comment-card a:hover {
    color: #93c5fd;
    /* без подчёркивания */
}

/* Левый цветной индикатор при ховере */
.msb-comment-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #10b981);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.msb-comment-card:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(30, 64, 175, 0.5);
}

.msb-comment-card:hover::before {
    opacity: 1;
}

/* ---------- ШАПКА: АВАТАР + ИМЯ + МЕТА ---------- */

.msb-comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.msb-comment-avatar {
    flex-shrink: 0;
}

.msb-comment-avatar img,
.msb-comment-avatar .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.6);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.msb-comment-card:hover .msb-comment-avatar img,
.msb-comment-card:hover .msb-comment-avatar .avatar {
    transform: scale(1.05);
    border-color: rgba(96, 165, 250, 0.9);
}

.msb-comment-author-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.msb-comment-author-name {
    font-weight: 700;
    font-size: 1rem;
    color: #f9fafb;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* строка: "3 отзыва · ★★★★★ · 2 дня назад" */
.msb-comment-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.msb-comment-author-reviews {
    opacity: 0.9;
}

.msb-comment-sub-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* если msb_render_stars выводит .msb-stars — подсветим */
.msb-comment-sub-rating .msb-stars {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    letter-spacing: 1px;
    font-size: 0.95rem;
}

.msb-comment-time {
    opacity: 0.85;
}

/* маленькая точка-разделитель */
.msb-dot {
    color: #64748b;
    font-weight: 700;
    margin: 0 2px;
}

/* ---------- СТРОКА СТРАНА / УСЛУГА ---------- */

.msb-comment-extra {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.msb-comment-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 0.78rem;
    font-weight: 600;
    color: #e5e7eb;
    letter-spacing: 0.01em;
    text-transform: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
        box-shadow 0.2s ease;
}

.msb-comment-chip:hover {
    background: rgba(30, 64, 175, 0.25);
    border-color: #60a5fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.4);
}

/* ---------- ТЕКСТ ОТЗЫВА ---------- */

.msb-comment-content {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.7;
}

.msb-comment-content p {
    margin: 0 0 8px;
}

.msb-comment-content p:last-child {
    margin-bottom: 0;
}

/* ---------- НИЖНЯЯ ПАНЕЛЬ: ЛАЙК / ШЕР ---------- */

.msb-comment-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* базовая кнопка-иконка */
.msb-icon-btn {
    border: 1px solid #475569;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
        box-shadow 0.2s ease, color 0.2s ease;
}

.msb-icon-btn:hover {
    background: rgba(30, 64, 175, 0.35);
    border-color: #60a5fa;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.5);
    color: #f9fafb;
}

/* лайк */
.msb-icon-heart {
    font-size: 1rem;
    line-height: 1;
}

.msb-like-count {
    font-weight: 600;
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* шаринг */
.msb-icon-share {
    font-size: 0.9rem;
    line-height: 1;
    transform: translateY(-1px);
}

/* ---------- АДАПТИВНОСТЬ ДЛЯ МАЛЕНЬКИХ КАРТОЧЕК ---------- */

@media (max-width: 480px) {
    .msb-comment-card {
        padding: 14px 14px 16px;
        border-radius: 14px;
    }

    .msb-comment-header {
        gap: 10px;
    }

    .msb-comment-avatar img,
    .msb-comment-avatar .avatar {
        width: 40px;
        height: 40px;
    }

    .msb-comment-author-name {
        font-size: 0.95rem;
    }

    .msb-comment-subline {
        font-size: 0.75rem;
    }

    .msb-comment-chip {
        font-size: 0.74rem;
        padding: 3px 9px;
    }

    .msb-comment-content {
        font-size: 0.85rem;
    }

    .msb-icon-btn {
        padding: 5px 10px;
        font-size: 0.78rem;
    }
}
