/* Concrete Slab Planner – components (works with any theme; tuned for the CSP theme) */
:root {
	--csp-ink: #1f2328;
	--csp-muted: #5b636b;
	--csp-line: #d9dde1;
	--csp-bg: #f4f5f6;
	--csp-card: #ffffff;
	--csp-accent: #f26b1d;
	--csp-accent-ink: #ffffff;
	--csp-accent-dark: #c9530f;
	--csp-ok: #1a7f37;
	--csp-warn-bg: #fff6e5;
	--csp-radius: 12px;
}

.csp-calc-wrap { background: var(--csp-card); border: 1px solid var(--csp-line); border-radius: var(--csp-radius); padding: 20px; margin: 24px 0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.csp-calc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.csp-calc-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--csp-accent); color: var(--csp-accent-ink); border-radius: 8px; font-size: 18px; flex: none; }
.csp-calc-title { margin: 0 !important; font-size: 1.25rem; }
.csp-loading { color: var(--csp-muted); }

.csp-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 14px; margin-bottom: 18px; }
.csp-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--csp-ink); }
.csp-field-wide { grid-column: span 2; }
.csp-unit { font-weight: 400; color: var(--csp-muted); }
.csp-field input, .csp-field select,
.csp-form-grid input, .csp-form-grid select, .csp-form-grid textarea, .csp-signup-row input {
	width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px; border: 1px solid var(--csp-line); border-radius: 8px; background: #fff; color: var(--csp-ink);
}
.csp-field input:focus, .csp-field select:focus, .csp-form-grid :focus, .csp-signup-row input:focus { outline: 2px solid var(--csp-accent); outline-offset: 1px; border-color: var(--csp-accent); }

.csp-result { border-top: 1px dashed var(--csp-line); padding-top: 16px; }
.csp-primary { display: flex; flex-direction: column; gap: 2px; background: var(--csp-bg); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.csp-primary-label { font-size: .85rem; color: var(--csp-muted); }
.csp-primary strong { font-size: 2rem; line-height: 1.15; color: var(--csp-ink); }
.csp-best { border-left: 4px solid var(--csp-ok); background: #eef8f0; padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; font-size: .95rem; }
.csp-warn { background: var(--csp-warn-bg); border-left: 4px solid #e0a100; padding: 8px 12px; border-radius: 6px; margin-bottom: 8px; font-size: .92rem; }

.csp-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: .95rem; }
.csp-table th, .csp-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--csp-line); vertical-align: top; }
.csp-table tbody th { font-weight: 500; color: var(--csp-muted); }
.csp-table td { font-weight: 600; }
.csp-table-plain td { font-weight: 400; }
.csp-table thead th { background: var(--csp-bg); font-size: .85rem; text-transform: uppercase; letter-spacing: .02em; color: var(--csp-muted); }
.csp-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.csp-shop { background: #fffaf5; border: 1px solid #f6d7c3; border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
.csp-shop h4 { margin: 0 0 6px; font-size: 1rem; }
.csp-shop ul { margin: 0; padding-left: 1.2em; }
.csp-shop li { margin: 3px 0; }
.csp-note { font-size: .82rem; color: var(--csp-muted); margin: 6px 0 10px; }

.csp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.csp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--csp-line); background: #fff; color: var(--csp-ink); font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none !important; line-height: 1.2; }
.csp-btn:hover { border-color: var(--csp-ink); }
.csp-btn-accent { background: var(--csp-accent); border-color: var(--csp-accent); color: var(--csp-accent-ink) !important; }
.csp-btn-accent:hover { background: var(--csp-accent-dark); border-color: var(--csp-accent-dark); }
.csp-btn[disabled] { opacity: .6; cursor: wait; }

.csp-answer { font-size: 1.1rem; background: var(--csp-bg); border-left: 4px solid var(--csp-accent); padding: 14px 16px; border-radius: 6px; }

.csp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.csp-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--csp-card); border: 1px solid var(--csp-line); border-radius: var(--csp-radius); text-decoration: none !important; color: var(--csp-ink) !important; transition: border-color .15s, transform .15s; }
.csp-card:hover { border-color: var(--csp-accent); transform: translateY(-2px); }
.csp-card strong { font-size: 1rem; }
.csp-card span { font-size: .88rem; color: var(--csp-muted); }
.csp-card-icon { font-size: 22px; color: var(--csp-accent) !important; }

.csp-links { columns: 2 220px; padding-left: 1.1em; }
.csp-links li { margin: 4px 0; break-inside: avoid; }
.csp-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.csp-faq details { border: 1px solid var(--csp-line); border-radius: 8px; padding: 0 14px; margin: 8px 0; background: var(--csp-card); }
.csp-faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; list-style-position: outside; }
.csp-faq details[open] summary { border-bottom: 1px solid var(--csp-line); margin-bottom: 8px; }

