/**
 * Smart Reviews — Design System v2
 * Scoped entirely under .smart-reviews
 */

/* ─── Tokens ─────────────────────────────────────────────── */

.smart-reviews {
    --sr-font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sr-primary: #2563eb;
    --sr-primary-dark: #1d4ed8;
    --sr-primary-soft: #eff6ff;
    --sr-success: #16a34a;
    --sr-success-soft: #f0fdf4;
    --sr-danger: #ef4444;
    --sr-danger-soft: #fef2f2;
    --sr-warning: #f59e0b;
    --sr-text: #0f172a;
    --sr-text-secondary: #475569;
    --sr-text-muted: #94a3b8;
    --sr-border: #e2e8f0;
    --sr-border-light: #f1f5f9;
    --sr-surface: #ffffff;
    --sr-surface-muted: #f8fafc;
    --sr-radius-sm: 8px;
    --sr-radius: 14px;
    --sr-radius-lg: 18px;
    --sr-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --sr-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
    --sr-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --sr-gap: 20px;
    --sr-gap-sm: 12px;
    --sr-gap-xs: 8px;
    --sr-ai-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #2563eb 100%);

    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    overflow-x: hidden;
    contain: inline-size;
    font-family: var(--sr-font);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0;
    color: var(--sr-text);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    isolation: isolate;
}

/* ─── Hard reset inside scope ────────────────────────────── */

.smart-reviews *,
.smart-reviews *::before,
.smart-reviews *::after {
    box-sizing: border-box;
}

.smart-reviews img,
.smart-reviews svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.smart-reviews h1, .smart-reviews h2, .smart-reviews h3,
.smart-reviews h4, .smart-reviews h5, .smart-reviews h6,
.smart-reviews p, .smart-reviews ul, .smart-reviews ol {
    margin: 0;
    padding: 0;
    font-family: var(--sr-font);
}

.smart-reviews button,
.smart-reviews input,
.smart-reviews select,
.smart-reviews textarea {
    font-family: var(--sr-font);
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.smart-reviews button {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    box-shadow: none;
    text-shadow: none;
}

.smart-reviews input,
.smart-reviews select,
.smart-reviews textarea {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    max-width: 100%;
}

/* ─── Layout shell — one equal width for all blocks ─────── */

.smart-reviews .ars-sr-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: clamp(12px, 3vw, 24px);
    display: flex;
    flex-direction: column;
    gap: var(--sr-gap);
    overflow-x: hidden;
}

.smart-reviews .ars-sr-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 0;
}

/* ─── Shared utilities ───────────────────────────────────── */

.smart-reviews .ps-section-title {
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--sr-text);
}

.smart-reviews .ps-text-muted {
    font-size: 13px;
    font-weight: 500;
    color: var(--sr-text-muted);
    line-height: 1.55;
}

.smart-reviews .ps-ltr,
.smart-reviews .stat-value,
.smart-reviews .ars-aggregation-count,
.smart-reviews .ars-rating-count,
.smart-reviews .ars-star-display,
.smart-reviews .ars-star-rating,
.smart-reviews .ars-review-card__score,
.smart-reviews .ars-rating-number {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ─── Base card ──────────────────────────────────────────── */

.smart-reviews .ps-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--sr-surface);
    border: 1px solid var(--sr-border-light);
    border-radius: var(--sr-radius);
    padding: clamp(16px, 3vw, 24px);
    box-shadow: var(--sr-shadow-sm);
}

/* ─── AI Summary (glass) ─────────────────────────────────── */

.smart-reviews .ps-glass-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: var(--sr-radius-lg);
    padding: clamp(18px, 3vw, 28px);
    background: var(--sr-ai-gradient);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--sr-shadow-lg);
    color: #fff;
}

.smart-reviews .ps-glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(255,255,255,0.22), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(255,255,255,0.1), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.smart-reviews .ps-glass-card > * {
    position: relative;
    z-index: 1;
}

.smart-reviews .ps-glass-card .ps-section-title {
    color: #fff;
}

.smart-reviews .ps-glass-card .ps-text-muted,
.smart-reviews .ps-glass-card .stat-label {
    color: rgba(255, 255, 255, 0.78);
}

.smart-reviews .ps-glass-card .stat-value {
    color: #fff;
    font-weight: 800;
}

.smart-reviews .ps-glass-card .ars-star {
    color: rgba(255, 255, 255, 0.3);
}

.smart-reviews .ps-glass-card .ars-star.active {
    color: #fde047;
}

