/**
 * Reviews PRO by OCM — frontend styles.
 * RTL-safe: the star widget is flex-based so it works in both directions.
 */

.rprocm-review-page {
	margin: 0;
	background: #f4f4f5;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: #2b2b2b;
	padding: 32px 16px;
}

.rprocm-card {
	max-width: 560px;
	margin: 0 auto;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
}

.rprocm-logo {
	text-align: center;
	margin-bottom: 16px;
}

.rprocm-logo img {
	max-height: 56px;
	width: auto;
}

.rprocm-title {
	font-size: 22px;
	margin: 0 0 20px;
	text-align: center;
}

.rprocm-block {
	border-top: 1px solid #eee;
	padding-top: 20px;
	margin-top: 20px;
}

.rprocm-block h2 {
	font-size: 17px;
	margin: 0 0 12px;
}

.rprocm-hint {
	color: #888;
	font-size: 13px;
	margin: -6px 0 14px;
}

/* Star rating widget (radio based) */
.rprocm-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	border: 0;
	padding: 0;
	margin: 0 0 12px;
}

.rprocm-stars input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.rprocm-stars label {
	font-size: 40px;
	line-height: 1;
	color: #d9d9d9;
	cursor: pointer;
	padding: 0 3px;
	transition: color 0.12s ease, transform 0.08s ease;
}

.rprocm-stars label:hover {
	transform: scale( 1.12 );
}

.rprocm-stars input:checked ~ label,
.rprocm-stars label:hover,
.rprocm-stars label:hover ~ label {
	color: var(--rprocm-accent, #f5a623);
}

.rprocm-stars input:focus-visible + label {
	outline: 2px solid var(--rprocm-accent, #f5a623);
	outline-offset: 2px;
}

.rprocm-input,
.rprocm-textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #d9dadd;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
	margin-bottom: 10px;
	font-family: inherit;
}

.rprocm-textarea {
	resize: vertical;
}

.rprocm-product {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid #f0f0f0;
}

.rprocm-product__media img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
}

.rprocm-product__body {
	flex: 1;
}

.rprocm-product__name {
	font-size: 15px;
	margin: 0 0 8px;
}

.rprocm-actions {
	margin-top: 22px;
	text-align: center;
}

