/* Lipscore Instant Reviews – Min side */

/* Lipscore only fills the widget when it finds the invitation; hide the wrapper until then. */
.el-lipscore-review:has(.lipscore-instant-review:empty) {
	display: none;
}

/* Mine anmeldelser */

.el-reviews,
.el-order-review,
.el-order-review-intro {
	--el-navy: #232b55;
	--el-teal: #00a383;
	--el-green: #0f5c55;
	--el-muted: #6b7085;
	--el-border: #e3e5ec;
	--el-tint: #f2faf8;
	color: var(--el-navy);
}

.el-reviews__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5em;
	margin-bottom: 2em;
}

.el-reviews__intro {
	flex: 1 1 320px;
}

.el-reviews h1.el-reviews__title {
	margin: 0 0 12px;
	font-family: inherit;
	font-size: 44px;
	font-style: italic;
	font-weight: 800;
	line-height: 1.25;
	color: var(--el-navy);
	text-align: left;
}

.el-reviews p.el-reviews__lead {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--el-navy);
}

.el-reviews p.el-reviews__sublead {
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	color: #283346;
}

.el-reviews__note {
	display: flex;
	gap: 0.75em;
	flex: 0 1 400px;
	padding: 1.25em 1.5em;
	border-radius: 12px;
	background: var(--el-tint);
}

.el-reviews__note-icon {
	flex: 0 0 auto;
	color: var(--el-teal);
}

.el-reviews p.el-reviews__note-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--el-navy);
}

.el-reviews p.el-reviews__note-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--el-navy);
}

.el-reviews__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
	margin-bottom: 1em;
}

.el-reviews__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}

.el-reviews__tab {
	padding: 0.65em 1.1em;
	border: 1px solid transparent;
	border-radius: 10px;
	background: #f4f5f7;
	color: var(--el-navy);
	font-weight: 600;
	text-decoration: none;
}

.el-reviews__tab:hover,
.el-reviews__tab:focus-visible {
	border-color: var(--el-border);
	color: var(--el-navy);
}

.el-reviews__tab.is-active {
	border-color: var(--el-teal);
	background: var(--el-tint);
	color: var(--el-green);
}

.el-reviews__sort select {
	min-width: 165px;
	padding: 0.65em 0.9em;
	border: 1px solid var(--el-border);
	border-radius: 10px;
	background-color: #fff;
}

