/* WebLokos Contact Form 1.0.1 - compact layout.
   Inherits the theme font. Accent follows your Blocksy palette colour 2 (orange). */

.wl-cf {
	--wl-accent: var(--theme-palette-color-2, #fd7c47);
	--wl-on-accent: #1b1b1b;            /* dark text keeps contrast on the orange; use #fff if you pick a darker accent */
	--wl-text: var(--theme-text-color, #2b2f36);
	--wl-muted: #5f6672;
	--wl-line: #cfd3da;
	--wl-field: #fff;
	--wl-error: #b3261e;
	--wl-radius: 8px;
	--wl-h: 2.75rem;                     /* height of text fields and the topic select */

	max-width: 680px;
	color: var(--wl-text);
	font: inherit;
}
.wl-cf *, .wl-cf *::before, .wl-cf *::after { box-sizing: border-box; }
.wl-cf [hidden] { display: none !important; }

.wl-cf__form { display: grid; gap: 1rem; }
.wl-cf__row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .wl-cf__row { grid-template-columns: 1fr; } }

.wl-cf__field { display: grid; gap: .3rem; min-width: 0; }
.wl-cf label,
.wl-cf__label { margin: 0; font-weight: 600; font-size: .9rem; line-height: 1.3; }

/* Fields. !important on height/padding/line-height beats the theme's own form rules,
   which is what clipped the text in the topic select. */
.wl-cf .wl-cf__field input[type="text"],
.wl-cf .wl-cf__field input[type="email"],
.wl-cf .wl-cf__field select {
	width: 100%;
	height: var(--wl-h) !important;
	min-height: 0 !important;
	padding: 0 .85rem !important;
	margin: 0;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4 !important;
	color: var(--wl-text);
	background-color: var(--wl-field);
	border: 1px solid var(--wl-line);
	border-radius: var(--wl-radius);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.wl-cf .wl-cf__field select {
	-webkit-appearance: none !important;
	appearance: none !important;
	padding-right: 2.4rem !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235f6672' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right .9rem center !important;
	background-size: 12px 8px !important;
	cursor: pointer;
}
.wl-cf .wl-cf__field textarea {
	width: 100%;
	height: auto !important;
	min-height: 6.5rem !important;
	padding: .6rem .85rem !important;
	margin: 0;
	font: inherit;
	font-size: 1rem;
	line-height: 1.5 !important;
	color: var(--wl-text);
	background-color: var(--wl-field);
	border: 1px solid var(--wl-line);
	border-radius: var(--wl-radius);
	resize: vertical;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.wl-cf input:hover, .wl-cf select:hover, .wl-cf textarea:hover { border-color: #9aa1ad; }
.wl-cf input:focus-visible, .wl-cf select:focus-visible, .wl-cf textarea:focus-visible {
	outline: none;
	border-color: var(--wl-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wl-accent) 30%, transparent);
}
.wl-cf [aria-invalid="true"] { border-color: var(--wl-error) !important; }

.wl-cf__meta { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.wl-cf__count { margin-left: auto; font-size: .8rem; color: var(--wl-muted); font-variant-numeric: tabular-nums; }

.wl-cf__err { margin: 0; font-size: .85rem; color: var(--wl-error); }

/* ---- Drop zone: the one distinctive element, laid out as a compact strip ---- */
.wl-cf__drop {
	position: relative;
	border: 2px dashed var(--wl-line);
	border-radius: 12px;
	background: color-mix(in srgb, var(--wl-accent) 4%, var(--wl-field));
	transition: border-color .15s ease, background-color .15s ease;
}
.wl-cf__drop:hover { border-color: var(--wl-accent); }
.wl-cf__drop.is-dragging {
	border-color: var(--wl-accent);
	border-style: solid;
	background: color-mix(in srgb, var(--wl-accent) 14%, var(--wl-field));
}
.wl-cf__drop.is-invalid { border-color: var(--wl-error); }

.wl-cf__file-input {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.wl-cf .wl-cf__drop-label {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas: "icon title" "icon hint";
	column-gap: .85rem;
	row-gap: .1rem;
	align-items: center;
	padding: .75rem 1rem;
	text-align: left;
	cursor: pointer;
	font-weight: 400;
}
.wl-cf__file-input:focus-visible + .wl-cf__drop-label {
	outline: 3px solid color-mix(in srgb, var(--wl-accent) 55%, transparent);
	outline-offset: 2px;
	border-radius: 10px;
}
.wl-cf__drop-icon { grid-area: icon; color: var(--wl-accent); }
.wl-cf__drop-title { grid-area: title; font-weight: 600; font-size: .95rem; line-height: 1.3; }
.wl-cf__drop-hint { grid-area: hint; font-size: .82rem; line-height: 1.3; color: var(--wl-muted); }
.wl-cf__drop.has-file .wl-cf__drop-label { padding-bottom: .5rem; }

.wl-cf__chip {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin: 0 .6rem .6rem;
	padding: .45rem .75rem;
	background: var(--wl-field);
	border: 1px solid var(--wl-line);
	border-radius: var(--wl-radius);
}
.wl-cf__chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.wl-cf__chip-size { color: var(--wl-muted); font-size: .82rem; white-space: nowrap; }
.wl-cf .wl-cf__chip-remove {
	padding: .2rem .45rem;
	font: inherit; font-size: .82rem;
	color: var(--wl-text);
	background: none;
	border: 0;
	border-radius: 6px;
	text-decoration: underline;
	cursor: pointer;
}
.wl-cf .wl-cf__chip-remove:hover { color: var(--wl-error); background: none; }
.wl-cf__chip-remove:focus-visible { outline: 2px solid var(--wl-accent); outline-offset: 2px; }

/* ---- Consent ---- */
.wl-cf__field--check { grid-template-columns: auto 1fr; column-gap: .6rem; align-items: start; }
.wl-cf__field--check input[type="checkbox"] { margin: .2rem 0 0; width: 1.05rem; height: 1.05rem; accent-color: var(--wl-accent); }
.wl-cf__field--check label { font-weight: 400; font-size: .87rem; line-height: 1.45; }
.wl-cf__field--check .wl-cf__err { grid-column: 2; }

/* ---- Honeypot (off-screen, not display:none, so bots still see it) ---- */
.wl-cf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Progress ---- */
.wl-cf__bar { height: 8px; background: color-mix(in srgb, var(--wl-accent) 18%, #fff); border-radius: 999px; overflow: hidden; }
.wl-cf__bar > span { display: block; height: 100%; width: 0; background: var(--wl-accent); border-radius: 999px; transition: width .2s linear; }
.wl-cf__progress-text { margin: .4rem 0 0; font-size: .85rem; color: var(--wl-muted); }

.wl-cf__status { font-size: .92rem; }
.wl-cf__status:empty { display: none; }
.wl-cf__status.is-error { color: var(--wl-error); }

/* ---- Buttons ---- */
.wl-cf .wl-cf__btn {
	justify-self: start;
	min-height: 0;
	padding: .65rem 1.5rem;
	font: inherit;
	font-weight: 700;
	line-height: 1.4;
	color: var(--wl-on-accent);
	background: var(--wl-accent);
	border: 2px solid var(--wl-accent);
	border-radius: var(--wl-radius);
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}
.wl-cf .wl-cf__btn:hover { filter: brightness(.94); color: var(--wl-on-accent); background: var(--wl-accent); }
.wl-cf .wl-cf__btn:active { transform: translateY(1px); }
.wl-cf .wl-cf__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--wl-accent) 55%, transparent); outline-offset: 3px; }
.wl-cf .wl-cf__btn:disabled { opacity: .6; cursor: progress; }
.wl-cf .wl-cf__btn--ghost,
.wl-cf .wl-cf__btn--ghost:hover { background: transparent; color: var(--wl-text); border-color: var(--wl-line); }

.wl-cf__form.is-busy { cursor: progress; }

/* ---- Success ---- */
.wl-cf__success {
	padding: 1.5rem 1.25rem;
	border: 1px solid var(--wl-line);
	border-left: 5px solid var(--wl-accent);
	border-radius: var(--wl-radius);
	background: var(--wl-field);
}
.wl-cf__success h3 { margin: 0 0 .4rem; outline: none; }
.wl-cf__success p { margin: 0 0 1rem; max-width: 52ch; }

@media (prefers-reduced-motion: reduce) {
	.wl-cf * { transition: none !important; }
}

/* =====================================================================
   Popup: floating action button + modal (v1.1)
   ===================================================================== */

html.wl-cf-lock { overflow: hidden; }

.wl-cf-fab {
	position: fixed;
	right: max(1.25rem, env(safe-area-inset-right));
	bottom: max(1.25rem, env(safe-area-inset-bottom));
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	margin: 0;
	padding: .8rem 1.15rem !important;
	min-height: 0 !important;
	font: inherit;
	font-size: .95rem !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	color: #1b1b1b !important;
	background: var(--theme-palette-color-2, #fd7c47) !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: 0 6px 18px rgba(15, 20, 30, .25);
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.wl-cf-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 20, 30, .3); }
.wl-cf-fab:focus-visible { outline: 3px solid #1b1b1b; outline-offset: 3px; }
.wl-cf-fab svg { flex: none; }

/* Keep clear of Blocksy's "back to top" button when the theme prints it. */
body:has(.ct-back-to-top) .wl-cf-fab { bottom: calc(max(1.25rem, env(safe-area-inset-bottom)) + 3.75rem); }

@media (max-width: 520px) {
	.wl-cf-fab { padding: .95rem !important; }
	.wl-cf-fab__label { display: none; }
}

.wl-cf-modal {
	width: min(560px, calc(100% - 1.5rem));
	max-width: none;
	max-height: calc(100vh - 1.5rem);
	max-height: calc(100dvh - 1.5rem);
	margin: auto;
	padding: 0;
	overflow: hidden;
	color: #2b2f36;
	background: #fff;
	border: 0;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(10, 14, 22, .35);
}
.wl-cf-modal::backdrop { background: rgba(17, 20, 26, .55); }
.wl-cf-modal[open] { animation: wl-cf-pop .18s ease-out; }
@keyframes wl-cf-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.wl-cf-modal__panel {
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 1.5rem);
	max-height: calc(100dvh - 1.5rem);
}
.wl-cf-modal__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	padding: 1.1rem 1.1rem .5rem 1.4rem;
}
.wl-cf-modal__head h2 { margin: 0; font-size: 1.3rem; line-height: 1.25; color: inherit; }
.wl-cf-modal__head p { margin: .3rem 0 0; font-size: .92rem; line-height: 1.45; color: #5f6672; }
.wl-cf-modal .wl-cf-modal__close {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 2.5rem; height: 2.5rem;
	min-height: 0;
	margin: 0; padding: 0;
	color: #2b2f36;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.wl-cf-modal .wl-cf-modal__close:hover { background: #eef0f3; color: #2b2f36; }
.wl-cf-modal .wl-cf-modal__close:focus-visible { outline: 2px solid var(--theme-palette-color-2, #fd7c47); outline-offset: 2px; }

.wl-cf-modal__body {
	padding: .5rem 1.4rem 1.4rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.wl-cf-modal .wl-cf { max-width: none; }

@media (prefers-reduced-motion: reduce) {
	.wl-cf-modal[open] { animation: none; }
	.wl-cf-fab { transition: none; }
}
@media print { .wl-cf-fab, .wl-cf-modal { display: none !important; } }
