/* Customer reviews (plugin markup: #reviews .commentlist li.review .comment_container .comment-text .cr-comment-images).
   Three looks chosen in the dashboard: body.sz-rv-1 cards, .sz-rv-2 horizontal strip, .sz-rv-3 elegant list.
   Every value below is a variable the "آراء الزبائن" section can change (defaults in the fallbacks). */
#reviews{--rv-c:var(--rv-card,#fff);--rv-b:var(--rv-bd,rgba(17,17,17,.12));--rv-w:var(--rv-bw,1px);--rv-s:var(--rv-star,#f5a524);--rv-r:var(--rv-pr,16px)}
#reviews .woocommerce-Reviews-title{font-size:17px;font-weight:800;margin:0 0 14px;text-align:var(--rv-ta,start)}
#reviews .woocommerce-Reviews-title span{font-weight:600;color:var(--muted,#6b6b6b)}

/* summary (the product layout prints .cod-rsum above the list) */
.cod-rsum{background:var(--rv-card,#faf9f6);border:var(--rv-bw,1px) solid var(--rv-bd,var(--pal-line,#e6e6e6));border-radius:20px}
.cod-rsum .cod-stars{color:var(--rv-star,#f5a524);letter-spacing:2px}
.cod-rbar b{background:var(--rv-star,var(--cod-star,#f5a524))}

/* list reset + card */
#reviews ol.commentlist{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:14px}
#reviews ol.commentlist li{margin:0;padding:0;list-style:none;background:var(--rv-c);border:var(--rv-w) solid var(--rv-b);border-radius:calc(var(--rv-r) + 4px);box-shadow:var(--rv-sh,0 4px 16px rgba(17,17,17,.06));overflow:hidden}
#reviews ol.commentlist li .comment_container{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0}
#reviews ol.commentlist li img.avatar{display:none}
#reviews .comment-text{display:flex;flex-direction:column;gap:6px;padding:0 0 16px;margin:0!important;border:0!important;min-width:0;width:auto!important;float:none!important}
#reviews .comment-text>*:not(.cr-comment-images){margin-inline:16px}
#reviews .comment-text>*:first-child{margin-top:14px}
#reviews .comment-text .star-rating{order:1;float:none;margin:0;color:var(--rv-s);font-size:15px}
#reviews .comment-text .star-rating span{color:var(--rv-s)}
#reviews .comment-text p.meta{order:2;margin:0;font-size:12.5px;color:var(--muted,#6b6b6b);display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
#reviews .comment-text .woocommerce-review__author{color:var(--ink,#111);font-weight:800;font-size:14px}
#reviews .comment-text .woocommerce-review__dash{display:none}
#reviews .comment-text .cr-comment-head-text{order:3;font-weight:800;font-size:15px;line-height:1.7}
#reviews .comment-text .description{order:4}
#reviews .comment-text .description p{margin:0;font-size:14px;line-height:1.95;overflow-wrap:anywhere}
#reviews .comment-text .ivole-verified-badge,#reviews .comment-text .woocommerce-review__verified{order:2;margin:0;display:inline-flex;align-items:center;gap:6px;width:fit-content;font-size:11.5px;font-weight:700;font-style:normal}
#reviews .comment-text .woocommerce-review__verified,#reviews .comment-text .ivole-verified-badge:has(.ivole-review-country-text:not(:empty)){color:#0b7a4b;background:#e8f6ef;border-radius:99px;padding:3px 10px}
#reviews .comment-text .ivole-verified-badge img{width:18px;height:13px;border-radius:2px;object-fit:cover}
#reviews .comment-text [class*="cr-voting"],#reviews .comment-text .cr-helpful{order:5;margin-top:6px;font-size:12.5px}

/* customer photos: large, rounded, tap to zoom */
#reviews .cr-comment-images{order:-1;display:grid;grid-template-columns:1fr;gap:4px;margin:0;padding:0;width:100%}
#reviews .cr-comment-images:has(.iv-comment-image:nth-child(2)){grid-template-columns:repeat(2,minmax(0,1fr))}
#reviews .cr-comment-images .iv-comment-image{margin:0!important;padding:0!important;float:none!important;width:auto!important;height:auto!important;max-width:none!important;border:0!important;box-shadow:none!important;background:none!important;min-width:0}
#reviews .cr-comment-images>div[style*="clear"]{display:none}
#reviews a.cr-comment-a{display:block;position:relative;aspect-ratio:var(--rv-ratio,4/5);overflow:hidden;border-radius:var(--rv-r);margin:4px;background:#efeeea;cursor:zoom-in;-webkit-tap-highlight-color:transparent}
#reviews a.cr-comment-a img{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;object-fit:cover;transition:transform .35s ease}
#reviews a.cr-comment-a:hover img{transform:scale(1.03)}
#reviews a.cr-comment-a::after{content:"";position:absolute;inset-inline-end:10px;bottom:10px;width:30px;height:30px;border-radius:50%;background:rgba(17,17,17,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4-4M11 8v6M8 11h6'/%3E%3C/svg%3E") center/18px no-repeat;pointer-events:none}

/* style 1: cards */
@media(min-width:900px){body.sz-rv-1 #reviews ol.commentlist{grid-template-columns:repeat(var(--rv-cols,2),minmax(0,1fr));align-items:start}}

/* style 2: horizontal strip of big photo cards */
body.sz-rv-2 #reviews ol.commentlist{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:2px 2px 12px;margin-inline:-2px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
body.sz-rv-2 #reviews ol.commentlist::-webkit-scrollbar{display:none}
body.sz-rv-2 #reviews ol.commentlist li{flex:0 0 min(78%,330px);scroll-snap-align:start}
body.sz-rv-2 #reviews .cr-comment-images{grid-template-columns:1fr!important}
body.sz-rv-2 #reviews .cr-comment-images .iv-comment-image:nth-child(n+2){display:none}
body.sz-rv-2 #reviews a.cr-comment-a{aspect-ratio:var(--rv-ratio,4/5)}

/* style 3: elegant list, big thumbnail beside the text */
body.sz-rv-3 #reviews ol.commentlist{gap:0}
body.sz-rv-3 #reviews ol.commentlist li{background:transparent;border:0;border-bottom:var(--rv-w) solid var(--rv-b);border-radius:0;box-shadow:none;overflow:visible;padding:18px 0}
body.sz-rv-3 #reviews ol.commentlist li:last-child{border-bottom:0}
body.sz-rv-3 #reviews ol.commentlist li .comment_container{display:grid;grid-template-columns:var(--rv-ph,116px) minmax(0,1fr);gap:0 16px;align-items:start}
body.sz-rv-3 #reviews .comment-text{display:contents}
body.sz-rv-3 #reviews .comment-text>*{grid-column:2}
body.sz-rv-3 #reviews .cr-comment-images{grid-column:1;grid-row:1 / span 8;order:0;grid-template-columns:1fr!important;align-self:start}
body.sz-rv-3 #reviews .cr-comment-images .iv-comment-image:nth-child(n+2){display:none}
body.sz-rv-3 #reviews a.cr-comment-a{margin:0;aspect-ratio:var(--rv-ratio,4/5)}
body.sz-rv-3 #reviews .comment-text>*{margin:0}
body.sz-rv-3 #reviews .comment-text{padding:0}
body.sz-rv-3 #reviews .comment-text .description,body.sz-rv-3 #reviews .comment-text .cr-comment-head-text{margin-top:6px}
body.sz-rv-3 #reviews .comment-text>.star-rating{margin-top:2px}
body.sz-rv-3 #reviews ol.commentlist li .comment_container:not(:has(.cr-comment-images)){display:block}
@media(max-width:420px){body.sz-rv-3 #reviews ol.commentlist li .comment_container{grid-template-columns:min(var(--rv-ph,116px),34vw) minmax(0,1fr);gap:0 12px}}

/* collapse (script adds the button) */
#reviews ol.commentlist li.sz-rv-hide{display:none}
.sz-rv-more{display:flex;margin:4px auto 18px;min-height:46px;align-items:center;justify-content:center;padding:0 26px;border-radius:99px;border:var(--rv-bw,1px) solid var(--rv-bd,rgba(17,17,17,.18));background:var(--rv-card,#fff);color:var(--ink,#111);font:inherit;font-weight:700;cursor:pointer}
.sz-rv-more:focus-visible{outline:2px solid var(--primary,#111);outline-offset:2px}

/* pagination the plugin / WooCommerce prints */
#reviews .woocommerce-pagination,#reviews .cr-pagination-review{margin:0 0 16px;text-align:center}

/* form: «اكتب تقييمك» */
#reviews #review_form_wrapper{margin-top:6px}
#reviews #review_form #respond{background:var(--rv-card,#fff);border:var(--rv-bw,1px) solid var(--rv-bd,rgba(17,17,17,.12));border-radius:20px;padding:18px 16px;box-shadow:var(--rv-sh,0 4px 16px rgba(17,17,17,.06))}
#reviews #reply-title{display:block;font-size:17px;font-weight:800;margin:0 0 12px}
#reviews #review_form label{display:block;font-size:13px;font-weight:700;margin:0 0 6px}
#reviews #review_form .comment-notes{font-size:12px;color:var(--muted,#6b6b6b);margin:0 0 12px}
#reviews #review_form p{margin:0 0 14px}
#reviews #review_form .comment-form-rating{margin:0 0 14px}
#reviews #review_form input[type=text],#reviews #review_form input[type=email],#reviews #review_form textarea,#reviews #review_form select{width:100%;border:1px solid rgba(17,17,17,.18);border-radius:14px;padding:12px 14px;background:#fff;font:inherit;font-size:15px;box-sizing:border-box}
#reviews #review_form textarea{min-height:120px;resize:vertical}
#reviews #review_form input:focus,#reviews #review_form textarea:focus,#reviews #review_form select:focus{outline:2px solid var(--primary,#111);outline-offset:1px;border-color:transparent}
#reviews #review_form p.stars a::before{color:var(--rv-star,#f5a524)}
#reviews #review_form .cr-upload-local-images{margin:0 0 14px}
#reviews #review_form .cr-upload-images-status{display:flex;align-items:center;justify-content:center;gap:8px;min-height:74px;border:2px dashed rgba(17,17,17,.22);border-radius:16px;background:#faf9f6;font-weight:600;font-size:13px;text-align:center;cursor:pointer;margin:0}
#reviews #review_form .comment-form-cookies-consent{display:flex;gap:8px;align-items:flex-start}
#reviews #review_form .comment-form-cookies-consent label{display:block;font-weight:500;font-size:12px;margin:0;min-height:0}
#reviews #review_form .form-submit{margin:0}
#reviews #review_form .form-submit input{width:100%;min-height:52px;border-radius:99px;border:0;background:var(--primary,#111);color:#fff;font:inherit;font-weight:800;font-size:16px;cursor:pointer}

/* photo viewer (script) */
.sz-rv-lb{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;background:rgba(10,10,10,.92);padding:16px}
.sz-rv-lb[hidden]{display:none}
.sz-rv-lb img{max-width:100%;max-height:100%;object-fit:contain;border-radius:12px;touch-action:pinch-zoom}
.sz-rv-lb button{position:absolute;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:22px;line-height:1;cursor:pointer;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.sz-rv-lb .x{top:max(14px,env(safe-area-inset-top));inset-inline-end:14px}
.sz-rv-lb .n{top:50%;margin-top:-23px;inset-inline-end:12px}
.sz-rv-lb .p{top:50%;margin-top:-23px;inset-inline-start:12px}
.sz-rv-lb[data-one] .n,.sz-rv-lb[data-one] .p{display:none}
@media(prefers-reduced-motion:reduce){#reviews a.cr-comment-a img{transition:none}}

/* own stars (the WooCommerce star font is not loaded by the theme); the inner span width is the rating, filled from the reading start */
#reviews .comment-text .star-rating{position:relative;display:block;width:5.6em;height:1.25em;line-height:1.25;overflow:hidden;font-size:17px;letter-spacing:.12em;color:#dedbd4;white-space:nowrap}
#reviews .comment-text .star-rating::before{content:"★★★★★";position:absolute;top:0;inset-inline-start:0}
#reviews .comment-text .star-rating span{position:absolute;top:0;inset-inline-start:0;height:100%;overflow:hidden;font-size:0;padding:0}
#reviews .comment-text .star-rating span::before{content:"★★★★★";position:absolute;top:0;inset-inline-start:0;font-size:17px;color:var(--rv-star,#f5a524)}

/* manager switched the real stars off (Djerimi → المتجر والبطاقات) */
body.sz-no-stars #reviews .star-rating,body.sz-no-stars #reviews .cr-star-rating,body.sz-no-stars .cod-rsum,body.sz-no-stars .woocommerce-product-rating{display:none!important}
