/* ==========================================================================
   C4Y Pricing Block – frontend + editor
   Colours resolve from the Blocksy palette (--theme-palette-color-*) with
   hard-coded fallbacks so the block still renders if the theme changes.
   ========================================================================== */

/* ---------- Grid ---------- */
.c4y-pricing-grid {
	display: grid;
	grid-template-columns: repeat(var(--c4y-pg-cols, 4), minmax(0, 1fr));
	gap: var(--c4y-pg-gap, 16px);
	align-items: stretch;
}

.c4y-pricing-grid > * {
	min-width: 0;
}

.c4y-pricing-grid > .c4y-pc,
.c4y-pricing-grid > .block-editor-block-list__block > .c4y-pc,
.c4y-pricing-grid > .block-editor-block-list__block {
	min-height: var(--c4y-pg-minh, 620px);
}

@media (max-width: 1080px) {
	.c4y-pricing-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.c4y-pricing-grid {
		grid-template-columns: 1fr;
	}

	.c4y-pricing-grid > .c4y-pc,
	.c4y-pricing-grid > .block-editor-block-list__block > .c4y-pc,
	.c4y-pricing-grid > .block-editor-block-list__block {
		min-height: 0;
	}
}

/* ---------- Card ---------- */
.c4y-pc {
	display: flex;
	height: 100%;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e6ebf1;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(25, 42, 61, .045);
}

