/* CashPort Standortanfragen – Formular (passt sich dem CashPort-Theme an, funktioniert aber auch eigenständig) */
.cps-wrap {
	--cps-navy: var(--wp--preset--color--navy, #0C2142);
	--cps-gold: var(--wp--preset--color--gold, #B98E3A);
	--cps-gold-light: var(--wp--preset--color--gold-light, #E7D3A6);
	--cps-line: var(--wp--preset--color--line, #DAD3C4);
	--cps-muted: var(--wp--preset--color--muted, #5B6578);
	--cps-bg: #fff;
	--cps-field: #FBFAF7;
	--cps-err: #B42318;
	--cps-ok: #15803D;
	font-size: 1rem;
}
.cps-form { background: var(--cps-bg); border: 1px solid var(--cps-line); border-radius: 22px; padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: 0 1px 2px rgba(12,33,66,.05), 0 24px 48px -28px rgba(12,33,66,.25); }
.cps-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.cps-form legend { font-family: var(--wp--preset--font-family--heading, inherit); font-size: 1.35rem; font-weight: 650; color: var(--cps-navy); margin-bottom: 1.25rem; padding: 0; }
.cps-intro { color: var(--cps-muted); margin: -.5rem 0 1rem; }

/* Fortschritt */
.cps-progress { list-style: none; display: flex; gap: .5rem; padding: 0; margin: 0 0 2rem; counter-reset: none; }
.cps-progress li { flex: 1; display: flex; align-items: center; gap: .55rem; font-size: .85rem; font-weight: 600; color: var(--cps-muted); padding-top: .8rem; border-top: 3px solid var(--cps-line); transition: border-color .3s, color .3s; }
.cps-progress li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--cps-line); color: var(--cps-navy); font-size: .8rem; flex: none; transition: background .3s, color .3s; }
.cps-progress li.is-active, .cps-progress li.is-done { color: var(--cps-navy); border-color: var(--cps-gold); }
.cps-progress li.is-active span { background: var(--cps-navy); color: #fff; }
.cps-progress li.is-done span { background: var(--cps-gold); color: #fff; }

/* Schritte (nur mit JS ausblenden) */
.cps-js-ready .cps-step { display: none; }
.cps-js-ready .cps-step.is-active { display: block; animation: cps-in .35s ease; }
@keyframes cps-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* Felder */
.cps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.cps-row--city { grid-template-columns: 9rem 1fr; }
.cps-row--street { grid-template-columns: 1fr; }
.cps-field { margin-bottom: 1.1rem; }
.cps-field > label, .cps-label { display: block; font-weight: 600; font-size: .9rem; color: var(--cps-navy); margin-bottom: .4rem; }
.cps-req { color: var(--cps-gold); }
.cps-opt { font-weight: 400; color: var(--cps-muted); font-size: .78rem; margin-left: .25rem; }
.cps-form input[type="text"], .cps-form input[type="email"], .cps-form input[type="tel"], .cps-form select, .cps-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; color: inherit; background: var(--cps-field);
	border: 1.5px solid var(--cps-line); border-radius: 12px; padding: .8rem .95rem; min-height: 50px;
	transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.cps-form select { background-image: linear-gradient(45deg, transparent 50%, var(--cps-navy) 50%), linear-gradient(135deg, var(--cps-navy) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.cps-form textarea { min-height: 120px; resize: vertical; }
.cps-form input:focus, .cps-form select:focus, .cps-form textarea:focus { outline: none; border-color: var(--cps-navy); background: #fff; box-shadow: 0 0 0 4px rgba(185,142,58,.18); }
.cps-field.has-error input, .cps-field.has-error select, .cps-field.has-error textarea { border-color: var(--cps-err); }
.cps-error { color: var(--cps-err); font-size: .82rem; margin: .35rem 0 0; min-height: 0; }
.cps-error:empty { display: none; }
.cps-hint { color: var(--cps-muted); font-size: .8rem; margin: .35rem 0 0; }

/* Auswahl-Chips */
.cps-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.cps-chip { position: relative; cursor: pointer; }
.cps-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.cps-chip span { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1rem; border: 1.5px solid var(--cps-line); border-radius: 999px; font-size: .88rem; font-weight: 550; background: var(--cps-field); transition: all .2s; user-select: none; }
.cps-chip input:checked + span { background: var(--cps-navy); border-color: var(--cps-navy); color: #fff; }
.cps-chip input:checked + span::before { content: "✓"; color: var(--cps-gold-light); font-weight: 700; }
.cps-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(185,142,58,.3); }

/* Standort per GPS */
.cps-geo { margin: -.25rem 0 1.25rem; }
.cps-geo-btn { text-align: left; line-height: 1.4; display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; padding: .3rem 0; font: inherit; font-size: .9rem; font-weight: 600; color: var(--cps-navy); cursor: pointer; text-decoration: underline; text-decoration-color: var(--cps-gold); text-underline-offset: 4px; }
.cps-geo-btn::before { flex: none; content: ""; width: 18px; height: 18px; background: var(--cps-gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Ccircle cx='12' cy='12' r='2' fill='black'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E") center/contain no-repeat; }
.cps-geo-status { font-size: .82rem; color: var(--cps-muted); margin: .25rem 0 0; }
.cps-geo-status.is-ok { color: var(--cps-ok); }

/* Upload */
.cps-drop { position: relative; border: 2px dashed var(--cps-line); border-radius: 18px; background: var(--cps-field); transition: border-color .2s, background .2s; }
.cps-drop.is-over { border-color: var(--cps-gold); background: #FBF5E8; }
.cps-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.cps-drop-label { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; padding: 2rem 1rem; color: var(--cps-navy); cursor: pointer; }
.cps-drop-label small { color: var(--cps-muted); font-size: .8rem; }
.cps-drop-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--cps-navy); margin-bottom: .5rem; position: relative; }
.cps-drop-icon::after { content: ""; position: absolute; inset: 13px; background: var(--cps-gold-light); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='15' rx='2'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='m21 17-5-5-8 8'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='15' rx='2'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='m21 17-5-5-8 8'/%3E%3C/svg%3E") center/contain no-repeat; }
.cps-thumbs { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; }
.cps-thumbs:empty { display: none; }
.cps-thumbs li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--cps-line); }
.cps-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cps-thumbs .cps-thumb-ph { display: grid; place-items: center; height: 100%; font-size: .7rem; font-weight: 700; color: var(--cps-navy); text-align: center; padding: .25rem; }
.cps-thumbs button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(8,24,48,.85); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.cps-thumbs .cps-size { position: absolute; left: 6px; bottom: 6px; background: rgba(255,255,255,.9); color: var(--cps-navy); font-size: .68rem; padding: .1rem .4rem; border-radius: 6px; font-weight: 600; }

/* Checkbox Datenschutz */
.cps-field > label.cps-check, .cps-check { display: flex; gap: .75rem; align-items: flex-start; font-size: .9rem; line-height: 1.5; cursor: pointer; }
.cps-check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--cps-navy); }
.cps-check a { color: var(--cps-navy); font-weight: 600; }

/* Navigation & Buttons */
.cps-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--cps-line); }
.cps-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 999px; padding: .95rem 1.7rem; min-height: 52px; font: inherit; font-family: var(--wp--preset--font-family--heading, inherit); font-weight: 650; font-size: .95rem; cursor: pointer; background: var(--cps-navy); color: #fff; transition: background .2s, transform .2s; }
.cps-btn:hover { background: var(--cps-gold); color: #081830; transform: translateY(-1px); }
.cps-btn--submit { background: var(--cps-gold); color: #081830; box-shadow: 0 10px 24px -12px rgba(185,142,58,.9); }
.cps-btn--submit:hover { background: var(--cps-navy); color: #fff; }
.cps-btn--ghost { background: transparent; color: var(--cps-navy); border: 1.5px solid var(--cps-line); }
.cps-btn--ghost:hover { background: var(--cps-field); color: var(--cps-navy); border-color: var(--cps-navy); }
.cps-btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.cps-free { margin: 1.25rem 0 0; font-size: .82rem; color: var(--cps-muted); text-align: center; }

.cps-upload-progress { margin-top: 1rem; font-size: .85rem; color: var(--cps-muted); }
.cps-upload-bar { height: 6px; background: var(--cps-line); border-radius: 99px; overflow: hidden; }
.cps-upload-bar span { display: block; height: 100%; width: 0; background: var(--cps-gold); transition: width .2s; }

.cps-alert { background: #FEF3F2; border: 1px solid #FECDCA; color: var(--cps-err); border-radius: 12px; padding: .9rem 1.1rem; margin: 1rem 0; font-size: .9rem; }
.cps-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Erfolg */
.cps-success { background: #fff; border: 1px solid var(--cps-line); border-radius: 22px; padding: clamp(2rem, 5vw, 3.5rem); text-align: center; box-shadow: 0 24px 48px -28px rgba(12,33,66,.25); animation: cps-in .4s ease; outline: none; }
.cps-success h3 { font-size: 1.5rem; color: var(--cps-navy); margin: 0 0 .75rem; }
.cps-success p { color: var(--cps-muted); margin: .4rem auto; max-width: 46ch; }
.cps-success-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--cps-navy); margin: 0 auto 1.5rem; position: relative; box-shadow: 0 0 0 10px rgba(185,142,58,.15); }
.cps-success-icon::after { content: ""; position: absolute; left: 25px; top: 18px; width: 18px; height: 32px; border: solid var(--cps-gold-light); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.cps-success .cps-nr { display: inline-block; margin: 1rem auto; background: #FBF5E8; border: 1px solid var(--cps-gold-light); border-radius: 12px; padding: .7rem 1.2rem; color: var(--cps-navy); }
.cps-success .cps-nr strong { font-family: var(--wp--preset--font-family--heading, inherit); letter-spacing: .04em; font-size: 1.1rem; }

@media (max-width: 640px) {
	.cps-row, .cps-row--city { grid-template-columns: 1fr; }
	.cps-progress li { font-size: 0; gap: 0; justify-content: center; }
	.cps-progress li span { font-size: .8rem; }
	.cps-progress li.is-active { font-size: .8rem; gap: .5rem; flex: 2; }
	.cps-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.cps-nav { flex-direction: column-reverse; align-items: stretch; }
	.cps-nav > span:empty { display: none; }
	.cps-btn { width: 100%; }
	.cps-form input, .cps-form select, .cps-form textarea { font-size: 16px; }
}

/* Karte im Formular */
.cps-geo-actions { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.cps-geo-btn--map::before { border: 0; box-shadow: none; border-radius: 0; background: var(--cps-gold); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.5s-7-6.1-7-11.5a7 7 0 0 1 14 0c0 5.4-7 11.5-7 11.5z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21.5s-7-6.1-7-11.5a7 7 0 0 1 14 0c0 5.4-7 11.5-7 11.5z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.cps-map-note { margin-top: .15rem; }
.cps-mapbox { margin-top: .75rem; }
.cps-map-canvas { height: 340px; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--cps-line); z-index: 0; }
.cps-pin { background: none; border: 0; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.cps-wrap .leaflet-container { font: inherit; font-size: .8rem; }
.cps-wrap .leaflet-container img { max-width: none !important; }
@media (max-width: 640px) { .cps-map-canvas { height: 300px; } }

/* Art der Fläche: Dropdown mobil, Auswahlknöpfe am Desktop */
.cps-only-mobile { display: none !important; }
@media (max-width: 640px) {
	.cps-only-mobile { display: block !important; }
	.cps-only-desktop { display: none !important; }
}

.cps-wrap [hidden] { display: none !important; }

.cps-undo { background: none; border: 0; padding: 0; font: inherit; color: var(--cps-navy); text-decoration: underline; cursor: pointer; font-weight: 600; }