.el-reviews__list {
	display: grid;
	gap: 0.6em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.el-reviews__card {
	display: grid;
	grid-template-columns: 120px minmax(0, 1.6fr) minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px 24px;
	padding: 12px 24px 12px 16px;
	border: 1px solid var(--el-border);
	border-radius: 10px;
	background: #fff;
}

.el-reviews__image img {
	display: block;
	width: 120px;
	height: 80px;
	object-fit: contain;
}

/* Theme globals (p line-height/size, h3 size, ul li margin) are reset inside the cards. */
.el-reviews .el-reviews__list > li {
	margin: 0;
}

.el-reviews .el-reviews__list > li::marker {
	content: none;
}

.el-reviews .el-reviews__card p {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.el-reviews .el-reviews__card h3.el-reviews__product {
	margin: 0 0 6px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--el-navy);
}

.el-reviews .el-reviews__card .el-reviews__product a,
.el-reviews .el-reviews__card .el-reviews__meta a {
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
}

/* The theme draws a 1px green underline on class-less links via ::after. */
.el-reviews .el-reviews__card .el-reviews__product a::after,
.el-reviews .el-reviews__card .el-reviews__meta a::after {
	content: none;
}

.el-reviews .el-reviews__card .el-reviews__product a:hover,
.el-reviews .el-reviews__card .el-reviews__meta a:hover {
	color: inherit;
	text-decoration: underline;
}

.el-reviews .el-reviews__card p.el-reviews__meta {
	font-size: 14px;
	font-weight: 400;
	color: var(--el-navy);
}

.el-reviews .el-reviews__card p.el-reviews__meta--small {
	margin-top: 2px;
	font-size: 13px;
	color: var(--el-muted);
}

.el-reviews__stars {
	display: inline-flex;
	gap: 0.1em;
	font-size: 1.4rem;
	line-height: 1;
}

.el-reviews__star {
	color: #d4d6dd;
}

.el-reviews__star.is-filled {
	color: var(--el-green);
}

.el-reviews .el-reviews__card p.el-reviews__text {
	margin: 8px 0 6px;
	font-size: 13px;
	font-style: italic;
}

.el-reviews .el-reviews__link,
.woocommerce-MyAccount-content .el-order-review .el-reviews__link {
	color: var(--el-green);
	text-decoration: underline;
	font-size: 0.875rem;
	font-weight: 600;
}

.el-reviews__link::after {
	content: " →";
}

.el-reviews__status {
	justify-self: end;
}

.el-reviews .el-reviews__status button.button.el-reviews__cta,
.woocommerce-MyAccount-content .el-order-review button.button.el-reviews__cta {
	margin: 0;
	padding: 13px 28px;
	border: 0;
	border-radius: 8px;
	background: var(--el-green);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
}

.el-reviews .el-reviews__status button.button.el-reviews__cta:hover,
.el-reviews .el-reviews__status button.button.el-reviews__cta:focus-visible,
.woocommerce-MyAccount-content .el-order-review button.button.el-reviews__cta:hover,
.woocommerce-MyAccount-content .el-order-review button.button.el-reviews__cta:focus-visible {
	background: #0a4540;
	color: #fff;
}

/* The card's own "Vurder produkt" button points to the stars. Lipscore's link opens a modal whose rating Lipscore rejects (no customer order token), so it stays hidden. */
.el-reviews .lipscore-instant-review-button-link,
.el-order-review .lipscore-instant-review-button-link {
	display: none !important;
}

/* "Endre vurdering" on reviewed lines: a link-styled button. */
.el-reviews .el-reviews__status button.el-reviews__edit,
.woocommerce-MyAccount-content .el-order-review button.el-reviews__edit {
	display: block;
	margin: 8px 0 0 auto;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	cursor: pointer;
}

.woocommerce-MyAccount-content .el-order-review button.el-reviews__edit {
	margin: 6px 0 0;
}

/* No Lipscore invitation for this line: nothing to open. */
.el-reviews__card:has(.lipscore-instant-review:empty) [data-el-review-open],
.el-order-review:has(.lipscore-instant-review:empty) [data-el-review-open] {
	display: none;
}

.el-reviews__card--reviewed .el-reviews__status {
	display: grid;
	gap: 0.3em;
	padding: 0.9em 1.25em;
	border-radius: 10px;
	background: var(--el-tint);
}

.el-reviews__badge {
	font-weight: 700;
}

.el-reviews__badge::before {
	content: "✓";
	display: inline-grid;
	place-items: center;
	width: 1.2em;
	height: 1.2em;
	margin-right: 0.45em;
	border-radius: 50%;
	background: var(--el-green);
	color: #fff;
	font-size: 0.85em;
}

.el-reviews__status-date {
	font-size: 0.875rem;
}

.el-reviews__section {
	margin-top: 2em;
}

.el-reviews__section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	margin-bottom: 0.6em;
	padding: 0.75em 1em;
	border-radius: 8px;
	background: #f4f5f7;
}

.el-reviews__section-head h2 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.el-reviews__empty {
	margin: 1em 0;
	color: var(--el-muted);
}

@media (max-width: 900px) {
	.el-reviews__card {
		grid-template-columns: 80px minmax(0, 1fr);
		padding: 1em;
	}

	.el-reviews__image img {
		width: 80px;
		height: 80px;
	}

	.el-reviews__review,
	.el-reviews__status {
		grid-column: 2;
		justify-self: start;
	}
}

@media (max-width: 480px) {
	.el-reviews__card {
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 0.75em;
	}

	.el-reviews__image img {
		width: 56px;
		height: 56px;
	}

	.el-reviews__tabs,
	.el-reviews__sort,
	.el-reviews__sort select {
		width: 100%;
	}

	.el-reviews__tab {
		flex: 1 1 auto;
		text-align: center;
	}
}

/* Min side → Vis ordre: review column and "Del din erfaring" (layout lives in the theme). */

.el-order-review-intro {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border-radius: 10px;
	background: #f2faf8;
	color: #232b55;
}

.el-order-review-intro__icon {
	flex: 0 0 auto;
	color: #00a383;
}

.woocommerce-MyAccount-content .el-order-review-intro p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.woocommerce-MyAccount-content .el-order-review-intro .el-order-review-intro__link {
	display: inline-block;
	margin-top: 6px;
	font-size: 13px;
}

.woocommerce-MyAccount-content .el-order-review-intro p.el-order-review-intro__title {
	font-size: 15px;
	font-weight: 700;
}

.el-order-review {
	display: grid;
	justify-items: center;
	gap: 10px;
	color: #232b55;
}

.el-order-review .el-lipscore-review {
	margin: 0;
}

.woocommerce-MyAccount-content .el-order-review button.button.el-reviews__cta {
	min-width: 165px;
	padding: 10px 24px;
}

.el-order-review__badge {
	display: grid;
	gap: 4px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #f2faf8;
}

.el-order-review__date {
	font-size: 14px;
}

.woocommerce-MyAccount-content .el-order-review .el-order-review__help {
	color: #0a7e68;
	font-size: 13px;
	font-weight: 400;
	white-space: nowrap;
	text-decoration: none;
}