.c4y-pc.is-featured {
	border: 1.5px solid var(--theme-palette-color-1, #00a1b9);
	box-shadow: 0 18px 50px rgba(25, 42, 61, .08);
}

/* ---------- Head ---------- */
.c4y-pc__head {
	padding: 26px 24px 24px;
	border-bottom: 1px solid var(--c4y-pc-head-border, #e6ebf1);
	background: var(--c4y-pc-head-bg, #f2f5f7);
}

.c4y-pc__label {
	display: flex;
	min-height: 24px;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.c4y-pc__name {
	margin: 0;
	color: var(--c4y-pc-head-fg, #192a3d);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .07em;
	line-height: 1.4;
	text-transform: uppercase;
}

.c4y-pc__badge {
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--c4y-pc-badge-bg, #dff5f6);
	color: var(--c4y-pc-badge-fg, #00a1b9);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .05em;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}

.c4y-pc__price {
	margin: 0;
	color: var(--c4y-pc-head-fg, #192a3d);
	font-size: 38px;
	font-weight: 800;
	line-height: 1;
}

.c4y-pc__period {
	display: block;
	margin-top: 9px;
	color: var(--c4y-pc-head-muted, #3A4F66);
	font-size: 13px;
	font-weight: 600;
}

.c4y-pc__note {
	margin: 12px 0 0;
	color: var(--c4y-pc-head-muted, #3A4F66);
	font-size: 12px;
}

/* ---------- Body ---------- */
.c4y-pc__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 24px;
}

.c4y-pc__capacity {
	margin: 0 0 22px;
	padding-bottom: 20px;
	border-bottom: 1px solid #e6ebf1;
}

.c4y-pc__capacity strong {
	display: block;
	color: var(--theme-palette-color-4, #192a3d);
	font-size: 17px;
	line-height: 1.4;
}

.c4y-pc__capacity span {
	display: block;
	color: var(--theme-palette-color-3, #3A4F66);
	font-size: 14px;
	line-height: 1.5;
}

/* Feature list – uses the site-wide check token (green circle, white tick). */
.c4y-pc__features {
	margin: 0 0 26px;
	padding: 0;
	list-style: none !important;
}

.c4y-pc__features li {
	position: relative;
	min-height: 24px;
	margin: 0 0 14px;
	padding: 2px 0 0 34px;
	color: var(--theme-palette-color-3, #3A4F66);
	font-size: 14px;
	line-height: 1.45;
	list-style: none !important;
}

/* Haken-Token kommt aus tokens.css (dort die einzige Definition) – die
   Fallbacks greifen nur, falls tokens.css mal nicht geladen ist. */
.c4y-pc__features li::before {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--c4y-check-size, 24px);
	height: var(--c4y-check-size, 24px);
	border-radius: 50%;
	background-color: var(--c4y-check-fill, #00b371);
	background-image: var(--c4y-check-icon, url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2213%22 height=%2213%22 viewBox=%220 0 24 24%22 fill=%22none%22%3E%3Cpath stroke=%22%23ffffff%22 stroke-width=%223%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 d=%22M20 6 9 17l-5-5%22/%3E%3C/svg%3E'));
	background-position: center;
	background-repeat: no-repeat;
	background-size: var(--c4y-check-glyph, 13px) !important;
	content: "";
}

/* CTA – reuses the theme button classes so height matches site-wide buttons. */
.c4y-pc__cta {
	margin-top: auto;
}

.c4y-pc__cta .wp-block-button {
	width: 100%;
}

.c4y-pc__cta .wp-block-button__link {
	width: 100%;
	font-weight: 700;
}

/* ---------- Editor tweaks ---------- */
.editor-styles-wrapper .c4y-pc__features li::before {
	background-size: 13px !important;
}

.c4y-pc__field-empty {
	opacity: .45;
}

.c4y-pc-editor-hint {
	margin: 0 0 6px;
	color: #757575;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.c4y-pc__feature-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}

.c4y-pc__feature-row .components-base-control {
	flex: 1 1 auto;
	margin-bottom: 0;
}

/* ==========================================================================
   FAQ – c4y/faq + c4y/faq-item
   Optik entspricht dem FAQ-Bereich der Preise-Seite.
   ========================================================================== */
.c4y-faq {
	max-width: var(--c4y-faq-max, 900px);
	margin-inline: auto;
}

.c4y-faq__item {
	margin: 0 0 var(--c4y-faq-gap, 12px);
	overflow: hidden;
	border: 1px solid #e6ebf1;
	border-radius: 15px;
	background: #fff;
	transition: box-shadow .2s ease;
}

.c4y-faq__item:last-child {
	margin-bottom: 0;
}

.c4y-faq__item:hover {
	box-shadow: 0 10px 30px rgba(20, 35, 55, .06);
}

.c4y-faq__q {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 22px 24px;
	color: var(--theme-palette-color-4, #192a3d);
	cursor: pointer;
	font-size: 16px;
	font-weight: 700;
	list-style: none;
}

.c4y-faq__q::-webkit-details-marker {
	display: none;
}

.c4y-faq__q::marker {
	content: "";
}

/* Chevron */
.c4y-faq__q::after {
	width: 10px;
	height: 10px;
	flex: 0 0 auto;
	border-right: 2px solid var(--theme-palette-color-1, #00a1b9);
	border-bottom: 2px solid var(--theme-palette-color-1, #00a1b9);
	margin-top: -4px;
	content: "";
	transform: rotate(45deg);
	transition: transform .2s ease;
}

.c4y-faq__item[open] .c4y-faq__q::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.c4y-faq__item[open] .c4y-faq__q {
	border-bottom: 1px solid #e6ebf1;
}

.c4y-faq__a {
	padding: 20px 24px 24px;
}

.c4y-faq__a p {
	margin: 0;
	color: var(--theme-palette-color-3, #3A4F66);
	font-size: 15px;
	line-height: 1.6;
}

.c4y-faq__a p + p {
	margin-top: 12px;
}

@media (max-width: 600px) {
	.c4y-faq__q {
		padding: 18px 20px;
		font-size: 15px;
	}

	.c4y-faq__a {
		padding: 16px 20px 20px;
	}
}

/* Editor: details immer aufgeklappt zeigen, damit die Antwort bearbeitbar ist */
.editor-styles-wrapper .c4y-faq__item > .c4y-faq__a {
	display: block !important;
}