.rprocm-button {
	background: var(--rprocm-button, #2b2b2b);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 13px 34px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.rprocm-button:hover {
	opacity: 0.9;
}

.rprocm-button[disabled] {
	opacity: 0.6;
	cursor: default;
}

.rprocm-notice {
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 14px;
}

.rprocm-notice--error {
	background: #fdecea;
	color: #b3261e;
}

.rprocm-message {
	text-align: center;
	padding: 24px 8px;
}

.rprocm-message h1 {
	font-size: 22px;
	margin: 0 0 10px;
}

.rprocm-form__status {
	text-align: center;
	margin-top: 12px;
	font-size: 14px;
}

.rprocm-footer {
	margin-top: 26px;
	text-align: center;
	color: #9a9a9a;
	font-size: 13px;
}

/* ---- Reviews display widget ---- */

.rprocm-reviews {
	margin: 20px 0;
}

.rprocm-reviews__track {
	display: block;
}

.rprocm-reviews--grid .rprocm-reviews__track {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.rprocm-reviews--slider .rprocm-reviews__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: 8px;
}

.rprocm-reviews--slider .rprocm-review {
	min-width: 260px;
	scroll-snap-align: start;
}

.rprocm-review {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 14px;
}

.rprocm-reviews--grid .rprocm-review,
.rprocm-reviews--slider .rprocm-review {
	margin-bottom: 0;
}

.rprocm-review__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.rprocm-review__avatar img {
	border-radius: 50%;
}

.rprocm-review__author {
	font-weight: 600;
	font-size: 14px;
}

.rprocm-review__verified {
	display: inline-block;
	color: #1a7f37;
	font-size: 12px;
	margin-inline-start: 6px;
}

.rprocm-rating .rprocm-star {
	color: #d9d9d9;
	font-size: 16px;
}

.rprocm-rating .rprocm-star.is-filled {
	color: var(--rprocm-accent, #f5a623);
}

.rprocm-review__title {
	margin: 8px 0 4px;
	font-size: 15px;
}

.rprocm-review__content {
	margin: 4px 0;
	font-size: 14px;
	line-height: 1.55;
	color: #444;
}

.rprocm-review__date {
	display: block;
	margin-top: 8px;
	color: #9a9a9a;
	font-size: 12px;
}

/* ---- Progress bar ---- */
.rprocm-progress {
	height: 6px;
	background: #eef0f2;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 18px;
}

.rprocm-progress__bar {
	height: 100%;
	width: 0;
	background: var(--rprocm-accent, #f5a623);
	transition: width 0.25s ease;
}

/* ---- Success animation ---- */
.rprocm-success-anim {
	animation: rprocm-fade-in 0.4s ease;
}

.rprocm-success-check {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #1a7f37;
	color: #fff;
	font-size: 34px;
	line-height: 64px;
	text-align: center;
	animation: rprocm-pop 0.35s ease;
}

@keyframes rprocm-pop {
	0% { transform: scale( 0 ); }
	70% { transform: scale( 1.15 ); }
	100% { transform: scale( 1 ); }
}

@keyframes rprocm-fade-in {
	from { opacity: 0; transform: translateY( 8px ); }
	to { opacity: 1; transform: none; }
}

/* ---- Thank-you reward coupon + continue-shopping CTA ---- */
.rprocm-coupon {
	margin: 20px auto 0;
	max-width: 420px;
	padding: 16px 18px;
	text-align: center;
	border: 2px dashed var(--rprocm-accent, #f5a623);
	border-radius: 12px;
	background: rgba( 245, 166, 35, 0.08 );
}

.rprocm-coupon__text {
	margin: 0 0 8px;
	font-size: 14px;
	color: #444;
}

.rprocm-coupon__code {
	display: inline-block;
	padding: 8px 18px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 2px;
	color: #1f1f1f;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.rprocm-button--continue {
	display: block;
	width: fit-content;
	margin: 22px auto 4px;
	text-align: center;
	text-decoration: none;
}

/* ---- Widget toolbar & load-more ---- */
.rprocm-reviews__toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #ececec;
}

.rprocm-reviews__count {
	font-weight: 600;
}

.rprocm-reviews__filters {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.rprocm-reviews__filters select {
	padding: 6px 8px;
	border: 1px solid #d9dadd;
	border-radius: 6px;
}

.rprocm-reviews__verified-toggle {
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.rprocm-reviews__more {
	text-align: center;
	margin-top: 16px;
}

.rprocm-reviews__load-more {
	background: transparent;
	border: 1px solid #d9dadd;
	border-radius: 8px;
	padding: 10px 22px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.15s ease;
}

.rprocm-reviews__load-more:hover {
	background: #f6f7f8;
}

@media screen and ( max-width: 600px ) {
	.rprocm-card { padding: 18px; }
	.rprocm-stars label { font-size: 34px; }
	.rprocm-product { flex-direction: column; }
	.rprocm-reviews__toolbar { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
 * Floating reviews tab + panel
 * ======================================================= */
:root { --rprocm-fab: #b3243b; --rprocm-fab-text: #ffffff; }

.rprocm-fab__tab {
	position: fixed;
	top: 40%;
	z-index: 99998;
	background: var(--rprocm-fab);
	color: var(--rprocm-fab-text);
	border: 0;
	cursor: pointer;
	padding: 16px 8px;
	border-radius: 0 8px 8px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 14px rgba(0,0,0,.18);
	font-size: 14px;
	line-height: 1.2;
}

/* Tab + panel edge follow the per-device position setting (768px divide). */
@media screen and ( min-width: 769px ) {
	.rprocm-fab--d-left .rprocm-fab__tab { left: 0; right: auto; border-radius: 0 8px 8px 0; }
	.rprocm-fab--d-right .rprocm-fab__tab { right: 0; left: auto; border-radius: 8px 0 0 8px; }
	.rprocm-fab--d-left .rprocm-fab__panel { left: 0; right: auto; }
	.rprocm-fab--d-right .rprocm-fab__panel { right: 0; left: auto; }
}
@media screen and ( max-width: 768px ) {
	.rprocm-fab--m-left .rprocm-fab__tab { left: 0; right: auto; border-radius: 0 8px 8px 0; }
	.rprocm-fab--m-right .rprocm-fab__tab { right: 0; left: auto; border-radius: 8px 0 0 8px; }
	.rprocm-fab--m-left .rprocm-fab__panel { left: 0; right: auto; }
	.rprocm-fab--m-right .rprocm-fab__panel { right: 0; left: auto; }
}

.rprocm-fab__label { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 600; letter-spacing: .5px; }
.rprocm-fab__star { color: #ffd34d; font-size: 16px; }

.rprocm-fab__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	z-index: 99998;
	display: none;
}

.rprocm-fab__panel {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 400px;
	max-width: 92vw;
	background: #fff;
	z-index: 99999;
	box-shadow: 0 0 40px rgba(0,0,0,.25);
	display: none;
	flex-direction: column;
}

/* Visibility is driven by the .is-open class on the container so it can never
 * be shown before the script binds. */
.rprocm-fab.is-open .rprocm-fab__overlay { display: block; }
.rprocm-fab.is-open .rprocm-fab__panel { display: flex; animation: rprocm-slide-in .25s ease; }
.rprocm-fab.is-open .rprocm-fab__tab { visibility: hidden; }

@keyframes rprocm-slide-in { from { transform: translateX(-8%); opacity: .4; } to { transform: none; opacity: 1; } }

.rprocm-fab__header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 18px; border-bottom: 1px solid #eee;
}
.rprocm-fab__title { font-size: 16px; }
.rprocm-fab__close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #888; }

.rprocm-fab__summary { padding: 16px 18px; border-bottom: 1px solid #f0f0f0; }
.rprocm-fab__score { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rprocm-fab__avg { font-size: 34px; font-weight: 700; color: #222; }
.rprocm-fab__total { color: #777; font-size: 13px; }
.rprocm-fab__bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 12px; }
.rprocm-fab__bar-label { width: 30px; color: #666; }
.rprocm-fab__bar { flex: 1; height: 8px; background: #eee; border-radius: 5px; overflow: hidden; }
.rprocm-fab__bar span { display: block; height: 100%; background: var(--rprocm-fab); }
.rprocm-fab__bar-count { width: 34px; text-align: end; color: #666; }

.rprocm-fab__tabs { display: flex; gap: 6px; padding: 12px 18px 0; }
.rprocm-fab__tabbtn { flex: 1; background: #f4f4f5; border: 0; padding: 9px; border-radius: 8px 8px 0 0; cursor: pointer; font-size: 13px; }
.rprocm-fab__tabbtn.is-active { background: var(--rprocm-fab); color: #fff; font-weight: 600; }

.rprocm-fab__controls { display: flex; gap: 8px; padding: 12px 18px; }
.rprocm-fab__controls select { flex: 1; padding: 7px; border: 1px solid #ddd; border-radius: 6px; }

.rprocm-fab__list { flex: 1; overflow-y: auto; padding: 0 18px 18px; margin: 0; }
.rprocm-fab__more { text-align: center; padding: 10px 0; }
.rprocm-fab__loadmore { background: transparent; border: 1px solid #d9dadd; border-radius: 8px; padding: 9px 20px; cursor: pointer; }
.rprocm-fab__loading { color: #888; font-size: 13px; }

/* =========================================================
 * Checkout reviews slider
 * ======================================================= */
.rprocm-checkout-slider {
	margin: 18px 0;
	padding: 18px;
	border: 1px solid #ececec;
	border-radius: 12px;
	background: #fafafa;
	text-align: center;
}
.rprocm-checkout-slider__head { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.rprocm-checkout-slider__avg { font-size: 20px; font-weight: 700; }
.rprocm-checkout-slider__count { color: #777; font-size: 13px; }
.rprocm-checkout-slider__track { position: relative; min-height: 96px; }
.rprocm-checkout-slider__slide { display: none; animation: rprocm-fade-in .4s ease; }
.rprocm-checkout-slider__slide.is-active { display: block; }
.rprocm-checkout-slider__title { font-weight: 600; margin: 6px 0 4px; }
.rprocm-checkout-slider__text { margin: 4px auto; max-width: 520px; color: #444; font-style: normal; }
.rprocm-checkout-slider__author { color: #666; font-size: 13px; font-style: normal; }
.rprocm-checkout-slider__verified { color: #1a7f37; }
.rprocm-checkout-slider__dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.rprocm-checkout-slider__dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: #ccc; cursor: pointer; padding: 0; }
.rprocm-checkout-slider__dot.is-active { background: var(--rprocm-fab); }

/* Product summary badge */
.rprocm-product-summary { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 12px; cursor: pointer; }
.rprocm-product-summary__count { color: #666; font-size: 13px; text-decoration: underline; }

@media screen and ( max-width: 480px ) {
	.rprocm-fab__panel { width: 100vw; max-width: 100vw; }
}

/* Per-device visibility for the floating tab (768px = phone/tablet divide). */
@media screen and ( max-width: 768px ) {
	.rprocm-fab--hide-mobile { display: none !important; }
}
@media screen and ( min-width: 769px ) {
	.rprocm-fab--hide-desktop { display: none !important; }
}

/* =========================================================
 * Criteria rows (review form)
 * ======================================================= */
.rprocm-criteria { margin: 10px 0; border-top: 1px dashed #eee; padding-top: 10px; }
.rprocm-criteria__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.rprocm-criteria__label { font-size: 14px; color: #444; }
.rprocm-criteria .rprocm-stars label { font-size: 22px; padding: 0 1px; }
.rprocm-criteria .rprocm-stars { margin-bottom: 0; }

.rprocm-product.is-focused { box-shadow: 0 0 0 2px var(--rprocm-accent, #f5a623); border-radius: 10px; padding: 10px; }

/* =========================================================
 * Photo upload (review form)
 * ======================================================= */
.rprocm-photos { margin-top: 10px; }
.rprocm-photos__add {
	display: inline-flex; align-items: center; gap: 6px;
	border: 1px dashed #c9cbd0; border-radius: 8px; padding: 8px 14px;
	cursor: pointer; font-size: 13px; color: #555;
}
.rprocm-photos__add:hover { background: #fafafa; }
.rprocm-photos__input { display: none; }
.rprocm-photos__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rprocm-photos__thumb {
	position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
	background: #f0f0f1; display: flex; align-items: center; justify-content: center;
}
.rprocm-photos__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rprocm-photos__remove {
	position: absolute; top: 2px; inset-inline-end: 2px;
	background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%;
	width: 18px; height: 18px; line-height: 16px; cursor: pointer; font-size: 12px; padding: 0;
}
.rprocm-photos__spin { color: #888; }

/* Photos inside displayed reviews */
.rprocm-review__photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.rprocm-review__photo img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

/* =========================================================
 * Confirmation preview
 * ======================================================= */
.rprocm-preview { margin-top: 18px; text-align: start; }
.rprocm-preview__label { font-weight: 600; color: #555; margin-bottom: 8px; }
.rprocm-preview-card { border: 1px solid #ececec; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.rprocm-preview-card h4 { margin: 0 0 6px; font-size: 15px; }
.rprocm-preview-card__title { font-weight: 600; margin: 6px 0 2px; }
.rprocm-preview-card__photos { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rprocm-preview-card__photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }

/* =========================================================
 * Review form — marketing message & step wizard
 * ======================================================= */
.rprocm-block__msg {
	color: #555;
	font-size: 15px;
	line-height: 1.55;
	margin: 4px 0 14px;
}
.rprocm-block--product .rprocm-block__msg,
.rprocm-product .rprocm-block__msg { text-align: center; }
.rprocm-block__heading { margin-bottom: 6px; }

.rprocm-wizard-nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
}
.rprocm-wizard-next {
	background: var(--rprocm-button, #2b2b2b);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 15px 30px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	max-width: 360px;
	transition: opacity .15s ease;
}
.rprocm-wizard-next:hover { opacity: .92; }
.rprocm-wizard-done {
	background: transparent;
	border: 0;
	color: #777;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
	padding: 4px;
}
.rprocm-wizard-dots {
	display: flex;
	gap: 6px;
	margin-top: 4px;
}
.rprocm-wizard-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d9dadd;
}
.rprocm-wizard-dot.is-active { background: var(--rprocm-accent, #f5a623); }

/* =========================================================
 * Floating panel — criteria bars
 * ======================================================= */
.rprocm-fab__criteria { margin-top: 12px; }
.rprocm-fab__crit { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.rprocm-fab__crit-name { flex: 0 0 40%; color: #444; }
.rprocm-fab__crit-bar { flex: 1; height: 8px; background: #eee; border-radius: 5px; overflow: hidden; }
.rprocm-fab__crit-bar span { display: block; height: 100%; background: #1a7f37; }
.rprocm-fab__crit-pct { flex: 0 0 auto; color: #1a7f37; font-weight: 600; }