.smart-reviews .ps-glass-card[data-sentiment="excellent"],
.smart-reviews .ps-glass-card[data-sentiment="great"] {
    --sr-ai-gradient: linear-gradient(135deg, #047857 0%, #0d9488 55%, #2563eb 100%);
}

.smart-reviews .ps-glass-card[data-sentiment="average"] {
    --sr-ai-gradient: linear-gradient(135deg, #b45309 0%, #ea580c 55%, #7c3aed 100%);
}

.smart-reviews .ps-glass-card[data-sentiment="poor"],
.smart-reviews .ps-glass-card[data-sentiment="bad"] {
    --sr-ai-gradient: linear-gradient(135deg, #b91c1c 0%, #be185d 55%, #6d28d9 100%);
}

.smart-reviews .ars-ai-summary-header {
    width: 100%;
    margin-bottom: 14px;
}

.smart-reviews .ars-ai-summary-header .ps-section-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 8px 10px;
    width: 100%;
    line-height: 1.45;
    margin: 0;
}

.smart-reviews .ars-ai-summary-title-text {
    flex: 1 1 auto;
    min-width: 0;
}

.smart-reviews .ps-badge-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    text-align: center;
}

.smart-reviews .ars-ai-summary-output {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.75;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.93);
    white-space: pre-line;
    word-break: normal;
    overflow-wrap: break-word;
    unicode-bidi: embed;
    overflow: visible;
    max-height: none;
}

.smart-reviews .ars-ai-typed-text {
    display: inline;
    white-space: pre-line;
    word-break: normal;
    overflow-wrap: break-word;
}

.smart-reviews .ars-ai-typing-active {
    display: block;
}

.smart-reviews .ars-ai-loading {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.smart-reviews .ars-ai-typing-active .ars-ai-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-inline-start: 2px;
    background: rgba(255, 255, 255, 0.9);
    vertical-align: text-bottom;
    animation: ars-blink 0.9s step-end infinite;
}

@keyframes ars-blink {
    50% { opacity: 0; }
}

.smart-reviews .ars-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sr-gap-sm);
    margin-bottom: var(--sr-gap-sm);
}

.smart-reviews .ps-glass-stat {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--sr-radius-sm);
    padding: 14px 12px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.smart-reviews .ars-summary-stat .stat-value {
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.2;
    margin-bottom: 4px;
}

.smart-reviews .ars-summary-stat .stat-label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.smart-reviews .ars-summary-stat .ars-star-display {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 4px;
}

.smart-reviews .ars-summary-text p {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.92);
}

/* ─── Pros / Cons aggregation ────────────────────────────── */

.smart-reviews .ars-pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sr-gap);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.smart-reviews .ars-pros-box .ps-section-title {
    color: var(--sr-success);
    margin-bottom: var(--sr-gap);
}

.smart-reviews .ars-cons-box .ps-section-title {
    color: var(--sr-danger);
    margin-bottom: var(--sr-gap);
}

.smart-reviews .ars-aggregation-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--sr-gap-sm);
    padding: 10px 0;
    border-bottom: 1px solid var(--sr-border-light);
}

.smart-reviews .ars-aggregation-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.smart-reviews .ars-aggregation-item > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-text-secondary);
    word-break: break-word;
}

.smart-reviews .ars-aggregation-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.smart-reviews .ars-progress-bar {
    width: 72px;
    height: 6px;
    background: var(--sr-border);
    border-radius: 99px;
    overflow: hidden;
}

.smart-reviews .ars-progress-fill.pro {
    height: 100%;
    background: var(--sr-success);
    border-radius: 99px;
}

.smart-reviews .ars-progress-fill.con {
    height: 100%;
    background: var(--sr-danger);
    border-radius: 99px;
}

.smart-reviews .ars-aggregation-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--sr-text-muted);
    min-width: 18px;
    text-align: center;
}

/* ─── Rating distribution ──────────────────────────────────── */

.smart-reviews .ars-rating-distribution .ps-section-title {
    margin-bottom: var(--sr-gap);
}

.smart-reviews .ars-rating-row {
    display: grid;
    grid-template-columns: 72px 1fr 64px;
    align-items: center;
    gap: var(--sr-gap-sm);
    margin-bottom: 8px;
}

.smart-reviews .ars-rating-row:last-child {
    margin-bottom: 0;
}

.smart-reviews .ars-rating-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-text-muted);
}

.smart-reviews .ars-rating-bar {
    height: 8px;
    background: var(--sr-border);
    border-radius: 99px;
    overflow: hidden;
}

