/* ==========================================================================
   Affiliated – Blok-styles (frontend)
   ========================================================================== */

/* ── Fordele & Ulemper ───────────────────────────────────────────────────── */
.aff-pros-cons {
	display: grid;
	gap: 16px;
	margin-block: 1.75rem;
}

.aff-pros-cons--columns { grid-template-columns: 1fr 1fr; }
.aff-pros-cons--stacked { grid-template-columns: 1fr; }

@media (max-width: 600px) {
	.aff-pros-cons--columns { grid-template-columns: 1fr; }
}

.aff-pros-cons__col {
	padding: 20px;
	border-radius: var(--aff-radius-lg);
}

.aff-pros-cons__col--pros { background: #f0fdf4; border: 1px solid #86efac; }
.aff-pros-cons__col--cons { background: #fff7f7; border: 1px solid #fca5a5; }

.aff-pros-cons__title {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: .9375rem;
	font-weight: 700;
	margin: 0 0 12px;
}

.aff-pros-cons__title--pros { color: #15803d; }
.aff-pros-cons__title--cons { color: #b91c1c; }

.aff-pros-cons__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aff-pros-cons__item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: .9375rem;
	line-height: 1.5;
	padding: 5px 0;
	border-bottom: 1px solid rgba(0,0,0,.06);
}

.aff-pros-cons__item:last-child { border-bottom: 0; }

.aff-pros-cons__col--pros .aff-pros-cons__item::before {
	content: "✓";
	color: #16a34a;
	font-weight: 700;
	flex-shrink: 0;
	margin-top: 1px;
}

.aff-pros-cons__col--cons .aff-pros-cons__item::before {
	content: "✕";
	color: #dc2626;
	font-weight: 700;
	flex-shrink: 0;
	margin-top: 1px;
}

/* ── Bedømmelse ──────────────────────────────────────────────────────────── */
.aff-rating-box {
	background: var(--aff-bg-subtle);
	border: 1px solid var(--aff-border);
	border-radius: var(--aff-radius-lg);
	padding: 24px;
	text-align: center;
	margin-block: 1.75rem;
}

.aff-rating-box__badge { margin-bottom: 12px; }

.aff-rating-box__product {
	font-size: .9375rem;
	font-weight: 600;
	color: var(--aff-text-light);
	margin: 0 0 6px;
}

.aff-rating-box__label {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-weight: 600;
	color: var(--aff-text-light);
	margin: 0 0 12px;
}

.aff-rating-box__score-wrap {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 3px;
	margin-bottom: 12px;
}

.aff-rating-box__score {
	font-size: 3rem;
	font-weight: 900;
	line-height: 1;
}

.aff-rating-box__max {
	font-size: 1.25rem;
	color: var(--aff-text-light);
}

.aff-rating-box__bar {
	height: 10px;
	background: var(--aff-border);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 14px;
}

.aff-rating-box__fill {
	height: 100%;
	border-radius: 999px;
	transition: width .8s cubic-bezier(.4,0,.2,1);
}

.aff-rating-box__verdict {
	font-size: .9375rem;
	color: var(--aff-text-light);
	font-style: italic;
	margin: 0;
}

/* ── Produktfakta ────────────────────────────────────────────────────────── */
.aff-fact-box {
	background: var(--aff-bg-subtle);
	border: 1px solid var(--aff-border);
	border-radius: var(--aff-radius-lg);
	overflow: hidden;
	margin-block: 1.75rem;
}

.aff-fact-box__title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 1rem;
	font-weight: 700;
	padding: 16px 20px;
	margin: 0;
	background: var(--aff-border);
	color: var(--aff-text);
}

.aff-fact-box__table { margin: 0; }

.aff-fact-box__row {
	display: grid;
	grid-template-columns: 40% 1fr;
	border-bottom: 1px solid var(--aff-border);
}

.aff-fact-box__row:last-child { border-bottom: 0; }

.aff-fact-box__key,
.aff-fact-box__val {
	padding: 10px 20px;
	font-size: .9375rem;
	margin: 0;
	line-height: 1.5;
}

.aff-fact-box__key {
	font-weight: 600;
	color: var(--aff-text-light);
	background: rgba(0,0,0,.02);
	border-right: 1px solid var(--aff-border);
}

.aff-fact-box__val { color: var(--aff-text); }

.aff-fact-box__row:nth-child(even) .aff-fact-box__val { background: rgba(0,0,0,.015); }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.aff-faq {
	margin-block: 2rem;
}

.aff-faq__title {
	font-size: 1.375rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

.aff-faq__list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.aff-faq__item {
	border: 1px solid var(--aff-border);
	border-radius: var(--aff-radius);
	overflow: hidden;
}

.aff-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 16px 20px;
	background: var(--aff-bg-subtle);
	border: 0;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	text-align: left;
	color: var(--aff-text);
	transition: background var(--aff-transition);
}

.aff-faq__q:hover { background: var(--aff-border); }

.aff-faq__chevron {
	flex-shrink: 0;
	transition: transform var(--aff-transition);
	color: var(--aff-text-light);
}

.aff-faq__item.is-open .aff-faq__chevron { transform: rotate(180deg); }

.aff-faq__a {
	padding: 0 20px;
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease, padding .3s ease;
	font-size: .9375rem;
	line-height: 1.7;
	color: var(--aff-text-light);
}

.aff-faq__item.is-open .aff-faq__a {
	max-height: 600px;
	padding: 16px 20px;
}

/* ── Produktkort ─────────────────────────────────────────────────────────── */
.aff-product-card {
	background: var(--aff-card-bg);
	border: 1px solid var(--aff-border);
	border-radius: var(--aff-radius-lg);
	overflow: hidden;
	box-shadow: var(--aff-shadow-sm);
	transition: box-shadow var(--aff-transition), transform var(--aff-transition);
	position: relative;
	margin-block: 1.75rem;
}

.aff-product-card:hover {
	box-shadow: var(--aff-shadow);
	transform: translateY(-2px);
}

.aff-product-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
}

/* Horisontal layout */
.aff-product-card--horizontal {
	display: flex;
	align-items: stretch;
}

.aff-product-card--horizontal .aff-product-card__media {
	flex-shrink: 0;
	width: 200px;
}

@media (max-width: 600px) {
	.aff-product-card--horizontal { flex-direction: column; }
	.aff-product-card--horizontal .aff-product-card__media { width: 100%; }
}

/* Vertikal layout */
.aff-product-card--vertical {
	display: flex;
	flex-direction: column;
}

.aff-product-card__media {
	background: var(--aff-bg-subtle);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.aff-product-card__img {
	width: 100%;
	height: 160px;
	object-fit: contain;
	display: block;
}

.aff-product-card--horizontal .aff-product-card__img { height: 140px; }

.aff-product-card__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.aff-product-card__title {
	font-size: 1.0625rem;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}

.aff-product-card__title a { color: inherit; text-decoration: none; }
.aff-product-card__title a:hover { color: var(--aff-primary); }

.aff-product-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
}

.aff-product-card__score {
	font-size: .8125rem;
	font-weight: 700;
}

.aff-product-card__proscons {
	flex: 1;
	margin-bottom: 14px;
}

.aff-product-card__pros,
.aff-product-card__cons {
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
}

.aff-product-card__pros li,
.aff-product-card__cons li {
	font-size: .875rem;
	line-height: 1.5;
	padding: 3px 0;
}

.aff-product-card__pros li::before { content: "✓ "; color: #16a34a; font-weight: 700; }
.aff-product-card__cons li::before { content: "✕ "; color: #dc2626; font-weight: 700; }

.aff-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--aff-border);
}

.aff-product-card__price {
	display: flex;
	align-items: baseline;
	gap: 6px;
}

.aff-product-card__orig {
	font-size: .875rem;
	color: var(--aff-text-light);
}

.aff-product-card__current {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--aff-text);
}

/* ── Editor: List helper ─────────────────────────────────────────────────── */
.aff-editor-list__row {
	display: flex;
	gap: 6px;
	align-items: flex-start;
	margin-bottom: 4px;
}

.aff-editor-list__row .components-base-control { flex: 1; margin-bottom: 0; }
