/*
 * Cicka Design – free download card ([cicka_download]). Self-contained, so
 * it looks the same on blog posts, pages and Elementor pages.
 *
 * Phone: <= 760px.
 */

.cdl {
	--cdl-ink: #3A2B2B;
	--cdl-ink-2: #5A4846;
	--cdl-muted: #7A6A68;
	--cdl-head: #7D4F50;
	--cdl-accent: #A55F59;
	--cdl-accent-hover: #8F4E49;
	--cdl-blush: #F8E6E3;
	--cdl-cream: #FCEFD2;
	--cdl-bg: #FFFCFA;
	--cdl-line: #EBD3CF;
	--cdl-soft: #F1E3E0;
	--cdl-green: #4F7A55;
	--cdl-red: #B3261E;
	--cdl-font: 'Solway', serif;
	margin: 32px 0;
	color: var(--cdl-ink);
	font-family: var(--cdl-font);
}
.cdl *,
.cdl *::before,
.cdl *::after { box-sizing: border-box; }
.cdl [hidden] { display: none !important; }

/* ---------- Card ---------- */
.cdl-card { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 28px; border: 1px solid var(--cdl-line); border-radius: 26px; background: #fff; box-shadow: 0 18px 50px rgba(58, 43, 43, .07); }
.cdl-card--plain { grid-template-columns: 1fr; }
.cdl-cover { position: relative; align-self: start; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 16px; background: var(--cdl-blush); }
/* The whole photo is shown (contain); a blurred, softened copy of it fills
   the rest of the frame when the photo's shape doesn't match 3:4. */
.cdl-cover__fill { position: absolute; inset: -12px; background-position: center; background-size: cover; filter: blur(14px) saturate(1.1); opacity: .55; }
.cdl .cdl-cover img.cdl-cover__img { position: relative; display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.cdl-cover__tag { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #fff; color: var(--cdl-accent); font: 700 11px/1.2 var(--cdl-font); letter-spacing: .04em; }

.cdl-kicker { display: flex; align-items: center; gap: 8px; color: var(--cdl-accent); font: 700 12px/1.3 var(--cdl-font); letter-spacing: .12em; text-transform: uppercase; }
.cdl .cdl-title { margin: 8px 0 8px; color: var(--cdl-head); font: 500 26px/1.2 var(--cdl-font); letter-spacing: 0; text-transform: none; }
.cdl .cdl-intro { margin: 0 0 18px; color: var(--cdl-ink-2); font-size: 15px; line-height: 1.65; }

/* ---------- Fields ---------- */
.cdl-form { margin: 0; }
.cdl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cdl .cdl-field { margin: 0 0 12px; }
.cdl-field label { display: block; margin: 0 0 5px; color: var(--cdl-ink); font: 500 13px/1.3 var(--cdl-font); }
.cdl-field label span { color: var(--cdl-accent); }
.cdl .cdl-field input {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--cdl-line);
	border-radius: 13px;
	background: var(--cdl-bg);
	box-shadow: none;
	color: var(--cdl-ink);
	font: 400 15px/1.2 var(--cdl-font);
	transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.cdl .cdl-field input::placeholder { color: #A99A98; opacity: 1; }
.cdl .cdl-field input:focus { border-color: var(--cdl-accent); outline: none; background: #fff; box-shadow: 0 0 0 4px rgba(165, 95, 89, .12); }
.cdl .is-error input { border-color: var(--cdl-red); background: #fff; }
.cdl-error { display: block; margin-top: 6px; color: var(--cdl-red); font-size: 12px; line-height: 1.4; }
.cdl-error:empty { display: none; }

/* Hidden from people; bots fill it in. */
.cdl .cdl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.cdl-consent { margin: 4px 0 14px; }
.cdl-consent label { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--cdl-soft); border-radius: 13px; background: var(--cdl-bg); color: var(--cdl-ink-2); font: 400 13px/1.55 var(--cdl-font); cursor: pointer; }
.cdl-consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--cdl-accent); }
.cdl-consent a { color: var(--cdl-accent); text-decoration: underline; }
.cdl-consent.is-error label { border-color: var(--cdl-red); }
.cdl-consent--optional { margin-top: -6px; }

/* ---------- Buttons ---------- */
.cdl-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.cdl .cdl-btn,
.cdl a.cdl-btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	margin: 0;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: var(--cdl-accent);
	color: #fff;
	font: 500 15px/1.2 var(--cdl-font);
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	transition: background-color .15s, opacity .15s;
}
/* Page and post content styles their links (colour, underline); the
   buttons must look the same wherever the shortcode is placed. */
.cdl .cdl-btn,
.cdl .cdl-btn:hover,
.cdl .cdl-btn:focus,
.cdl .cdl-btn:visited { color: #fff !important; text-decoration: none !important; }
.cdl .cdl-btn--ghost,
.cdl .cdl-btn--ghost:visited { color: var(--cdl-ink) !important; }
.cdl .cdl-btn--ghost:hover,
.cdl .cdl-btn--ghost:focus { color: var(--cdl-accent) !important; }
/* Blog posts colour every content link with a long, !important rule
   (blog-single.css); this one is more specific, so the buttons win. */
.cicka-blog-single .cbs-body .cdl a.cdl-btn.cdl-btn.cdl-btn.cdl-btn { color: #fff !important; text-decoration: none !important; }
.cicka-blog-single .cbs-body .cdl a.cdl-btn.cdl-btn--ghost.cdl-btn.cdl-btn { color: var(--cdl-ink) !important; }
.cicka-blog-single .cbs-body .cdl a.cdl-btn.cdl-btn--ghost.cdl-btn.cdl-btn:hover { color: var(--cdl-accent) !important; }
.cdl .cdl-btn:hover { background: var(--cdl-accent-hover); color: #fff; }
.cdl .cdl-btn:disabled { opacity: .7; cursor: wait; }
.cdl .cdl-btn:focus-visible { outline: 2px solid var(--cdl-accent); outline-offset: 3px; }
.cdl .cdl-btn--ghost,
.cdl a.cdl-btn--ghost:visited { border: 1px solid var(--cdl-line); background: #fff; color: var(--cdl-ink); }
.cdl .cdl-btn--ghost:hover { border-color: var(--cdl-accent); background: #fff; color: var(--cdl-accent); }
.cdl-safe { display: inline-flex; align-items: center; gap: 6px; color: var(--cdl-muted); font-size: 12px; }
.cdl .cdl-message { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #FCF0F1; color: var(--cdl-red); font-size: 14px; }

/* ---------- Thank you ---------- */
.cdl-done:focus { outline: none; }
.cdl-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #E7F0E8; color: var(--cdl-green); font: 700 12px/1.2 var(--cdl-font); }
.cdl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cdl .cdl-note { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0 0; padding: 14px 16px; border: 1px solid #F3DFB4; border-radius: 16px; background: var(--cdl-cream); text-align: left; }
.cdl-note__icon { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--cdl-accent); }
.cdl-note strong { display: block; margin: 2px 0 2px; color: var(--cdl-head); font: 500 15px/1.35 var(--cdl-font); }
.cdl-note div > span { display: block; color: var(--cdl-ink-2); font-size: 13px; line-height: 1.55; }
.cdl .cdl-small { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--cdl-muted); font-size: 13px; line-height: 1.4; }
.cdl .cdl-small svg { flex: none; color: var(--cdl-accent); }

/* ---------- Compact bar ---------- */
.cdl-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 20px; background: var(--cdl-blush); }
.cdl-bar strong { display: block; color: var(--cdl-head); font: 500 18px/1.3 var(--cdl-font); }
.cdl-bar span { color: var(--cdl-ink-2); font-size: 14px; }
.cdl--compact.is-open .cdl-bar { display: none; }

/* ---------- Phone ---------- */
@media (max-width: 760px) {
	.cdl-card { grid-template-columns: 1fr; gap: 18px; padding: 20px 18px; border-radius: 22px; }
	.cdl-cover { width: 100%; max-width: 180px; margin: 0 auto; }
	.cdl-kicker { justify-content: center; }
	.cdl .cdl-title,
	.cdl .cdl-intro { text-align: center; }
	.cdl .cdl-title { font-size: 22px; }
	.cdl-done { text-align: center; }
	.cdl-actions { justify-content: center; }
	.cdl .cdl-small { justify-content: center; text-align: left; }
	.cdl-row { grid-template-columns: 1fr; }
	.cdl-send { justify-content: center; }
	.cdl .cdl-btn { width: 100%; }
	.cdl-bar { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Sneak peek into the pattern (inc/pdf-peek.php) ---------- */
.cdl-peek { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--cdl-soft); }
.cdl-card--plain .cdl-peek { grid-column: auto; }
.cdl-peek__head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cdl-peek__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--cdl-accent); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.cdl-peek__count { color: var(--cdl-muted); font-size: 13px; }
.cdl-peek__pages { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); gap: 18px; align-items: start; }
.cdl .cdl-peek__page,
.cdl .cdl-peek__rest { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 1px solid var(--cdl-line); border-radius: 10px; background: #fff; color: var(--cdl-head); font: inherit; letter-spacing: normal; text-transform: none; text-align: center; box-shadow: none; cursor: pointer; }
.cdl .cdl-peek__page { overflow: hidden; box-shadow: 0 10px 26px rgba(58, 43, 43, .08); cursor: zoom-in; transition: transform .2s ease, box-shadow .2s ease; }
.cdl .cdl-peek__page:nth-child(1) { transform: rotate(-1.2deg); }
.cdl .cdl-peek__page:nth-child(2) { transform: rotate(1deg); }
.cdl .cdl-peek__page:hover,
.cdl .cdl-peek__page:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(58, 43, 43, .13); }
.cdl .cdl-peek__page:focus-visible,
.cdl .cdl-peek__rest:focus-visible { outline: 2px solid var(--cdl-accent); outline-offset: 3px; }
.cdl-peek__page img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: top; border-radius: 0; }
.cdl-peek__label { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .94); color: var(--cdl-ink-2); font-size: 11.5px; line-height: 1.2; box-shadow: 0 2px 8px rgba(58, 43, 43, .1); }
.cdl-peek__zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--cdl-accent); box-shadow: 0 2px 8px rgba(58, 43, 43, .1); }
.cdl .cdl-peek__rest { display: grid; place-items: center; overflow: hidden; aspect-ratio: 1 / 1.414; border-style: dashed; border-color: #E3C6C1; background: #FDF6F4; }
.cdl-peek__rest::before { content: ""; position: absolute; inset: 14%; background: repeating-linear-gradient(var(--cdl-soft) 0 4px, transparent 4px 11px); filter: blur(3px); opacity: .8; }
.cdl-peek__rest span { position: relative; padding: 0 10px; font-size: 14px; line-height: 1.4; }
.cdl-peek__rest b { display: block; font-size: 22px; font-weight: 500; }
.cdl .cdl-peek__rest:hover { border-color: var(--cdl-accent); }
.cdl .cdl-peek__note { margin: 12px 0 0; color: var(--cdl-muted); font-size: 12.5px; line-height: 1.4; }

/* Enlarged page. */
.cdl-lightbox { position: fixed; inset: 0; z-index: 100000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(40, 28, 28, .88); color: #fff; font-family: 'Solway', serif; }
.cdl-lightbox[hidden] { display: none; }
.cdl-lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 900px; width: 100%; margin: 0 auto; font-size: 14px; }
.cdl-lightbox__stage { position: relative; display: grid; place-items: center; min-height: 0; }
.cdl-lightbox__stage img { max-width: min(100%, 860px); max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); width: auto; height: auto; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.cdl-lightbox button { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: 15px; letter-spacing: normal; text-transform: none; cursor: pointer; }
.cdl-lightbox button:hover,
.cdl-lightbox button:focus-visible { background: rgba(255, 255, 255, .26); outline: none; }
.cdl-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.cdl-lightbox__prev { left: 0; }
.cdl-lightbox__next { right: 0; }
.cdl-lightbox__bottom { display: flex; justify-content: center; }
.cdl-lightbox .cdl-lightbox__cta { min-height: 50px; padding: 0 26px; background: #A55F59; font-weight: 700; }
.cdl-lightbox .cdl-lightbox__cta:hover,
.cdl-lightbox .cdl-lightbox__cta:focus-visible { background: #8F4E49; }
body.cdl-lightbox-open { overflow: hidden; }

@media (max-width: 760px) {
	.cdl-peek { padding-top: 18px; }
	.cdl-peek__pages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.cdl-peek__label { left: 6px; bottom: 6px; padding: 3px 7px; font-size: 10px; }
	.cdl-peek__zoom { display: none; }
	.cdl-peek__rest span { font-size: 11px; }
	.cdl-peek__rest b { font-size: 16px; }
	.cdl-lightbox__nav { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	.cdl .cdl-peek__page { transition: none; }
}
