/*
 * CognitiShop - Propriete ITaiB.fr.
 * Copyright (c) 2026 ITaiB.fr. Tous droits reserves.
 * Logiciel proprietaire et confidentiel.
 */

.cs-review-section {
	display: grid;
	gap: 1rem;
}

.cs-product-rating-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.28rem 0.7rem;
	align-items: center;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(23, 43, 77, 0.12);
	border-radius: 8px;
	background: linear-gradient(135deg, #fffaf2, #ffffff 54%, #f2fbff);
	color: #172b4d;
	text-decoration: none;
	box-shadow: 0 12px 26px rgba(23, 43, 77, 0.07);
}

.cs-product-rating-card:focus-visible {
	outline: 3px solid rgba(12, 124, 116, 0.28);
	outline-offset: 2px;
}

.cs-product-rating-eyebrow {
	grid-column: 1 / -1;
	color: #596a7c;
	font-size: 0.78rem;
	font-weight: 900;
	text-transform: uppercase;
}

.cs-product-rating-stars {
	display: inline-flex;
	align-items: center;
	gap: 0.12rem;
	font-size: 1.35rem;
	line-height: 1;
}

.cs-product-rating-star {
	position: relative;
	display: inline-block;
	color: #d7dde5;
}

.cs-product-rating-star.is-full {
	color: #ffb000;
}

.cs-product-rating-star.is-half::before {
	content: "\2605";
	position: absolute;
	inset: 0 auto 0 0;
	width: 50%;
	overflow: hidden;
	color: #ffb000;
}

.cs-product-rating-card strong {
	color: #082f2d;
	font-size: 1.05rem;
	font-weight: 920;
	line-height: 1.1;
}

.cs-product-rating-card > span:last-child {
	grid-column: 2;
	color: #3d4e63;
	font-size: 0.9rem;
	line-height: 1.35;
}

.cs-product-rating-card.is-empty {
	background: #f8fafc;
	box-shadow: none;
}

.cs-product-rating-card.is-default {
	background: linear-gradient(135deg, #fff8e4, #ffffff 58%, #edf9f2);
	border-color: rgba(255, 176, 0, 0.34);
}

.cs-product-rating-card.is-empty .cs-product-rating-stars {
	opacity: 0.72;
}

.cs-review-heading {
	display: flex;
	align-items: start;
	justify-content: space-between;
	gap: 1rem;
}

.cs-review-heading-kicker {
	display: inline-flex;
	width: max-content;
	max-width: 100%;
	margin-bottom: 0.35rem;
	padding: 0.28rem 0.55rem;
	border-radius: 999px;
	background: #eef6f5;
	color: #0c7c74;
	font-size: 0.76rem;
	font-weight: 900;
	text-transform: uppercase;
}

.cs-review-heading p {
	margin: 0;
	color: #3d4e63;
	line-height: 1.55;
}

.cs-review-published-section {
	display: grid;
	gap: 1rem;
	min-width: 0;
	background:
		linear-gradient(135deg, rgba(255, 250, 242, 0.72), rgba(255, 255, 255, 0.96) 42%, rgba(242, 251, 255, 0.72)),
		#ffffff;
}

.cs-review-published-section .cs-review-heading h2 {
	margin-bottom: 0.35rem;
}

.cs-review-published-list {
	display: grid;
	gap: 0.75rem;
}

.cs-review-published-card {
	display: grid;
	gap: 0.85rem;
	min-width: 0;
	padding: clamp(1rem, 2vw, 1.25rem);
	border: 1px solid rgba(23, 43, 77, 0.1);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 12px 28px rgba(23, 43, 77, 0.06);
}

.cs-review-featured-card {
	position: relative;
	overflow: hidden;
	border-color: rgba(12, 124, 116, 0.18);
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 248, 0.96)),
		#ffffff;
}

.cs-review-featured-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: linear-gradient(90deg, #0d5c00, #8fbf2f, #ffb000);
}

.cs-review-card-header {
	display: flex;
	align-items: start;
	justify-content: space-between;
	gap: 1rem;
	min-width: 0;
}

.cs-review-card-kicker {
	display: inline-flex;
	margin-bottom: 0.35rem;
	color: #0c7c74;
	font-size: 0.76rem;
	font-weight: 900;
	text-transform: uppercase;
}

.cs-review-card-header h3 {
	margin: 0;
	color: #172b4d;
	font-size: clamp(1.05rem, 0.98rem + 0.32vw, 1.25rem);
	line-height: 1.25;
	letter-spacing: 0;
}

.cs-review-card-rating {
	display: grid;
	justify-items: end;
	gap: 0.18rem;
	flex: 0 0 auto;
	color: #082f2d;
	font-weight: 900;
	line-height: 1;
	white-space: nowrap;
}

.cs-review-card-stars {
	display: inline-flex;
	gap: 0.08rem;
	font-size: 1.05rem;
}

.cs-review-card-comment {
	position: relative;
	margin: 0;
	color: #24364b;
	font-size: 1rem;
	line-height: 1.72;
	overflow-wrap: anywhere;
}

.cs-review-featured-card .cs-review-card-comment {
	padding-left: 1rem;
	border-left: 3px solid rgba(143, 191, 47, 0.5);
	font-size: 1.03rem;
}

.cs-review-card-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	color: #5f6f86;
	font-size: 0.9rem;
	font-weight: 760;
}

.cs-review-card-footer span {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-height: 1.8rem;
	padding: 0.22rem 0.55rem;
	border-radius: 999px;
	background: #f2f4f8;
	overflow-wrap: anywhere;
}

.cs-review-card-footer span:first-child {
	background: #eef6f5;
	color: #0c7c74;
}

