/* Article Ratings Widget */
.ar-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 32px 0;
    max-width: 420px;
    direction: rtl;
    box-sizing: border-box;
}

.ar-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 20px;
    text-align: right;
}

/* ── Summary layout ── */
.ar-summary {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ── Bars ── */
.ar-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ar-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-bar-track {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.ar-bar-fill {
    height: 100%;
    background: #F5A623;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.ar-bar-label {
    font-size: 12px;
    color: #888;
    min-width: 10px;
    text-align: left;
}

/* ── Score block ── */
.ar-score {
    text-align: center;
    min-width: 90px;
}

.ar-average {
    display: block;
    font-size: 40px;
    font-weight: 700;
    color: #1D9E75;
    line-height: 1;
    margin-bottom: 6px;
}

.ar-stars-display {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: 4px;
}

.ar-stars-display svg { display: block; }

.ar-count {
    font-size: 11px;
    color: #999;
    display: block;
}

/* ── Vote area ── */
.ar-vote-area {
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
    text-align: center;
}

.ar-vote-label {
    font-size: 13px;
    color: #555;
    margin: 0 0 10px;
}

.ar-star-picker {
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
    gap: 4px;
}

.ar-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #ddd;
    width: 36px;
    height: 36px;
    transition: color 0.15s, transform 0.1s;
}

.ar-star-btn svg {
    width: 28px;
    height: 28px;
    display: block;
}

.ar-star-btn:hover,
.ar-star-btn.ar-hover,
.ar-star-btn.ar-selected {
    color: #F5A623;
    transform: scale(1.15);
}

.ar-star-btn.ar-selected svg path {
    fill: #F5A623;
}

.ar-message {
    font-size: 13px;
    color: #1D9E75;
    margin: 10px 0 0;
    min-height: 20px;
}

.ar-message.ar-error {
    color: #e74c3c;
}

/* ── Voted notice ── */
.ar-voted-notice {
    margin-top: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
    font-size: 13px;
    color: #1D9E75;
    text-align: center;
}

/* ── Loading state ── */
.ar-widget.ar-loading .ar-star-picker {
    opacity: 0.5;
    pointer-events: none;
}

/* ── RTL overrides ── */
[dir="rtl"] .ar-bar-row { flex-direction: row; }
[dir="rtl"] .ar-bar-label { text-align: right; }
