/* ==========================================================================
   Download / Pricing Page — Combined Styles
   Replaces: pricing.css + inline <style> from download.php
   ========================================================================== */

/* Hide submenu on pricing pages */
.secondaryheader, section.submenu { display: none !important; }

#price, #features { scroll-margin-top: 24px; }

/* --- Hero --- */
.dl-hero { text-align: center; padding: var(--pw-section-hero); }
.dl-hero__title {
	font-size: clamp(28px, 4vw, 40px); font-weight: 700;
	color: var(--pw-text); letter-spacing: -0.03em; margin: 0 0 12px;
}
.dl-hero__sub { font-size: 18px; color: var(--pw-text-secondary); margin: 0 0 var(--pw-space-md); }
.dl-hero__trust { font-size: 13px; font-weight: 600; color: var(--pw-text-muted); margin: 0; }

/* Pricing-Card Target — Targeting-Frage direkt in der Kachel. */
.pricing-card__target {
	font-size: 14px;
	color: var(--pw-text-secondary);
	font-style: italic;
	line-height: 1.4;
	margin: 0 0 10px;
}

/* --- Currency Switcher --- */
.pricing-currencies { display: flex; justify-content: center; gap: 6px; padding-top: var(--pw-space-xl); margin: 0 0 var(--pw-space-xl); }
.pricing-currency {
	display: inline-block; padding: 6px var(--pw-space-md); border-radius: 20px;
	font-size: 13px; font-weight: 600; color: var(--pw-text-secondary);
	border: 1px solid var(--pw-border); transition: all 0.15s;
}
.pricing-currency:hover { color: var(--pw-text); border-color: var(--pw-text); }
.pricing-currency--active { background: var(--pw-text); color: var(--pw-bg); border-color: var(--pw-text); }
.pricing-currency--active:hover { background: #333; color: #fff; border-color: #333; }

/* --- Billing Toggle --- */
.pricing-toggle { display: flex; flex-direction: column; align-items: center; gap: var(--pw-space-sm); margin: 0 0 40px; }
.pricing-toggle__row { display: flex; align-items: center; gap: 12px; }
.pricing-toggle__save-row { height: 24px; }
.pricing-toggle__save {
	visibility: hidden; opacity: 0;
	transition: opacity 0.2s, visibility 0.2s;
	background: #34c759; color: #fff;
	font-size: 12px; font-weight: 600; padding: var(--pw-space-xs) 10px; border-radius: 12px; white-space: nowrap;
}
.pricing-toggle--annual .pricing-toggle__save { visibility: visible; opacity: 1; }
.pricing-toggle__label {
	font-size: 15px; font-weight: 600; color: #aaa;
	cursor: pointer; transition: color 0.2s; user-select: none;
}
.pricing-toggle__label.active { color: var(--pw-text); }
.pricing-toggle__switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.pricing-toggle__switch input { opacity: 0; width: 0; height: 0; }
.pricing-toggle__slider {
	position: absolute; cursor: pointer; inset: 0;
	background: #ddd; border-radius: 28px; transition: background-color 0.3s;
}
.pricing-toggle__slider::before {
	content: ""; position: absolute; height: 22px; width: 22px;
	left: 3px; bottom: 3px; background: white; border-radius: 50%;
	transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.pricing-toggle__switch input:checked + .pricing-toggle__slider { background: var(--pw-link); }
.pricing-toggle__switch input:checked + .pricing-toggle__slider::before { transform: translateX(22px); }

/* --- Pricing Cards --- */
.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pw-space-lg); margin: 0 0 var(--pw-space-xl); align-items: stretch; }
.pricing-card {
	background: var(--pw-bg); border: 1px solid var(--pw-border); border-radius: var(--pw-radius-lg);
	padding: 36px 28px var(--pw-space-xl); text-align: center; position: relative;
	transition: transform 0.25s, box-shadow 0.25s; display: flex; flex-direction: column; cursor: pointer;
}
.pricing-card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.pricing-card--popular { border-color: var(--pw-link); border-width: 2px; box-shadow: 0 2px 16px rgba(49,141,211,0.1); }
.pricing-card--popular:hover { box-shadow: 0 16px 48px rgba(49,141,211,0.16); }
.pricing-card__badge {
	position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
	background: var(--pw-link); color: #fff; padding: 5px 18px; border-radius: 20px;
	font-size: 11px; font-weight: 700; white-space: nowrap; letter-spacing: 0.04em; text-transform: uppercase;
}
.pricing-card__icon { margin-bottom: var(--pw-space-md); display: flex; justify-content: center; }
.pricing-card__icon img { width: 72px; height: 72px; object-fit: contain; }
#content .pricing-card__name { font-size: 20px; font-weight: 700; color: var(--pw-text); margin: 0 0 var(--pw-space-sm); }
#content .pricing-card__desc { font-size: 14px; line-height: 1.5; color: var(--pw-text-muted); margin: 0 0 var(--pw-space-lg); flex-grow: 1; }
.pricing-card__prices { margin-bottom: var(--pw-space-lg); min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pricing-card__price { display: flex; align-items: baseline; justify-content: center; gap: var(--pw-space-xs); }
#content .pricing-card__amount { font-size: 36px; font-weight: 700; color: var(--pw-text); letter-spacing: -0.03em; line-height: 1; }
#content .pricing-card__period { font-size: 14px; color: var(--pw-text-muted); }
.pricing-card__cta { margin-top: auto; }
.pricing-card__cta .btn { display: block; width: 100%; text-align: center; font-size: 15px; font-weight: 600; padding: 12px 20px; border-radius: var(--pw-radius-md); }
.pricing-card__appstore { display: inline-block; line-height: 0; transition: transform 0.15s, opacity 0.15s; }
.pricing-card__appstore:hover { transform: translateY(-1px); opacity: 0.9; }
.pricing-card__appstore img.appstore-badge { height: 44px; width: auto; display: block; }

/* --- Payment Channels --- */
.dl-channels {
	padding: 56px 0; border-top: 1px solid var(--pw-border);
	border-bottom: 1px solid var(--pw-border); margin: var(--pw-space-2xl) 0;
}
.dl-channels__title { font-size: 24px; font-weight: 700; color: var(--pw-text); text-align: center; margin: 0 0 var(--pw-space-xl); }
.dl-channels__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--pw-space-lg); }
.dl-channels__item { text-align: center; padding: var(--pw-space-lg); }
.dl-channels__item h3 { font-size: 17px; font-weight: 700; color: var(--pw-text); margin: 0 0 var(--pw-space-sm); }
.dl-channels__item p { font-size: 15px; color: var(--pw-text-secondary); margin: 0; line-height: 1.5; }

