/* ─── CarSell — Dealer Reviews ───────────────────────────────────────────── */

/* ── Stars ───────────────────────────────────────────────────────────────── */

.csrv-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 16px;
    line-height: 1;
}

.csrv-star-full  { color: #f59e0b; }
.csrv-star-half  { color: #f59e0b; opacity: .6; }
.csrv-star-empty { color: #d1d5db; }

/* ── Rating badge (inline, for profile/listing) ──────────────────────────── */

.csrv-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #1d2327;
}

.csrv-badge strong {
    font-weight: 700;
    color: #1d2327;
}

.csrv-badge-count {
    color: #64748b;
    font-size: 12px;
}

/* ── Summary bar (dealer profile page) ───────────────────────────────────── */

.csrv-block {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #1d2327;
}

.csrv-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 20px;
}

.csrv-avg-score {
    font-size: 40px;
    font-weight: 800;
    color: #92400e;
    line-height: 1;
}

.csrv-avg-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.csrv-avg-right .csrv-stars { font-size: 20px; }

.csrv-count {
    font-size: 13px;
    color: #78350f;
}

/* ── Review list ─────────────────────────────────────────────────────────── */

.csrv-empty {
    color: #64748b;
    font-style: italic;
}

.csrv-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.csrv-item {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.csrv-item-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.csrv-reviewer {
    font-weight: 600;
    color: #1d2327;
}

.csrv-item-stars { font-size: 15px; }

.csrv-item-date {
    font-size: 12px;
    color: #94a3b8;
    margin-left: auto;
}

.csrv-item-comment {
    margin: 0 0 8px;
    color: #334155;
    line-height: 1.6;
}

.csrv-verified-label {
    font-size: 11px;
    color: #15803d;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.csrv-pagination {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.csrv-pg-btn {
    padding: 5px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    color: #1d2327;
    text-decoration: none;
    background: #fff;
    transition: background 0.12s;
}
.csrv-pg-btn:hover { background: #f1f5f9; color: #1d4ed8; }
.csrv-pg-active    { background: #1d4ed8; color: #fff; border-color: #1d4ed8; pointer-events: none; }

/* ── Leave-review form ───────────────────────────────────────────────────── */

.csrv-gate {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    font-size: 14px;
}

.csrv-form-wrap {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 540px;
}

.csrv-form-heading {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #1d2327;
}

/* Star picker (CSS-only reverse trick) */

.csrv-stars-pick {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    margin-bottom: 14px;
}

.csrv-stars-pick input[type="radio"] {
    display: none;
}

.csrv-stars-pick label {
    font-size: 30px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.1s;
    line-height: 1;
}

/* Highlight hovered star and all preceding (flex reverse handles this) */
.csrv-stars-pick label:hover,
.csrv-stars-pick label:hover ~ label,
.csrv-stars-pick input[type="radio"]:checked ~ label {
    color: #f59e0b;
}

.csrv-comment {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1d2327;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 12px;
}
.csrv-comment:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}

.csrv-submit-btn {
    display: inline-block;
    padding: 9px 22px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.csrv-submit-btn:hover    { background: #1e40af; }
.csrv-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.csrv-form-msg {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.csrv-msg-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.csrv-msg-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ── Admin actions ───────────────────────────────────────────────────────── */

.csrv-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
