/* ── Text-block widget: in-flow pill, right-aligned ─────── */
.srw {
    display: flex;
    width: fit-content;
    margin: 0.75rem 0 0 auto;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    padding: 4px 13px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e6e6e6;
    border-radius: 20px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07);
    font-size: 0.78rem;
    color: #888;
    user-select: none;
    white-space: nowrap;
}

/* ── Imgtext widget: left-justified inline flow ─────────── */
.srw[data-type="imgtext"] {
    width: 100%;
    margin: 0.75rem 0 0 0;
    padding: 0.65rem 0 0;
    background: none;
    border: none;
    border-top: 1px solid #eee;
    border-radius: 0;
    box-shadow: none;
}

/* ── Aggregate display ──────────────────────────────────── */
.srw-agg {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.srw-stars-disp {
    display: inline-flex;
    gap: 1px;
    line-height: 1;
}
.srw-stars-disp .fas { color: #f5a623; font-size: 0.76rem; }
.srw-stars-disp .far { color: #d8d8d8; font-size: 0.76rem; }

.srw-avg-val {
    font-weight: 600;
    color: #444;
    font-size: 0.78rem;
}
.srw-cnt { color: #bbb; font-size: 0.73rem; }

.srw-sep {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #ddd;
    flex-shrink: 0;
}

/* ── Star picker ────────────────────────────────────────── */
.srw-picker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.srw-lbl {
    font-size: 0.72rem;
    color: #bbb;
    white-space: nowrap;
}

.srw-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    line-height: 1;
}

.srw-stars-input input[type="radio"] { display: none; }

.srw-stars-input label {
    font-size: 1rem;
    color: #d8d8d8;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.1s, transform 0.12s;
    line-height: 1;
}

.srw-stars-input label:hover,
.srw-stars-input label:hover ~ label,
.srw-stars-input input[type="radio"]:checked ~ label {
    color: #f5a623;
}
.srw-stars-input label:hover { transform: scale(1.25); }

/* ── Post-submission ────────────────────────────────────── */
.srw-thanks {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    color: #4caf50;
    font-weight: 600;
}
.srw-thanks i { font-size: 0.8rem; }

/* ── Card gallery rating badge ──────────────────────────── */
.srw-card-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #666;
    margin-top: 6px;
}
.srw-card-badge .fas { color: #f5a623; font-size: 0.72rem; }
.srw-card-cnt { color: #aaa; font-size: 0.72rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .srw { padding: 3px 10px; font-size: 0.75rem; }
    .srw-stars-input label { font-size: 1.1rem; }
}