.smart-reviews .ars-rating-bar-fill {
    height: 100%;
    background: var(--sr-warning);
    border-radius: 99px;
    min-width: 0;
}

.smart-reviews .ars-rating-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--sr-text-muted);
    text-align: left;
}

/* ─── Reviews section ────────────────────────────────────── */

.smart-reviews .ars-reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--sr-gap);
    overflow: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.smart-reviews .ars-reviews-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sr-gap-sm);
}

.smart-reviews .ars-sort-select {
    min-width: 160px;
    width: auto;
    flex-shrink: 0;
}

/* Responsive stack — one review per row (all breakpoints) */

.smart-reviews .ars-reviews-stack,
.smart-reviews .ars-reviews-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sr-gap);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
}

.smart-reviews .ars-reviews-stack .ars-no-reviews,
.smart-reviews .ars-reviews-grid .ars-no-reviews {
    width: 100%;
}

.smart-reviews .ars-reviews-stack .ars-review-card,
.smart-reviews .ars-reviews-grid .ars-review-card {
    width: 100%;
    max-width: 100%;
}

/* ─── Single review card — glass redesign ──────────────── */

.smart-reviews .ars-review-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 18px;
    border-radius: var(--sr-radius);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 4px 24px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.smart-reviews .ars-review-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(99, 102, 241, 0.07) 0%,
        rgba(37, 99, 235, 0.04) 45%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.smart-reviews .ars-review-card > * {
    position: relative;
    z-index: 1;
}

.smart-reviews .ars-review-card:hover {
    box-shadow:
        0 10px 36px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Card head */
.smart-reviews .ars-review-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sr-gap-sm);
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.smart-reviews .ars-review-card__user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.smart-reviews .ars-author-avatar {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(99, 102, 241, 0.2));
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: var(--sr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.smart-reviews .ars-author-info {
    min-width: 0;
    flex: 1;
}

.smart-reviews .ars-review-card__name {
    font-size: 15px;
    font-weight: 800;
    color: var(--sr-text);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smart-reviews .ars-review-date {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-top: 3px;
}

.smart-reviews .ars-review-card__score {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--sr-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.smart-reviews .ars-rating-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--sr-primary);
    line-height: 1;
}

.smart-reviews .ars-review-card__score .ars-star-display {
    display: flex;
    gap: 1px;
}

.smart-reviews .ars-review-card__score .ars-star {
    font-size: 12px;
    line-height: 1;
}

/* Card body */
.smart-reviews .ars-review-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.smart-reviews .ars-review-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--sr-text);
    line-height: 1.45;
    word-break: break-word;
}

.smart-reviews .ars-review-content {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.8;
    color: var(--sr-text-secondary);
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Trait glass mini-cards */
.smart-reviews .ars-review-card__traits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 10px;
    margin-top: auto;
}

.smart-reviews .ars-trait-glass {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: var(--sr-radius-sm);
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 0;
}

.smart-reviews .ars-trait-glass--pro {
    background: rgba(240, 253, 244, 0.55);
    border-color: rgba(22, 163, 74, 0.18);
}

.smart-reviews .ars-trait-glass--con {
    background: rgba(254, 242, 242, 0.55);
    border-color: rgba(239, 68, 68, 0.18);
}

.smart-reviews .ars-trait-glass__label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.smart-reviews .ars-trait-glass--pro .ars-trait-glass__label {
    color: var(--sr-success);
}

.smart-reviews .ars-trait-glass--con .ars-trait-glass__label {
    color: var(--sr-danger);
}

.smart-reviews .ars-trait-glass__items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.smart-reviews .ars-trait-glass__chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.smart-reviews .ars-trait-glass--pro .ars-trait-glass__chip {
    color: #15803d;
}

.smart-reviews .ars-trait-glass--con .ars-trait-glass__chip {
    color: #b91c1c;
}