/* --- Feature Comparison --- */
.download-features { margin: var(--pw-space-2xl) 0 40px; padding-top: var(--pw-space-2xl); }
#content .download-features__title { font-size: 28px; font-weight: 700; color: var(--pw-text); text-align: center; margin: 0 0 var(--pw-space-xl); letter-spacing: -0.02em; }
#content .comparison { border-collapse: separate; border-spacing: 0; }
#content .comparison thead th { position: sticky; top: 60px; background: var(--pw-bg); z-index: 5; }
.download-features .comparison { overflow: visible; border: 1px solid var(--pw-border); width: 100%; }

/* Fixed layout + feste Spaltenbreiten — verhindert, dass sich beim
   Auf-/Zuklappen der Detail-Matrix die Spalten neu verteilen. */
.dl-features { table-layout: fixed; max-width: 1000px; margin-left: auto; margin-right: auto; }
.dl-features th:first-child { width: 34%; }
.dl-features th:not(:first-child) { width: 22%; }
.download-features .comparison th { background: var(--pw-bg-alt); }
.download-features .comparison .grouptitle { background: #f0f0f2; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--pw-text); }

/* Summary-Zeilen: Funktionsnamen fett hervorgehoben */
.dl-features__summary td:first-child { font-weight: 600; color: var(--pw-text); }

/* Toggle-Divider: dicker Strich zwischen Summary und Detail-Matrix */
.dl-features__divider td {
	padding: 0;
	background: var(--pw-bg-alt);
	border-top: 2px solid var(--pw-border);
	border-bottom: 2px solid var(--pw-border);
}
.dl-features__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 18px;
	background: transparent;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--pw-brand);
	transition: color 0.15s;
}
.dl-features__toggle:hover { color: var(--pw-brand-hover); }
.dl-features__toggle-chevron { width: 14px; height: 14px; transition: transform 0.2s; }
.dl-features__toggle.is-open .dl-features__toggle-chevron { transform: rotate(180deg); }

