/* netSEO Stilizare Recenzii — Roveli-like product reviews */

:root {
    --ns-rev-star: #FF9800;
    --ns-rev-star-empty: #C8CDD3;
    --ns-rev-link: #1976D2;
    --ns-rev-navy: #12354E;
    --ns-rev-bg: #F8F8F8;
    --ns-rev-border: #E8EAED;
    --ns-rev-muted: #8A9199;
    --ns-rev-radius: 8px;
}

/* Force CS-Cart star accent to Roveli orange */
.ns-stilizare-recenzii,
.ns-stilizare-recenzii .ty-product-review-reviews-stars,
body .ty-product-review-reviews-stars {
    --ty-product-reviews-accent-color: var(--ns-rev-star);
    color: var(--ns-rev-star);
}

/* Nova shows compact "★ 5.0"; force classic 5-star row (filled by rating) */
.ty-product-review-reviews-stars__content--long {
    display: inline-flex !important;
    align-items: center;
    gap: 1px;
}

.ty-product-review-reviews-stars__content--short {
    display: none !important;
}

.ty-product-review-reviews-stars__icon.ty-icon-star,
.ty-product-review-reviews-stars__icon.ty-icon-star-half {
    color: var(--ns-rev-star) !important;
}

.ty-product-review-reviews-stars__icon.ty-icon-star-empty {
    color: var(--ns-rev-star-empty) !important;
}

/* ---- Product title row (short overview) ---- */
.ty-product-block__title + .ty-product-review-product-rating-overview-short,
.ty-product-detail-title + .ty-product-review-product-rating-overview-short,
.ty-product-block .ty-product-review-product-rating-overview-short,
.ns-stilizare-recenzii .ty-product-review-product-rating-overview-short {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 8px 0 14px;
}

.ty-product-review-product-rating-overview-short .ty-product-review-reviews-stars {
    font-size: 16px;
    line-height: 1;
}

.ty-product-review-product-rating-overview-short .ty-product-review-reviews-total-reviews,
.ty-product-review-product-rating-overview-short .ty-product-review-reviews-total-reviews--link,
.ty-product-review-product-rating-overview-short .ty-product-review-reviews-total-reviews--button {
    color: var(--ns-rev-link) !important;
    font-size: 13px;
    text-decoration: none;
}

.ty-product-review-product-rating-overview-short .ty-product-review-write-product-review-button,
.ty-product-review-product-rating-overview-short a.ty-btn__text.ty-product-review-write-product-review-button,
.ty-product-review-product-rating-overview-short .cm-dialog-opener.ty-btn__text {
    color: var(--ns-rev-link) !important;
    font-size: 13px;
    text-decoration: underline !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-weight: 400;
}

.ty-product-review-product-rating-overview-short .ty-product-review-write-product-review-button:hover {
    color: var(--ns-rev-navy) !important;
}

/* ---- Empty stars: CS-Cart hides --empty with visibility:hidden (spacer only).
   We force 5 grey outline stars for products without reviews (Roveli). ---- */
.ty-product-review-reviews-stars__link--empty,
.ty-product-review-reviews-stars__button--empty {
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--ns-rev-star-empty) !important;
}

.ty-product-review-reviews-stars__link--empty .ty-product-review-reviews-stars,
.ty-product-review-reviews-stars__button--empty .ty-product-review-reviews-stars {
    color: var(--ns-rev-star-empty) !important;
    --ty-product-reviews-accent-color: var(--ns-rev-star-empty);
    letter-spacing: 0.08em;
}

/* Override fake 1.5 demo rating: five hollow unicode stars (glyphs font fails on :before here) */
.ty-product-review-reviews-stars__link--empty .ty-product-review-reviews-stars:before,
.ty-product-review-reviews-stars__button--empty .ty-product-review-reviews-stars:before {
    content: "\2606\2606\2606\2606\2606" !important;
    font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", Arial, sans-serif !important;
    color: var(--ns-rev-star-empty);
    speak: none;
    line-height: 1;
}

.ty-product-review-reviews-stars__link--empty .ty-product-review-reviews-stars__content,
.ty-product-review-reviews-stars__button--empty .ty-product-review-reviews-stars__content {
    display: none !important;
}

/* ---- Grid / list / carousel: stars + count on ONE row ---- */
.grid-list__rating,
.ns-stilizare-recenzii-list-rating {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px;
    margin: 6px 0 8px;
    min-height: 18px;
    width: 100%;
}

.ns-stilizare-recenzii-list-rating .ty-product-review-reviews-stars__link,
.ns-stilizare-recenzii-list-rating .ty-product-review-reviews-stars__button,
.ns-stilizare-recenzii-list-rating .ty-product-review-reviews-total-reviews {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
    vertical-align: middle;
}

.ns-stilizare-recenzii-list-rating .ty-product-review-reviews-stars {
    white-space: nowrap;
    font-size: 13px;
}

.ns-stilizare-recenzii-list-rating .ns-stilizare-recenzii-list-rating {
    margin: 0;
    width: auto;
}

.grid-list__rating .ty-product-review-reviews-stars,
.ty-simple-list .ty-product-review-reviews-stars,
.ns-cantitate-scroller .ty-product-review-reviews-stars {
    font-size: 14px;
    color: var(--ns-rev-star);
}