/* Replies */
.smart-reviews .ars-review-replies {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    border-radius: var(--sr-radius-sm);
    background: rgba(241, 245, 249, 0.35);
    border: 1px solid rgba(226, 232, 240, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.smart-reviews .ars-review-reply {
    padding: 12px 14px;
    border-radius: var(--sr-radius-sm);
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 2px 10px rgba(15, 23, 42, 0.04);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.smart-reviews .ars-review-reply__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.smart-reviews .ars-author-avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.smart-reviews .ars-review-reply__name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--sr-text);
    line-height: 1.35;
}

.smart-reviews .ars-review-reply__content {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
    color: var(--sr-text-secondary);
    word-break: break-word;
}

.smart-reviews .ars-review-card__actions {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smart-reviews .ars-reply-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smart-reviews .ars-reply-form[hidden] {
    display: none !important;
}

.smart-reviews .ars-reply-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.smart-reviews .ars-hp-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.smart-reviews .ars-reply-toggle {
    align-self: flex-start;
    font-size: 13px;
    padding: 10px 16px;
}

.smart-reviews .ps-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
    max-width: 100%;
}

.smart-reviews .ps-badge-verified {
    background: var(--sr-success-soft);
    color: var(--sr-success);
}

.smart-reviews .ps-badge-error {
    background: var(--sr-danger-soft);
    color: var(--sr-danger);
}

.smart-reviews .ps-badge-pending {
    background: var(--sr-primary-soft);
    color: var(--sr-primary);
}

/* Empty state */
.smart-reviews .ars-no-reviews {
    text-align: center;
    padding: 48px 20px;
    background: var(--sr-surface-muted);
    border-radius: var(--sr-radius);
    border: 1px dashed var(--sr-border);
}

.smart-reviews .ars-no-reviews-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 12px;
}

/* ─── Stars (form) ───────────────────────────────────────── */

.smart-reviews .ars-star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 4px;
    max-width: 100%;
}

.smart-reviews .ars-star-rating .ars-star {
    font-size: 34px;
    line-height: 1;
    color: var(--sr-border);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.smart-reviews .ars-star-rating .ars-star:hover {
    transform: scale(1.12);
}

.smart-reviews .ars-star.active {
    color: var(--sr-warning);
}

/* ─── Form ───────────────────────────────────────────────── */

.smart-reviews .ars-review-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.smart-reviews .ars-review-form > .ps-section-title {
    margin-bottom: var(--sr-gap);
    padding-bottom: var(--sr-gap-sm);
    border-bottom: 1px solid var(--sr-border-light);
}

.smart-reviews .ars-form-group {
    margin-bottom: var(--sr-gap);
}

.smart-reviews .ars-form-group:last-child {
    margin-bottom: 0;
}

.smart-reviews .ars-form-group > label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--sr-text);
}

.smart-reviews .ars-required {
    color: var(--sr-danger);
    font-weight: 800;
}

.smart-reviews .ps-form-hint,
.smart-reviews #ars-rating-label {
    margin-top: 8px;
}

.smart-reviews .ps-input,
.smart-reviews .ars-form-group input[type="text"],
.smart-reviews .ars-form-group input[type="email"],
.smart-reviews .ars-form-group textarea,
.smart-reviews .ars-sort-select {
    display: block;
    width: 100%;
    padding: 13px 16px;
    background: var(--sr-surface-muted);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--sr-text);
    line-height: 1.5;
    touch-action: manipulation;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.smart-reviews .ars-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.smart-reviews .ps-input:focus,
.smart-reviews .ars-form-group input:focus,
.smart-reviews .ars-form-group textarea:focus,
.smart-reviews .ars-sort-select:focus {
    outline: none;
    border-color: var(--sr-primary);
    box-shadow: 0 0 0 3px var(--sr-primary-soft);
    background: var(--sr-surface);
}

.smart-reviews .ars-custom-tags-input {
    margin-top: var(--sr-gap-sm);
}

.smart-reviews select.ps-input,
.smart-reviews .ars-sort-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2394a3b8' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 38px;
}

.smart-reviews .ars-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: var(--sr-gap-xs);
}

.smart-reviews .ars-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--sr-surface);
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-width: 0;
}

.smart-reviews .ars-checkbox-item:hover {
    background: var(--sr-surface-muted);
}

.smart-reviews .ars-checkbox-item:has(input:checked) {
    border-color: var(--sr-primary);
    background: var(--sr-primary-soft);
}

.smart-reviews .ars-checkbox-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    accent-color: var(--sr-primary);
    cursor: pointer;
}

.smart-reviews .ars-checkbox-item label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-text-secondary);
    cursor: pointer;
    line-height: 1.4;
    word-break: break-word;
}

.smart-reviews .ars-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sr-gap);
}