.csp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: #1f2328; color: #fff; border-radius: var(--csp-radius); padding: 20px 22px; margin: 28px 0; }
.csp-cta h3 { margin: 0 0 4px; color: #fff; }
.csp-cta p { margin: 0; color: #cfd4d9; }

.csp-tools { border: 1px solid var(--csp-line); border-radius: var(--csp-radius); padding: 14px 18px; margin: 22px 0; background: var(--csp-card); }
.csp-tools h3 { margin-top: 0; }
.csp-disclosure { font-size: .8rem; color: var(--csp-muted); }

.csp-lead { background: var(--csp-card); border: 2px solid var(--csp-accent); border-radius: var(--csp-radius); padding: 20px; margin: 28px 0; }
.csp-lead h2 { margin-top: 0; }
.csp-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; margin-bottom: 12px; }
.csp-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; }
.csp-span-2 { grid-column: 1 / -1; }
.csp-check { flex-direction: row !important; align-items: flex-start; gap: 8px !important; font-weight: 400 !important; }
.csp-check input { width: auto !important; margin-top: 3px; }
.csp-form-msg { margin: 10px 0 0; font-weight: 600; min-height: 1em; }
.csp-form-msg.is-ok { color: var(--csp-ok); }
.csp-form-msg.is-error { color: #b42318; }
.csp-form-legal { font-size: .78rem; color: var(--csp-muted); margin: 6px 0 0; }
.csp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.csp-signup { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 16px; align-items: center; background: var(--csp-bg); border-radius: var(--csp-radius); padding: 20px 22px; margin: 28px 0; }
.csp-signup h3 { margin: 0 0 4px; }
.csp-signup p { margin: 0; }
.csp-signup-row { display: flex; gap: 8px; }
@media (max-width: 720px) { .csp-signup { grid-template-columns: 1fr; } .csp-field-wide { grid-column: 1 / -1; } }

.csp-ad { margin: 24px 0; text-align: center; min-height: 0; }

.csp-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 12px; font-size: .85rem; color: var(--csp-muted); }
.csp-breadcrumbs li + li::before { content: "›"; margin-right: 4px; }
.csp-breadcrumbs a { color: var(--csp-muted); }
.csp-vp-meta { color: var(--csp-muted); font-size: .9rem; margin-top: -4px; }

.csp-cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: #1f2328; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: 860px; margin: 0 auto; }
.csp-cookie p { margin: 0; font-size: .9rem; }
.csp-cookie a { color: #ffd2b8; }
.csp-cookie div { display: flex; gap: 8px; }

.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* Print: only the calculator being printed */
@media print {
	body.csp-printing * { visibility: hidden; }
	body.csp-printing .csp-print-target, body.csp-printing .csp-print-target * { visibility: visible; }
	body.csp-printing .csp-print-target { position: absolute; left: 0; top: 0; width: 100%; }
	.csp-actions, .csp-cookie, .csp-ad { display: none !important; }
}

/* ---------- Motion & hover (v1.1) ---------- */
.csp-calc-wrap { transition: box-shadow .25s ease, transform .25s ease; }
.csp-calc-wrap:focus-within { box-shadow: 0 10px 30px rgba(242,107,29,.14); }
.csp-field input, .csp-field select { transition: border-color .15s ease, box-shadow .15s ease; }
.csp-field input:hover, .csp-field select:hover { border-color: #aeb4ba; }
.csp-calc-icon { transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.csp-calc-wrap:hover .csp-calc-icon { transform: rotate(-8deg) scale(1.08); }

.csp-flash .csp-primary { animation: csp-pop .45s ease; }
.csp-flash .csp-best, .csp-flash .csp-shop { animation: csp-fade .4s ease; }
@keyframes csp-pop { 0% { background: #ffe9db; } 100% { background: var(--csp-bg); } }
@keyframes csp-fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.csp-btn { transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease; }
.csp-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31,35,40,.10); }
.csp-btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.csp-btn-accent:hover { box-shadow: 0 6px 18px rgba(242,107,29,.35); }

.csp-card { position: relative; overflow: hidden; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.csp-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--csp-accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.csp-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(31,35,40,.10); }
.csp-card:hover::after { transform: scaleX(1); }
.csp-card-icon { display: inline-block; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.csp-card:hover .csp-card-icon { transform: scale(1.25) rotate(-6deg); }

.csp-table tbody tr { transition: background-color .15s ease; }
.csp-table tbody tr:hover { background: #fafbfb; }
.csp-links a { transition: color .15s ease, padding-left .15s ease; }
.csp-links a:hover { padding-left: 4px; }

.csp-faq details { transition: border-color .2s ease, box-shadow .2s ease; }
.csp-faq details:hover { border-color: #b9bfc5; }
.csp-faq details[open] { box-shadow: 0 4px 14px rgba(31,35,40,.06); }
.csp-faq details[open] > div { animation: csp-fade .3s ease; }
.csp-faq summary { transition: color .15s ease; }
.csp-faq summary:hover { color: var(--csp-accent-dark); }

.csp-cookie { animation: csp-slide-up .4s ease; }
@keyframes csp-slide-up { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.csp-calc-wrap, .csp-btn, .csp-card, .csp-card::after, .csp-card-icon, .csp-calc-icon, .csp-links a { transition: none !important; }
	.csp-flash .csp-primary, .csp-flash .csp-best, .csp-flash .csp-shop, .csp-cookie, .csp-faq details[open] > div { animation: none !important; }
	.csp-btn:hover, .csp-card:hover { transform: none; }
}
