﻿/**
 * CMC Blog Comments Slider  [cmc_blog_comments]
 */

.cmc-bc-widget {
    font-family: inherit!important;
    width: 100%;
    box-sizing: border-box;
}

/* ── Section header ──────────────────────────────────────────────────────── */
.cmc-bc-header {
    text-align: center;
    margin-bottom: 28px;
}

.cmc-bc-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.3;
}

.cmc-bc-subtitle {
    font-size: 14px;
    color: #64748b;
    line-height: 1.75;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Slider wrapper ──────────────────────────────────────────────────────── */
.cmc-bc-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr; /* keep arrow/track order LTR for consistent math */
}

/* ── Arrow buttons ───────────────────────────────────────────────────────── */
.cmc-bc-arrow {
    flex-shrink: 0;
    width: 52px!important;
    height: 52px!important;
    border-radius: 50%;
    border: 1.5px solid #e2e8f0!important;
    background: #ffffff!important;
    color: #475569!important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    padding: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit!important;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
    z-index: 2;
}

.cmc-bc-arrow:hover {
    border-color: #2563eb!important;;
    color: #2563eb!important;;
    box-shadow: 0 2px 10px rgba(37,99,235,0.15);
}

.cmc-bc-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Track ───────────────────────────────────────────────────────────────── */
.cmc-bc-track-outer {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.cmc-bc-track {
    display: flex;
    gap: 20px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    direction: ltr;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.cmc-bc-card {
    flex-shrink: 0;
    width: calc((100% - 40px) / 3); /* 3 visible, 2 gaps × 20px */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
    direction: rtl;
}

.cmc-bc-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
}

/* ── Card top row ────────────────────────────────────────────────────────── */
.cmc-bc-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.cmc-bc-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cmc-bc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
}

.cmc-bc-author-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cmc-bc-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cmc-bc-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    display: inline-block;
}

.cmc-bc-verified {
    flex-shrink: 0;
}

.cmc-bc-handle {
    font-size: 12px;
    color: #94a3b8;
    direction: ltr;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* ── Role badge ──────────────────────────────────────────────────────────── */
.cmc-bc-role-badge {
    flex-shrink: 0;
    background: #1e293b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.4;
}

/* ── Comment body ────────────────────────────────────────────────────────── */
.cmc-bc-content {
    font-size: 13px;
    color: #334155;
    line-height: 1.75;
    margin: 0;
    flex: 1;
}

/* ── Card footer ─────────────────────────────────────────────────────────── */
.cmc-bc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    gap: 8px;
}

.cmc-bc-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.cmc-bc-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr;
}

.cmc-bc-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.cmc-bc-stat--heart {
    color: #e11d48;
}

/* ── More button ─────────────────────────────────────────────────────────── */
.cmc-bc-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.cmc-bc-more-btn {
    display: inline-block;
    padding: 10px 36px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    font-family: inherit!important;
}

.cmc-bc-more-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.cmc-bc-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ── Responsive: 2 cards on tablet ──────────────────────────────────────── */
@media (max-width: 900px) {
    .cmc-bc-card { width: calc((100% - 20px) / 2); }
    .cmc-bc-title { font-size: 22px; }
}

/* ── Responsive: 1 card on mobile ───────────────────────────────────────── */
@media (max-width: 560px) {
    .cmc-bc-card { width: 100%; }
    .cmc-bc-title { font-size: 20px; }
    .cmc-bc-subtitle { font-size: 13px; }
    .cmc-bc-arrow { width: 42px!important; height: 42px!important; }
}