.cs-review-accordion {
	min-width: 0;
	border: 1px solid rgba(23, 43, 77, 0.1);
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 10px 24px rgba(23, 43, 77, 0.05);
}

.cs-review-accordion summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 3.25rem;
	padding: 0.85rem 1rem;
	color: #172b4d;
	font-weight: 860;
	cursor: pointer;
	list-style: none;
}

.cs-review-accordion summary::-webkit-details-marker {
	display: none;
}

.cs-review-accordion summary::after {
	content: "+";
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background: #eff8e8;
	color: #0d5c00;
	font-size: 1.35rem;
	font-weight: 780;
	line-height: 1;
}

.cs-review-accordion[open] summary::after {
	content: "−";
}

.cs-review-accordion summary strong {
	margin-left: auto;
	color: #5f6f86;
	font-size: 0.9rem;
	font-weight: 780;
	white-space: nowrap;
}

.cs-review-accordion .cs-review-published-list {
	padding: 0 1rem 1rem;
}

.cs-review-form {
	display: grid;
	gap: 0.9rem;
}

.cs-review-access-section {
	border-color: rgba(12, 124, 116, 0.14);
	background: linear-gradient(135deg, #ffffff, #f6fbf8);
}

.cs-review-access-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.75rem 1rem;
	align-items: center;
	padding: 1rem;
	border: 1px solid rgba(23, 43, 77, 0.12);
	border-radius: 8px;
	background: #ffffff;
}

.cs-review-access-badge {
	grid-column: 1 / -1;
	width: max-content;
	max-width: 100%;
	padding: 0.32rem 0.6rem;
	border-radius: 999px;
	background: #eef6f5;
	color: #0c7c74;
	font-size: 0.8rem;
	font-weight: 850;
	overflow-wrap: anywhere;
}

.cs-review-access-card h3 {
	margin: 0 0 0.28rem;
	color: #172b4d;
	font-size: 1.08rem;
	line-height: 1.25;
	letter-spacing: 0;
}

.cs-review-access-card p {
	margin: 0;
	color: #3d4e63;
	line-height: 1.55;
}

.cs-review-access-card a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.45rem;
	padding: 0.58rem 0.85rem;
	border-radius: 8px;
	background: #0c7c74;
	color: #ffffff;
	font-weight: 820;
	text-decoration: none;
	white-space: nowrap;
}

.cs-review-access-card a:focus-visible {
	outline: 3px solid rgba(12, 124, 116, 0.28);
	outline-offset: 2px;
}

.cs-review-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.8rem;
}

.cs-review-form label {
	display: grid;
	gap: 0.35rem;
	color: #3d4e63;
	font-size: 0.9rem;
	font-weight: 740;
}

.cs-review-form input,
.cs-review-form select,
.cs-review-form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(23, 43, 77, 0.18);
	border-radius: 8px;
	padding: 0.68rem 0.72rem;
	background: #ffffff;
	color: #172b4d;
	font: inherit;
}

.cs-review-form textarea {
	resize: vertical;
	min-height: 8.5rem;
	line-height: 1.5;
}

.cs-review-full,
.cs-review-consent {
	grid-column: 1 / -1;
}

.cs-review-consent {
	display: flex !important;
	grid-template-columns: none !important;
	align-items: center;
	gap: 0.55rem !important;
	font-weight: 650 !important;
}

.cs-review-consent input {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: #0c7c74;
}

.cs-review-form button {
	justify-self: start;
	min-height: 2.6rem;
	border: 0;
	border-radius: 8px;
	padding: 0.6rem 1rem;
	background: #0c7c74;
	color: #ffffff;
	font: inherit;
	font-weight: 780;
	cursor: pointer;
}

.cs-review-form button:disabled {
	cursor: wait;
	opacity: 0.68;
}

.cs-review-form.is-busy,
.cs-review-form[aria-busy="true"] {
	border-color: rgba(12, 124, 116, 0.34);
}

.cs-review-form[data-cognitishop-review-state="submitting"] {
	background: #f9fcfc;
}

.cs-review-form[data-cognitishop-review-state="received"] {
	border-color: rgba(12, 124, 116, 0.38);
}

.cs-review-form[data-cognitishop-review-state="error"] {
	border-color: rgba(180, 35, 24, 0.36);
}

.cs-review-result {
	margin: 0;
	color: #3d4e63;
	font-size: 0.94rem;
	line-height: 1.45;
}

.cs-review-result.is-error {
	color: #b42318;
}

.cs-review-result.is-success {
	color: #0c7c74;
}

.cs-review-hp {
	position: absolute;
	left: -10000px;
	width: 1px !important;
	height: 1px !important;
	opacity: 0;
}

@media (max-width: 760px) {
	.cs-product-rating-card {
		grid-template-columns: 1fr;
		gap: 0.45rem;
		padding: 0.9rem;
	}

	.cs-product-rating-card > span:last-child {
		grid-column: 1;
	}

	.cs-review-grid {
		grid-template-columns: 1fr;
	}

	.cs-review-card-header,
	.cs-review-accordion summary {
		align-items: stretch;
		flex-direction: column;
		gap: 0.65rem;
	}

	.cs-review-card-rating {
		justify-items: start;
	}

	.cs-review-card-stars {
		font-size: 1rem;
	}

	.cs-review-featured-card .cs-review-card-comment {
		padding-left: 0.8rem;
	}

	.cs-review-accordion .cs-review-published-list {
		padding: 0 0.75rem 0.75rem;
	}

	.cs-review-accordion summary strong {
		margin-left: 0;
		white-space: normal;
	}

	.cs-review-form button {
		justify-self: stretch;
	}

	.cs-review-access-card {
		grid-template-columns: 1fr;
	}

	.cs-review-access-card a {
		width: 100%;
		white-space: normal;
	}
}
