/*
 * Toomorrow Prisberegner: frontend
 * Farver følger sitets Elementor-globaler: #1C4B42 (accent 1), #B4E717/#B7E14A (accent 2), #F6F5F2 (accent 3).
 */

/* Basal styling */
.tmrw-pc { width: 100%; margin: 0 auto; background: #ffffff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); overflow: hidden; font-family: inherit; transition: max-width 0.3s ease; }
.tmrw-pc * { box-sizing: border-box; }
.tmrw-pc-head { background: #1c4b42; color: #fff; padding: 24px 28px; }
.tmrw-pc-head h3 { margin: 0 0 12px; font-size: 20px; }
.tmrw-pc-progress { background: rgba(255,255,255,0.2); border-radius: 999px; height: 6px; overflow: hidden; }
.tmrw-pc-progress-bar { background: #b7e14a; height: 100%; width: 20%; transition: width 0.3s ease; }
.tmrw-pc-progress-label { font-size: 12px; opacity: 0.85; margin-top: 8px; }
.tmrw-pc-body { padding: 28px; }
.tmrw-pc-step { display: none; }
.tmrw-pc-step.is-active { display: block; }
.tmrw-pc-question { font-size: 18px; font-weight: 600; color: #1c4b42; margin: 0 0 18px; }
.tmrw-pc-question--center { text-align: center; }

/* Standard Design: Horizontal (Bred & Lav - 2x2 Grid) */
.tmrw-pc.calc-layout-horizontal { max-width: 900px; }
.tmrw-pc.calc-layout-horizontal .tmrw-pc-options-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tmrw-pc.calc-layout-horizontal .tmrw-pc-option { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px solid #e5e7eb; border-radius: 10px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; margin-bottom: 0; }

/* Trin med 3 valg: én række med 33 % pr. kasse (tællerklassen sættes af frontend.js) */
.tmrw-pc.calc-layout-horizontal .tmrw-pc-options-container.tmrw-pc-options--3 { grid-template-columns: repeat(3, 1fr); }

/* Originalt Design: Vertical (Smal & Lodret) */
.tmrw-pc.calc-layout-vertical { max-width: 640px; }
.tmrw-pc.calc-layout-vertical .tmrw-pc-options-container { display: flex; flex-direction: column; gap: 10px; }
.tmrw-pc.calc-layout-vertical .tmrw-pc-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid #e5e7eb; border-radius: 10px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; margin-bottom: 0; }

.tmrw-pc-option:hover { border-color: #b7e14a; }
.tmrw-pc-option.is-selected { border-color: #1c4b42; background: #f4f9f3; }
.tmrw-pc-option input { accent-color: #1c4b42; width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.tmrw-pc-option-label { font-size: 15px; color: #1f2937; }

.tmrw-pc-nav { display: flex; justify-content: space-between; align-items: center; padding: 0 28px 28px; }
.tmrw-pc-btn { border: none; border-radius: 999px; padding: 12px 24px; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform 0.1s ease, opacity 0.15s ease; }
.tmrw-pc-btn:active { transform: scale(0.97); }
.tmrw-pc-btn-primary { background: #b7e14a; color: #1c4b42; }
.tmrw-pc-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.tmrw-pc-btn-secondary { background: transparent; color: #6b7280; }
.tmrw-pc-field { margin-bottom: 14px; }
.tmrw-pc-field label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.tmrw-pc-field input { width: 100%; padding: 12px 14px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 15px; }
.tmrw-pc-field input:focus { outline: none; border-color: #1c4b42; }
.tmrw-pc-result { text-align: center; padding: 12px 0; }
.tmrw-pc-result-amount { font-size: 32px; font-weight: 700; color: #1c4b42; margin: 8px 0; }
.tmrw-pc-result-note { font-size: 13px; color: #6b7280; max-width: 480px; margin: 0 auto; }

/* Prisen vises sløret indtil kontaktoplysningerne er sendt. Det rigtige tal er ikke i markuppet. */
.tmrw-pc-result-amount--masked { filter: blur(10px); user-select: none; pointer-events: none; }

/* Sidste trin: kontaktfelter */
.tmrw-pc-lead { max-width: 420px; margin: 20px auto 0; }
.tmrw-pc-lead-intro { font-size: 14px; line-height: 1.5; color: #1f2937; text-align: center; margin: 0 0 18px; }
.tmrw-pc-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 13px; line-height: 1.5; color: #1f2937; cursor: pointer; }
.tmrw-pc-consent input { accent-color: #1c4b42; width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; }
.tmrw-pc-consent a { color: #1c4b42; text-decoration: underline; }

.tmrw-pc-error { color: #dc2626; font-size: 13px; margin-top: 12px; display: none; text-align: center; }
.tmrw-pc-checkicon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #b7e14a; border-radius: 50%; margin-bottom: 12px; }

/* Mobil: alle valg stakkes til én kolonne, større touch-mål og tættere luft */
@media (max-width: 640px) {
	.tmrw-pc-head { padding: 20px; }
	.tmrw-pc-head h3 { font-size: 18px; }
	.tmrw-pc-body { padding: 20px; }
	.tmrw-pc-nav { padding: 0 20px 20px; gap: 12px; }
	.tmrw-pc-question { font-size: 17px; margin-bottom: 16px; }
	.tmrw-pc.calc-layout-horizontal .tmrw-pc-options-container,
	.tmrw-pc.calc-layout-horizontal .tmrw-pc-options-container.tmrw-pc-options--3 { grid-template-columns: 1fr; }
	.tmrw-pc-option { padding: 14px 16px; }
	.tmrw-pc-btn { padding: 13px 20px; min-height: 44px; }
	.tmrw-pc-btn-secondary { padding-left: 4px; padding-right: 4px; }
	.tmrw-pc-result-amount { font-size: 28px; }
	.tmrw-pc-lead { max-width: 100%; }
	/* 16px forhindrer, at iOS zoomer ind når feltet får fokus */
	.tmrw-pc-field input { font-size: 16px; }
	.tmrw-pc-consent { font-size: 14px; }
	.tmrw-pc-consent input { width: 20px; height: 20px; }
}

/* Meget smalle skærme: knapper må ikke løbe ud over kanten */
@media (max-width: 360px) {
	.tmrw-pc-btn { font-size: 14px; padding: 12px 16px; }
}