.grid-list__rating .ty-product-review-reviews-total-reviews,
.ty-simple-list .ty-product-review-reviews-total-reviews,
.ns-cantitate-scroller .ty-product-review-reviews-total-reviews {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ns-rev-muted) !important;
    font-size: 12px;
    text-decoration: none !important;
}

/* Compact count (Roveli): chat icon + number, no "Recenzii:" label */
.grid-list__rating .ty-product-review-reviews-total-reviews,
.ty-simple-list .ty-product-review-reviews-total-reviews,
.ns-cantitate-scroller .ty-product-review-reviews-total-reviews,
.ty-product-review-reviews-total-reviews--count-only {
    font-variant-numeric: tabular-nums;
}

.ty-product-review-reviews-total-reviews--count-only {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    color: var(--ns-rev-muted) !important;
    font-size: 12px;
    text-decoration: none !important;
}

/* Kill broken CSS ::before glyphs (hieroglyph) — icon comes from .ty-icon-chat in tpl */
.grid-list__rating .ty-product-review-reviews-total-reviews::before,
.ty-simple-list .ty-product-review-reviews-total-reviews::before,
.ns-cantitate-scroller .ty-product-review-reviews-total-reviews::before,
.ty-product-review-reviews-total-reviews--count-only::before {
    content: none !important;
}

.ty-product-review-reviews-total-reviews--count-only .ns-rev-count-icon,
.ty-product-review-reviews-total-reviews--count-only .ty-icon-chat {
    font-family: glyphs !important;
    font-size: 12px;
    line-height: 1;
    color: var(--ns-rev-muted) !important;
    speak: none;
    -webkit-font-smoothing: antialiased;
}

.ty-product-review-reviews-total-reviews--count-only .ns-rev-count-num {
    font-size: 12px;
    color: var(--ns-rev-muted);
}

/* ---- Tab Recenzii: summary + sidebar ---- */
.ty-product-review-reviews-sidebar,
.content-product_reviews .ty-product-review-reviews-sidebar {
    background: var(--ns-rev-bg);
    border: 1px solid var(--ns-rev-border);
    border-radius: var(--ns-rev-radius);
    padding: 16px;
}

.ty-product-review-product-rating-overview__rating-current {
    font-size: 28px;
    font-weight: 700;
    color: #111;
}

.ty-product-review-product-stars-details__fill,
.ty-product-review-product-star-line__progress-bar-fill,
.ty-product-review-product-star-line .ty-progress-bar__bar {
    background: var(--ns-rev-star) !important;
}

.ty-product-review-write-product-review,
.ty-product-review-reviews-sidebar .ty-product-review-write-product-review {
    text-align: center;
    margin-top: 14px;
}

.ty-product-review-reviews-sidebar .ty-product-review-write-product-review-button,
.ty-product-review-write-product-review .ty-product-review-write-product-review-button,
.ty-product-review-reviews-sidebar .cm-dialog-opener.ty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 16px;
    background: var(--ns-rev-navy) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: var(--ns-rev-radius) !important;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-decoration: none !important;
}

.ty-product-review-reviews-sidebar .ty-product-review-write-product-review-button:hover {
    background: #0d2840 !important;
    color: #fff !important;
}

/* ---- Review posts ---- */
.ty-product-review-post {
    background: #fff;
    border: 1px solid var(--ns-rev-border);
    border-radius: var(--ns-rev-radius);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ty-product-review-post__content {
    border: 0;
    box-shadow: none;
}

.ty-product-review-post-customer__name {
    font-weight: 700;
    color: #111;
}

.ty-product-review-post-header__date,
.ty-product-review-post-customer__date {
    color: var(--ns-rev-muted);
    font-size: 12px;
}

/* ---- Write review popup ---- */
.ui-dialog .ty-product-review-new-product-review,
.ty-product-review-new-product-review {
    max-width: 640px;
}

.ui-dialog-titlebar .ui-dialog-title {
    color: var(--ns-rev-navy);
    font-weight: 700;
}

.ty-product-review-new-product-review__body {
    padding-top: 4px;
}

.ty-product-review-new-product-review-message__title-label,
.ty-product-review-new-product-review .ty-control-group__title {
    color: var(--ns-rev-navy);
    font-weight: 600;
}

.ty-product-review-new-product-review textarea,
.ty-product-review-new-product-review input[type="text"],
.ty-product-review-new-product-review .ty-input-text {
    border-radius: var(--ns-rev-radius) !important;
    border-color: var(--ns-rev-border) !important;
}

.ty-product-review-new-product-review__footer .ty-btn,
.ty-product-review-new-product-review__footer .ty-btn__primary {
    background: var(--ns-rev-navy) !important;
    border-color: var(--ns-rev-navy) !important;
    color: #fff !important;
    border-radius: var(--ns-rev-radius) !important;
    min-height: 46px;
    font-weight: 600;
}

.ty-product-review-new-product-review .ty-fileuploader,
.ty-product-review-new-product-review-media,
.ty-product-review-new-product-review .ty-dropzone {
    background: var(--ns-rev-bg);
    border: 1px dashed var(--ns-rev-border);
    border-radius: var(--ns-rev-radius);
}

@media (max-width: 767px) {
    .ty-product-review-product-rating-overview-short {
        gap: 8px 12px;
    }

    .ty-product-review-reviews-sidebar {
        margin-top: 12px;
    }
}