/* --- Team / Enterprise --- */
.dl-team { text-align: center; padding: 56px var(--pw-space-xl); background: var(--pw-bg-alt); border-radius: var(--pw-radius-lg); margin-bottom: var(--pw-space-2xl); }
.dl-team__title { font-size: 28px; font-weight: 700; color: var(--pw-text); margin: 0 0 var(--pw-space-md); letter-spacing: -0.01em; }
.dl-team__sub { font-size: 16px; color: var(--pw-text-secondary); max-width: 620px; margin: 0 auto 28px; line-height: 1.6; }
.dl-team__sub a { color: var(--pw-brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dl-team__sub a:hover { color: var(--pw-brand-hover); }

.dl-team__pills {
	list-style: none; margin: 0 auto 40px; padding: 0;
	display: flex; flex-wrap: wrap; gap: var(--pw-space-sm); justify-content: center;
	max-width: 680px;
}
.dl-team__pills li { margin: 0; }
.dl-team__pill {
	display: inline-block;
	padding: 6px 14px;
	font-size: 13px; font-weight: 500;
	color: var(--pw-text-secondary);
	background: var(--pw-bg);
	border: 1px solid var(--pw-border);
	border-radius: 20px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dl-team__pill:hover {
	background: rgba(var(--pw-brand-rgb),0.08);
	border-color: rgba(var(--pw-brand-rgb),0.3);
	color: var(--pw-brand);
}

.dl-team__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Pricing FAQ --- */
.dl-faq { max-width: 760px; margin: 0 auto var(--pw-space-2xl); }
.dl-faq__title { font-size: 24px; font-weight: 700; color: var(--pw-text); text-align: center; margin: 0 0 var(--pw-space-xl); }
.dl-faq__item { border-bottom: 1px solid var(--pw-border); }
.dl-faq__item summary {
	padding: 20px 0; font-size: 17px; font-weight: 600; color: var(--pw-text);
	cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.dl-faq__item summary::-webkit-details-marker { display: none; }
.dl-faq__item summary::after { content: "+"; font-size: 22px; color: var(--pw-text-muted); transition: transform 0.2s; }
.dl-faq__item[open] summary::after { content: "−"; }
.dl-faq__item p { font-size: 16px; line-height: 1.6; color: var(--pw-text-secondary); margin: 0 0 20px; padding-right: var(--pw-space-xl); }

/* --- Disclaimer --- */
.pricing-disclaimer { text-align: center; border-top: 1px solid var(--pw-border); padding-top: var(--pw-space-xl); }
#content .pricing-disclaimer p { font-size: 13px; line-height: 1.7; color: var(--pw-text-muted); margin: 0 0 12px; }
#content .pricing-disclaimer a { color: var(--pw-link); }

/* --- Compare link --- */
.pricing-compare { text-align: center; margin-bottom: var(--pw-space-2xl); }
#content .pricing-compare a { font-size: 15px; font-weight: 600; color: var(--pw-link); }
#content .pricing-compare a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 900px) { .pricing-cards { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (max-width: 768px) {
	.dl-channels__grid { grid-template-columns: 1fr; gap: var(--pw-space-md); }
	.dl-team { padding: 40px 20px; }
}
@media (max-width: 600px) {
	.pricing-currencies { flex-wrap: wrap; }
	.pricing-cards { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}

/* Dark mode overrides for pricing toggle */
@media (prefers-color-scheme: dark) {
	.pricing-toggle__slider { background: #3a3a3c; }
	.download-features .comparison .grouptitle { background: #2c2c2e; }
}
