/**
 * Review display — product page tab
 * Prefix: ct-rv-
 * v0.4 — avatar checkmark, tab badge, content alignment
 */

/* ── Tab count badge ─────────────────────────── */

.ct-rv-display__title {
	margin: 0 0 1.25rem;
}

.ct-rv-tab-count {
	background-color: #c61932 !important;
}

#cgkit-tab-reviews-title a {
	padding-right: 34px !important;
}

/* ── Summary bar ─────────────────────────────── */

.ct-rv-summary {
	display: flex;
	gap: 28px;
	align-items: center;
	padding: 24px 28px;
	background: #f8f8f6;
	border-radius: 12px;
	margin-bottom: 24px;
}

.ct-rv-summary__score {
	text-align: center;
	min-width: 90px;
}

.ct-rv-summary__average {
	font-size: 2.5rem;
	font-weight: 600;
	line-height: 1;
	display: block;
}

.ct-rv-summary__stars {
	display: flex;
	gap: 2px;
	justify-content: center;
	margin: 6px 0;
}

.ct-rv-summary__count {
	font-size: 0.8125rem;
	color: #888;
}

.ct-rv-summary__bars { flex: 1; }

.ct-rv-summary__bar-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.ct-rv-summary__bar-row:last-child { margin-bottom: 0; }

.ct-rv-summary__bar-label {
	font-size: 0.8125rem;
	color: #888;
	width: 14px;
	text-align: right;
	flex-shrink: 0;
}

.ct-rv-summary__bar-track {
	flex: 1;
	height: 10px;
	background: #fff;
	border-radius: 5px;
	overflow: hidden;
}

.ct-rv-summary__bar-fill {
	height: 100%;
	background: #c61932;
	border-radius: 5px;
	transition: width 0.3s ease;
}

.ct-rv-summary__bar-count {
	font-size: 0.75rem;
	color: #aaa;
	width: 24px;
	text-align: right;
	flex-shrink: 0;
}

/* ── Photo gallery strip ─────────────────────── */

.ct-rv-gallery {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	margin-bottom: 20px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.ct-rv-gallery::-webkit-scrollbar { height: 4px; }
.ct-rv-gallery::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.ct-rv-gallery__item {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	display: block;
}

.ct-rv-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.15s;
}

.ct-rv-gallery__item:hover img { opacity: 0.85; }

/* ── Filter pills ────────────────────────────── */