.smart-reviews .ps-btn-primary,
.smart-reviews .ars-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--sr-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--sr-radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.smart-reviews .ps-btn-primary:hover,
.smart-reviews .ars-submit-btn:hover {
    background: var(--sr-primary-dark);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.smart-reviews .ps-btn-primary:disabled,
.smart-reviews .ars-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.smart-reviews .ps-btn-outline {
    display: inline-flex;
    padding: 12px 20px;
    border: 1px solid var(--sr-border);
    border-radius: var(--sr-radius-sm);
    font-weight: 700;
    color: var(--sr-text-secondary);
    background: transparent;
}

.smart-reviews .ps-message-success {
    padding: 12px 14px;
    border-radius: var(--sr-radius-sm);
    background: var(--sr-success-soft);
    color: var(--sr-success);
    font-size: 13px;
    font-weight: 600;
}

.smart-reviews .ps-message-error {
    padding: 12px 14px;
    border-radius: var(--sr-radius-sm);
    background: var(--sr-danger-soft);
    color: var(--sr-danger);
    font-size: 13px;
    font-weight: 600;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
    .smart-reviews {
        font-size: 13px;
        letter-spacing: 0;
        line-height: 1.6;
    }

    .smart-reviews .ars-sr-shell {
        width: 100%;
        max-width: 100%;
        padding: 10px 0;
        gap: 12px;
    }

    .smart-reviews .ars-sr-block,
    .smart-reviews .ps-card,
    .smart-reviews .ps-glass-card,
    .smart-reviews .ars-reviews-list,
    .smart-reviews .ars-review-form {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .smart-reviews .ps-section-title {
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.4;
    }

    .smart-reviews .ars-ai-summary-header .ps-section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .smart-reviews .ars-ai-summary-title-text {
        width: 100%;
    }

    .smart-reviews .ps-badge-glass {
        font-size: 10px;
        font-weight: 600;
        padding: 4px 10px;
        align-self: flex-start;
        max-width: 100%;
    }

    .smart-reviews .ps-text-muted {
        font-size: 11px;
        font-weight: 500;
        line-height: 1.5;
        letter-spacing: 0;
    }

    .smart-reviews .ars-ai-summary-output {
        font-size: 12px;
        font-weight: 500;
        line-height: 1.65;
    }

    .smart-reviews .ars-summary-stat .stat-value {
        font-size: 20px;
        font-weight: 700;
    }

    .smart-reviews .ars-summary-stat .stat-label {
        font-size: 10px;
        font-weight: 600;
    }

    .smart-reviews .ps-glass-card {
        padding: 14px;
        border-radius: var(--sr-radius);
    }

    .smart-reviews .ps-card {
        padding: 12px;
        border-radius: var(--sr-radius-sm);
    }

    .smart-reviews .ars-summary-stats {
        grid-template-columns: 1fr;
    }

    .smart-reviews .ars-pros-cons-grid {
        grid-template-columns: 1fr;
    }

    .smart-reviews .ars-rating-row {
        grid-template-columns: 60px 1fr 52px;
        gap: 8px;
    }

    .smart-reviews .ars-reviews-header {
        flex-direction: column;
        align-items: stretch;
    }

    .smart-reviews .ars-sort-select {
        width: 100%;
        min-width: 0;
    }

    .smart-reviews .ars-reviews-stack,
    .smart-reviews .ars-reviews-grid {
        gap: 12px;
    }

    .smart-reviews .ars-review-card {
        padding: 14px;
    }

    .smart-reviews .ars-review-card__traits {
        grid-template-columns: 1fr;
    }

    .smart-reviews .ars-form-row {
        grid-template-columns: 1fr;
    }

    .smart-reviews .ars-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .smart-reviews .ps-btn-primary,
    .smart-reviews .ars-submit-btn {
        width: 100%;
    }

    .smart-reviews .ps-input,
    .smart-reviews .ars-form-group input,
    .smart-reviews .ars-form-group textarea,
    .smart-reviews .ars-sort-select {
        font-size: 15px;
        font-weight: 500;
        padding: 12px 14px;
        touch-action: manipulation;
    }

    .smart-reviews .ars-reply-form textarea,
    .smart-reviews .ars-reply-form input {
        touch-action: manipulation;
    }

    .smart-reviews .ars-form-group > label {
        font-size: 13px;
        font-weight: 600;
    }

    .smart-reviews .ars-checkbox-item label {
        font-size: 12px;
        font-weight: 500;
    }

    .smart-reviews .ars-star-rating .ars-star {
        font-size: 30px;
    }

    .smart-reviews .ps-btn-primary,
    .smart-reviews .ars-submit-btn {
        font-size: 14px;
        font-weight: 700;
        padding: 12px 20px;
    }
}
