/* ============================================================================
   MTheme/css/reviews.css
   ----------------------------------------------------------------------------
   بخش نظرات و امتیاز ستاره‌ای کسب‌وکار (rv-*)

   کاربر: «یو ای باید زیبا باشه و اینطور باشه که تجربت رو از ... به اشتراک بزار
          و وقتی زد یه مدال خوشگل اپ طور باز شه»
   پالت: سبز برند #006a0d + طلایی ستاره #f59e0b (همان پالت برند).
   ============================================================================ */

/* ---------- بخش ---------- */
.pd-sec-reviews { padding: 42px 0; }

.rv-root { margin-top: 18px; }

/* ---------- خلاصهٔ امتیاز ---------- */
.rv-summary {
    display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
    margin-bottom: 18px; padding: 18px 22px;
    background: #fff; border: 1px solid rgba(22, 40, 63, .08);
    border-radius: 18px;
}
.rv-summary[hidden] { display: none; }

.rv-score {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    flex: 0 0 auto; padding-inline-end: 22px;
    border-inline-end: 1px solid rgba(22, 40, 63, .08);
}
.rv-score-v {
    font-size: 2.5rem; font-weight: 800; line-height: 1;
    color: var(--brand, #006a0d); font-variant-numeric: tabular-nums;
}
.rv-score-stars { font-size: .85rem; }
.rv-score-c { font-size: .72rem; color: #94a3b8; font-weight: 600; }

.rv-bars { flex: 1 1 220px; min-width: 200px; }
.rv-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.rv-bar-row:last-child { margin-bottom: 0; }
.rv-bar-k {
    flex: 0 0 34px; font-size: .68rem; color: #94a3b8;
    font-weight: 600; white-space: nowrap;
}
.rv-bar-k i { font-size: .6rem; color: #f59e0b; }
.rv-bar-track {
    flex: 1 1 auto; height: 7px; border-radius: 999px;
    background: #f1f5f9; overflow: hidden;
}
.rv-bar-fill {
    display: block; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #ee8d1a);
    transition: width .5s cubic-bezier(.2,.8,.3,1);
}
.rv-bar-c {
    flex: 0 0 26px; text-align: end;
    font-size: .68rem; color: #64748b; font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---------- دکمهٔ «تجربه‌ات را به اشتراک بگذار» ---------- */
.rv-cta {
    display: flex; align-items: center; gap: 13px; width: 100%;
    margin-bottom: 18px; padding: 15px 19px;
    background: #fff;
    border: 1px solid rgba(0, 106, 13, .2);
    border-radius: 16px; cursor: pointer; text-align: start;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.rv-cta:hover {
    border-color: var(--brand, #006a0d);
    box-shadow: 0 12px 28px -14px rgba(0, 106, 13, .4);
    transform: translateY(-1px);
}
.rv-cta-ico {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ee8d1a);
    color: #fff; font-size: 17px;
    box-shadow: 0 8px 20px -9px rgba(238, 141, 26, .65);
}
.rv-cta-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.rv-cta-txt strong { font-size: .88rem; font-weight: 800; color: var(--ink, #16283f); }
.rv-cta-txt small { font-size: .72rem; color: #94a3b8; line-height: 1.7; }
.rv-cta-arrow { color: #cbd5e1; font-size: .8rem; flex: 0 0 auto; }

/* ---------- فهرست نظرات ---------- */
.rv-list { display: flex; flex-direction: column; gap: 11px; }

.rv-item {
    padding: 15px 18px; background: #fff;
    border: 1px solid rgba(22, 40, 63, .07);
    border-radius: 15px;
    transition: border-color .18s, box-shadow .18s;
}
.rv-item:hover { border-color: rgba(0, 106, 13, .18); box-shadow: 0 8px 22px -16px rgba(16,26,40,.3); }

.rv-item-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.rv-avatar {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(0,106,13,.12), rgba(238,141,26,.15));
    color: var(--brand, #006a0d); font-size: .95rem; font-weight: 800;
}
.rv-item-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rv-item-meta strong { font-size: .83rem; font-weight: 700; color: var(--ink, #16283f); }
.rv-item-sub { display: flex; align-items: center; gap: 8px; }
.rv-item-sub em { font-size: .68rem; color: #94a3b8; font-style: normal; }

.rv-stars-ro { display: inline-flex; gap: 2px; color: #d1d5db; }
.rv-stars-ro i { font-size: .78rem; }
.rv-stars-ro i.is-on { color: #f59e0b; }
.rv-stars-ro.rv-stars-sm i { font-size: .68rem; }

.rv-item-text {
    margin: 0; font-size: .82rem; line-height: 2.1;
    color: #475569; word-break: break-word;
}

.rv-empty {
    padding: 34px 16px; text-align: center; color: #94a3b8;
    background: #f8fafc; border-radius: 15px;
}
.rv-empty i { font-size: 1.7rem; opacity: .35; margin-bottom: 9px; display: block; }
.rv-empty p { margin: 0; font-size: .82rem; }

/* ==========================================================================
   مدال ثبت نظر — «اپ طور»
   ========================================================================== */
.rv-modal-bd {
    position: fixed; inset: 0; z-index: 9460;
    display: flex; align-items: center; justify-content: center; padding: 18px;
    background: rgba(16, 26, 40, .5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0; transition: opacity .24s ease;
}
.rv-modal-bd[hidden] { display: none; }
.rv-modal-bd.is-open { opacity: 1; }

.rv-modal {
    position: relative; width: 100%; max-width: 460px; max-height: 92vh;
    display: flex; flex-direction: column;
    background: #fff; border-radius: 24px;
    box-shadow: 0 34px 90px -22px rgba(16, 26, 40, .5);
    overflow: hidden;
    transform: translateY(20px) scale(.96);
    transition: transform .32s cubic-bezier(.2, .8, .3, 1);
}
.rv-modal-bd.is-open .rv-modal { transform: translateY(0) scale(1); }

.rv-modal-head {
    position: relative; display: flex; align-items: flex-start; gap: 13px;
    padding: 20px 22px 16px;
    background: linear-gradient(150deg, rgba(245,158,11,.11), rgba(238,141,26,.09));
}
.rv-modal-ico {
    flex: 0 0 48px; width: 48px; height: 48px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ee8d1a);
    color: #fff; font-size: 20px;
    box-shadow: 0 10px 24px -10px rgba(238, 141, 26, .7);
}
.rv-modal-head-txt { min-width: 0; padding-inline-end: 30px; }
.rv-modal-head-txt h3 {
    margin: 0 0 4px; font-size: 1rem; font-weight: 800;
    color: var(--ink, #16283f); line-height: 1.6;
}
.rv-modal-head-txt p { margin: 0; font-size: .75rem; color: #94a3b8; line-height: 1.85; }
.rv-modal-x {
    position: absolute; top: 15px; inset-inline-end: 15px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(22, 40, 63, .1); background: #fff; color: #94a3b8;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: color .18s, border-color .18s;
}
.rv-modal-x:hover { color: #c0392b; border-color: rgba(192,57,43,.35); }

.rv-modal-body { padding: 16px 22px 8px; overflow-y: auto; flex: 1 1 auto; }

/* ---------- ستاره‌های تعاملی ---------- */
.rv-rate-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    margin-bottom: 18px; padding: 17px 12px;
    background: #fafbfd; border-radius: 16px;
    border: 1px solid rgba(22, 40, 63, .06);
}
.rv-stars { display: flex; gap: 4px; }
.rv-star {
    background: none; border: 0; padding: 3px; cursor: pointer;
    color: #d1d5db; font-size: 1.85rem; line-height: 1;
    transition: transform .16s, color .16s;
}
.rv-star:hover { transform: scale(1.16); }
.rv-star.is-on, .rv-star.is-hover { color: #f59e0b; }
.rv-star.is-hover { transform: scale(1.1); }
.rv-rate-label {
    font-size: .75rem; color: #94a3b8; font-weight: 600;
    transition: color .18s;
}
.rv-rate-label.is-set { color: var(--brand, #006a0d); font-weight: 800; }

/* ---------- فیلدها ---------- */
.rv-field { margin-bottom: 15px; }
.rv-field label {
    display: block; margin-bottom: 7px;
    font-size: .78rem; font-weight: 700; color: #475569;
}
.rv-field label span { color: #c0392b; }
.rv-field label small { color: #98a2b3; font-weight: 500; }
.rv-field input,
.rv-field textarea {
    width: 100%; padding: 11px 14px;
    border: 1px solid rgba(22, 40, 63, .12); border-radius: 13px;
    background: #fff; font-size: .85rem; color: var(--ink, #16283f);
    font-family: inherit;
    transition: border-color .18s, box-shadow .18s;
}
.rv-field textarea { resize: vertical; min-height: 88px; line-height: 2; }
.rv-field input:focus,
.rv-field textarea:focus {
    outline: none; border-color: var(--brand, #006a0d);
    box-shadow: 0 0 0 3px rgba(0, 106, 13, .1);
}
.rv-help { display: block; margin-top: 6px; font-size: .71rem; color: #94a3b8; }
.rv-help.is-ok { color: #17803d; font-weight: 700; }

.rv-msg {
    min-height: 18px; padding: 2px 0 6px;
    font-size: .77rem; font-weight: 600; line-height: 1.8;
}
.rv-msg.is-ok { color: #17803d; }
.rv-msg.is-err { color: #c0392b; }

/* ---------- پایین ---------- */
.rv-modal-foot {
    display: flex; align-items: center; gap: 9px;
    padding: 14px 22px 18px; border-top: 1px solid #f1f4f8; background: #fafbfd;
}
.rv-cancel {
    flex: 0 0 auto; padding: 12px 18px;
    border: 1px solid #e6eaf1; border-radius: 13px; background: #fff;
    color: #64748b; font-size: .82rem; font-weight: 700; cursor: pointer;
    transition: border-color .18s, color .18s;
}
.rv-cancel:hover { border-color: #cbd5e1; color: #475569; }
.rv-submit {
    flex: 1 1 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 12px 20px; border: 0; border-radius: 13px;
    background: linear-gradient(135deg, #f59e0b, #ee8d1a);
    color: #fff; font-size: .85rem; font-weight: 800; cursor: pointer;
    box-shadow: 0 10px 24px -11px rgba(238, 141, 26, .65);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.rv-submit:hover:not(:disabled) {
    transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(238,141,26,.75);
}
.rv-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- موبایل ---------- */
@media (max-width: 620px) {
    .pd-sec-reviews { padding: 30px 0; }
    .rv-summary { gap: 16px; padding: 15px 16px; }
    .rv-score { padding-inline-end: 16px; }
    .rv-score-v { font-size: 2.1rem; }
    .rv-bars { min-width: 100%; }
    .rv-modal-bd { padding: 12px; align-items: flex-end; }
    .rv-modal { max-width: 100%; max-height: 94vh; border-radius: 22px 22px 14px 14px; }
    .rv-modal-head { padding: 17px 17px 13px; }
    .rv-modal-body { padding: 14px 17px 6px; }
    .rv-modal-foot { padding: 12px 17px 15px; flex-wrap: wrap; }
    .rv-cancel { flex: 1 1 100%; order: 2; }
    .rv-submit { flex: 1 1 100%; order: 1; }
    .rv-star { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
    .rv-modal-bd, .rv-modal, .rv-bar-fill { transition: none; }
    .rv-star:hover, .rv-star.is-hover { transform: none; }
}