.ct-rv-filters {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.ct-rv-filters__pill {
	padding: 6px 14px;
	font-size: 0.8125rem;
	font-family: inherit;
	border-radius: 20px;
	border: 1px solid #ddd;
	background: transparent;
	color: #666;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
}

.ct-rv-filters__pill:hover { border-color: #999; }

.ct-rv-filters__pill--active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

/* ── Review card ─────────────────────────────── */

.ct-rv-card {
	padding: 24px 0;
	border-bottom: 1px solid #f0f0f0;
}

.ct-rv-card:last-child { border-bottom: none; }

.ct-rv-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 10px;
}

.ct-rv-card__author {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Avatar with verified checkmark on corner */
.ct-rv-card__avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.ct-rv-card__avatar {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #ffecef;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 500;
	font-size: 1.4rem;
	color: #c61932;
}

.ct-rv-card__verified {
	position: absolute;
	bottom: 2px;
	right: -3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #2e7d32;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	cursor: help;
}

.ct-rv-card__verified svg {
	width: 9px;
	height: 9px;
}

.ct-rv-card__verified::after {
	content: 'Achiziție verificată';
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: #1a1a1a;
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 400;
	padding: 4px 10px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
	z-index: 10;
}

.ct-rv-card__verified:hover::after {
	opacity: 1;
}

.ct-rv-card__meta {
	display: flex;
	flex-direction: column;
}

.ct-rv-card__name {
	font-size: 1.0625rem;
	font-weight: 600;
}

.ct-rv-card__rating-line {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
}

.ct-rv-card__date {
	font-size: 0.75rem;
	color: #aaa;
	flex-shrink: 0;
}

/* Text + photos aligned from name column (offset by avatar + gap) */
.ct-rv-card__text {
	font-size: 1rem;
	line-height: 1.65;
	margin-bottom: 12px;
	padding-left: 72px;
}

.ct-rv-card__text p { margin: 0; }

/* ── Review photos ───────────────────────────── */

.ct-rv-card__photos {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	padding-left: 72px;
}

.ct-rv-card__photo {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	display: block;
	flex-shrink: 0;
}

.ct-rv-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.15s;
}

.ct-rv-card__photo:hover img { opacity: 0.85; }

/* ── Voting — right-aligned, green/red ───────── */

.ct-rv-card__voting {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	padding-left: 72px;
}

.ct-rv-card__voting-label { display: none; }

.ct-rv-card__vote {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 0.8125rem;
	background: none;
	border: none;
	padding: 4px 8px;
	cursor: pointer;
	font-family: inherit;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.ct-rv-card__vote--up { color: #2e7d32; }
.ct-rv-card__vote--up:hover:not(:disabled) { background: #e8f5e9; }
.ct-rv-card__vote--down { color: #c41230; }
.ct-rv-card__vote--down:hover:not(:disabled) { background: #fce4ec; }
.ct-rv-card__vote:disabled { cursor: default; opacity: 0.5; }
.ct-rv-card__vote-count { font-variant-numeric: tabular-nums; }

/* ── Stars shared — bigger ───────────────────── */

.ct-rv-stars {
	display: inline-flex;
	gap: 1px;
	vertical-align: middle;
	line-height: 1;
}

/* ── Load more ───────────────────────────────── */

.ct-rv-load-more {
	text-align: center;
	padding: 24px 0;
}

.ct-rv-load-more__btn {
	padding: 10px 28px;
	font-size: 0.875rem;
	font-family: inherit;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: transparent;
	color: #666;
	cursor: pointer;
	transition: border-color 0.15s;
}

.ct-rv-load-more__btn:hover { border-color: #999; }
.ct-rv-load-more__btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ct-rv-empty {
	text-align: center;
	padding: 2.5rem 1rem;
	color: #888;
	font-size: 1rem;
}

/* ── Lightbox with navigation ────────────────── */

.ct-rv-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.88);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
}

.ct-rv-lightbox--visible { opacity: 1; }

.ct-rv-lightbox img {
	max-width: 90vw;
	max-height: 90vh;
	border-radius: 8px;
	object-fit: contain;
}

.ct-rv-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.15);
	color: #fff;
	font-size: 1.25rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	backdrop-filter: blur(4px);
}

.ct-rv-lightbox__nav:hover { background: rgba(255,255,255,0.3); }
.ct-rv-lightbox__nav--prev { left: 16px; }
.ct-rv-lightbox__nav--next { right: 16px; }

.ct-rv-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.15);
	color: #fff;
	font-size: 1.125rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
}

.ct-rv-lightbox__close:hover { background: rgba(255,255,255,0.3); }

/* ── Responsive ──────────────────────────────── */

@media (max-width: 600px) {
	.ct-rv-summary {
		flex-direction: column;
		gap: 12px;
		padding: 20px;
	}

	.ct-rv-summary__score {
		display: flex;
		align-items: center;
		gap: 12px;
		min-width: auto;
	}

	.ct-rv-summary__average { font-size: 2rem; }

	/* Hide distribution bars on mobile */
	.ct-rv-summary__bars { display: none; }

	.ct-rv-gallery__item { width: 68px; height: 68px; }
	.ct-rv-card__photo { width: 68px; height: 68px; }
	.ct-rv-card__avatar { width: 44px; height: 44px; font-size: 1rem; }
	.ct-rv-card__text,
	.ct-rv-card__photos,
	.ct-rv-card__voting { padding-left: 56px; }

	.ct-rv-lightbox__nav { width: 36px; height: 36px; font-size: 1rem; }
	.ct-rv-lightbox__nav--prev { left: 8px; }
	.ct-rv-lightbox__nav--next { right: 8px; }
}

/* ── Guest review form ──────────────────────── */

/* Shared star styles (also used by token form) */
.ct-rv-form__star {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: #ccc;
	transition: color 0.15s, transform 0.15s;
	line-height: 1;
}

.ct-rv-form__star:hover,
.ct-rv-form__star--active {
	color: #c61932;
}

.ct-rv-form__star--active svg {
	fill: #c61932;
	stroke: none;
}

.ct-rv-form__star:hover {
	transform: scale(1.15);
}

/* Shared photo upload styles */
.ct-rv-form__photo-input { display: none; }

.ct-rv-form__photo-add {
	width: 64px;
	height: 64px;
	border: 1px dashed #ccc;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.15s;
	flex-shrink: 0;
}

.ct-rv-form__photo-add:hover { border-color: #c41230; }

.ct-rv-form__photo-add-icon { color: #999; line-height: 1; }
.ct-rv-form__photo-add-text { font-size: 0.6875rem; color: #999; margin-top: 2px; }

.ct-rv-form__photo-preview {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
}

.ct-rv-form__photo-preview img { width: 100%; height: 100%; object-fit: cover; }

.ct-rv-form__photo-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	background: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
	padding: 0;
	line-height: 1;
}

.ct-rv-form__photo-remove svg { width: 10px; height: 10px; }

/* Shared consent styles */
.ct-rv-form__consent-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.875rem;
	color: #666;
	cursor: pointer;
	line-height: 1.4;
}

.ct-rv-form__consent-label a { color: #c41230; text-decoration: none; }
.ct-rv-form__consent-label a:hover { text-decoration: underline; }
.ct-rv-form__consent-checkbox { flex-shrink: 0; width: 18px; height: 18px; }

.ct-rv-form__success-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #2e7d32;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
}

.ct-rv-guest {
	margin-top: 2rem;
	border-top: 1px solid #f0f0f0;
	padding-top: 1.5rem;
}

.ct-rv-guest__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	padding: 12px 16px;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	transition: border-color 0.15s;
}

.ct-rv-guest__toggle:hover {
	border-color: #c41230;
}

.ct-rv-guest__toggle-text {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #333;
}

.ct-rv-guest__toggle-arrow {
	transition: transform 0.2s;
	color: #999;
}

.ct-rv-guest--open .ct-rv-guest__toggle-arrow {
	transform: rotate(180deg);
}

.ct-rv-guest__form {
	margin-top: 1rem;
	padding: 0 4px;
}

.ct-rv-guest__fields {
	display: flex;
	gap: 12px;
	margin-bottom: 1rem;
}

.ct-rv-guest__input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.ct-rv-guest__input:focus {
	outline: none;
	border-color: #c41230;
}

.ct-rv-guest__rating {
	margin-bottom: 0.75rem;
}

.ct-rv-guest__rating-label {
	font-size: 0.875rem;
	color: #666;
	display: block;
	margin-bottom: 6px;
}

.ct-rv-guest__stars {
	display: flex;
	gap: 4px;
}

.ct-rv-guest__textarea {
	width: 100%;
	min-height: 70px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 0.9375rem;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
	margin-bottom: 0.75rem;
	transition: border-color 0.15s;
}

.ct-rv-guest__textarea:focus {
	outline: none;
	border-color: #c41230;
}

.ct-rv-guest__photos {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.ct-rv-guest__photo-previews {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ct-rv-guest__consent {
	margin-bottom: 1rem;
}

.ct-rv-guest__submit {
	display: block;
	width: 100%;
	padding: 12px;
	font-size: 0.9375rem;
	font-weight: 500;
	font-family: inherit;
	background: #c41230;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: opacity 0.15s;
}

.ct-rv-guest__submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ct-rv-guest__submit:not(:disabled):hover {
	opacity: 0.9;
}

.ct-rv-guest__success {
	text-align: center;
	padding: 2rem 1rem;
}

.ct-rv-guest__success p {
	font-size: 0.9375rem;
	color: #666;
	margin: 0.75rem 0 0;
}

@media (max-width: 600px) {
	.ct-rv-guest__fields {
		flex-direction: column;
		gap: 8px;
	}
}