/* ==========================================================================
   Export Leads CRM — Φόρμα εισαγωγέων
   Όλα τα χρώματα/αποστάσεις είναι μεταβλητές: μπορείς να τα αλλάξεις από
   το child theme, π.χ.  .elc-wrap { --elc-accent: #8a6d3b; --elc-radius: 0; }
   ========================================================================== */

.elc-wrap {
	--elc-accent: #1c1c1c;
	--elc-text: #1f1d1a;
	--elc-muted: #7b766e;
	--elc-line: #dcd6cc;
	--elc-bg: #ffffff;
	--elc-soft: #f6f3ee;
	--elc-error: #b42318;
	--elc-radius: 6px;
	--elc-gap: clamp(14px, 2vw, 22px);
	--elc-ease: cubic-bezier(.22, .8, .24, 1);

	position: relative;
	max-width: 880px;
	margin-inline: auto;
	color: var(--elc-text);
	font-family: inherit;
	line-height: 1.5;
}

.elc-wrap *,
.elc-wrap *::before,
.elc-wrap *::after { box-sizing: border-box; }

.elc-form fieldset { border: 0; margin: 0 0 clamp(26px, 4vw, 40px); padding: 0; min-width: 0; }

/* ---------- Κεφαλίδα ---------- */
.elc-head { margin-bottom: clamp(26px, 4vw, 42px); }
.elc-title {
	margin: 0 0 .35em;
	font-size: clamp(1.6rem, 3.2vw, 2.4rem);
	font-weight: 400;
	letter-spacing: -.01em;
	line-height: 1.15;
}
.elc-subtitle { margin: 0; max-width: 56ch; color: var(--elc-muted); font-size: 1rem; }

.elc-legend {
	display: block;
	margin-bottom: 16px;
	padding: 0;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--elc-muted);
}
.elc-req { color: var(--elc-accent); }

/* ---------- Κάρτες προϊόντων ---------- */
.elc-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}
.elc-product { position: relative; display: block; cursor: pointer; }
.elc-product input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}
.elc-product__card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	border: 1px solid var(--elc-line);
	border-radius: var(--elc-radius);
	background: var(--elc-bg);
	overflow: hidden;
	transition: border-color .35s var(--elc-ease), box-shadow .35s var(--elc-ease), transform .35s var(--elc-ease);
}
.elc-product__img {
	display: block;
	aspect-ratio: 4 / 5;
	background: var(--elc-soft);
	overflow: hidden;
}
.elc-product__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .8s var(--elc-ease);
}
.elc-product__name {
	display: block;
	padding: 12px 40px 13px 14px;
	font-size: .95rem;
	line-height: 1.3;
}
.elc-product--noimg .elc-product__name { padding-block: 20px; }
.elc-product__check {
	position: absolute;
	right: 10px;
	bottom: 11px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border: 1px solid var(--elc-line);
	border-radius: 50%;
	color: transparent;
	background: var(--elc-bg);
	transition: all .3s var(--elc-ease);
}
.elc-product__check svg { transform: scale(.4); transition: transform .35s var(--elc-ease); }

@media (hover: hover) {
	.elc-product:hover .elc-product__card { border-color: color-mix(in srgb, var(--elc-accent) 45%, var(--elc-line)); transform: translateY(-2px); }
	.elc-product:hover .elc-product__img img { transform: scale(1.04); }
}
.elc-product input:checked + .elc-product__card {
	border-color: var(--elc-accent);
	box-shadow: 0 0 0 1px var(--elc-accent), 0 10px 28px -14px rgba(0, 0, 0, .35);
}
.elc-product input:checked + .elc-product__card .elc-product__check {
	color: #fff;
	background: var(--elc-accent);
	border-color: var(--elc-accent);
}
.elc-product input:checked + .elc-product__card .elc-product__check svg { transform: scale(1); }
.elc-product input:focus-visible + .elc-product__card { outline: 2px solid var(--elc-accent); outline-offset: 3px; }

/* ---------- Πεδία με floating labels ---------- */
.elc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--elc-gap) clamp(14px, 2.4vw, 26px);
}
.elc-field { position: relative; }
.elc-field--wide { grid-column: 1 / -1; }

.elc-field input,
.elc-field select,
.elc-field textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 24px 14px 9px;
	border: 1px solid var(--elc-line);
	border-radius: var(--elc-radius);
	background: var(--elc-bg);
	color: var(--elc-text);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .25s ease, box-shadow .25s ease;
	-webkit-appearance: none;
	appearance: none;
}
.elc-field textarea { resize: vertical; min-height: 96px; }
.elc-field--select select {
	padding-right: 40px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237b766e' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
}

.elc-field label {
	position: absolute;
	top: 17px;
	left: 15px;
	right: 15px;
	color: var(--elc-muted);
	font-size: 1rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	transform-origin: 0 0;
	transition: transform .28s var(--elc-ease), color .28s ease;
}

/* Η ετικέτα ανεβαίνει όταν το πεδίο έχει τιμή ή focus */
.elc-field input:focus + label,
.elc-field input:not(:placeholder-shown) + label,
.elc-field textarea:focus + label,
.elc-field textarea:not(:placeholder-shown) + label,
.elc-field select:focus + label,
.elc-field select:valid + label,
.elc-field.is-filled label {
	transform: translateY(-10px) scale(.74);
}

.elc-field input:focus,
.elc-field select:focus,
.elc-field textarea:focus {
	outline: none;
	border-color: var(--elc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--elc-accent) 14%, transparent);
}
.elc-field input:focus + label,
.elc-field select:focus + label,
.elc-field textarea:focus + label { color: var(--elc-accent); }

.elc-field.has-error input,
.elc-field.has-error select { border-color: var(--elc-error); }

/* ---------- Σφάλματα ---------- */
.elc-error {
	margin: 6px 2px 0;
	min-height: 0;
	color: var(--elc-error);
	font-size: .82rem;
	line-height: 1.35;
}
.elc-error:empty { display: none; }
.elc-error--global { margin-top: 14px; }

/* ---------- Honeypot ---------- */
.elc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Συναίνεση ---------- */
.elc-consent {
	position: relative;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	cursor: pointer;
	color: var(--elc-muted);
	font-size: .88rem;
	line-height: 1.5;
}
.elc-consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.elc-consent__box {
	flex: 0 0 20px;
	height: 20px;
	margin-top: 1px;
	border: 1px solid var(--elc-line);
	border-radius: 4px;
	background: var(--elc-bg) center / 12px no-repeat;
	transition: all .25s var(--elc-ease);
}
.elc-consent input:checked + .elc-consent__box {
	background-color: var(--elc-accent);
	border-color: var(--elc-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.elc-consent input:focus-visible + .elc-consent__box { outline: 2px solid var(--elc-accent); outline-offset: 2px; }
.elc-consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Κουμπί ---------- */
.elc-actions { margin-top: clamp(24px, 3.5vw, 34px); }
.elc-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 54px;
	padding: 0 34px;
	border: 1px solid var(--elc-accent);
	border-radius: var(--elc-radius);
	background: var(--elc-accent);
	color: #fff;
	font: inherit;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	cursor: pointer;
	overflow: hidden;
	isolation: isolate;
	transition: color .4s var(--elc-ease), transform .2s ease;
}
/* Γέμισμα που «σκουπίζει» από κάτω στο hover */
.elc-submit::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: #fff;
	transform: translateY(101%);
	transition: transform .45s var(--elc-ease);
}
@media (hover: hover) {
	.elc-submit:hover { color: var(--elc-accent); }
	.elc-submit:hover::before { transform: translateY(0); }
}
.elc-submit:active { transform: scale(.985); }
.elc-submit:focus-visible { outline: 2px solid var(--elc-accent); outline-offset: 3px; }

.elc-submit__spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: elc-spin .7s linear infinite;
}
.elc-wrap.is-loading .elc-submit { pointer-events: none; opacity: .85; }
.elc-wrap.is-loading .elc-submit__spinner { display: inline-block; }

@keyframes elc-spin { to { transform: rotate(360deg); } }

/* ---------- Οθόνη επιτυχίας ---------- */
.elc-success {
	padding: clamp(40px, 7vw, 80px) 20px;
	text-align: center;
	outline: none;
	animation: elc-rise .7s var(--elc-ease) both;
}
.elc-success__icon { width: 72px; height: 72px; margin: 0 auto 22px; color: var(--elc-accent); }
.elc-success__icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.elc-success__icon circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: elc-draw .9s var(--elc-ease) .1s forwards; }
.elc-success__icon path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: elc-draw .5s var(--elc-ease) .75s forwards; }
.elc-success__title { margin: 0 0 .4em; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; }
.elc-success__text { max-width: 46ch; margin: 0 auto; color: var(--elc-muted); }

@keyframes elc-draw { to { stroke-dashoffset: 0; } }
@keyframes elc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Εμφάνιση φόρμας με μικρή κλιμάκωση */
.elc-form > * { animation: elc-rise .7s var(--elc-ease) both; }
.elc-form > *:nth-child(2) { animation-delay: .08s; }
.elc-form > *:nth-child(3) { animation-delay: .16s; }

/* ---------- Kiosk mode (tablet σε έκθεση) ---------- */
.elc-kiosk { max-width: 1100px; font-size: 1.08rem; }
.elc-kiosk .elc-title { font-size: clamp(2rem, 4vw, 3rem); }
.elc-kiosk .elc-product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.elc-kiosk .elc-field input,
.elc-kiosk .elc-field select { min-height: 64px; font-size: 1.1rem; }
.elc-kiosk .elc-submit { width: 100%; min-height: 66px; font-size: .95rem; }
.elc-kiosk .elc-consent__box { flex-basis: 26px; height: 26px; }

.elc-next {
	margin-top: 30px;
	padding: 16px 30px;
	border: 1px solid var(--elc-accent);
	border-radius: var(--elc-radius);
	background: transparent;
	color: var(--elc-accent);
	font: inherit;
	font-size: .85rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
}
.elc-countdown { opacity: .6; }

/* Ένδειξη αιτημάτων σε αναμονή (χωρίς ίντερνετ) */
.elc-queue {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	padding: 10px 16px;
	border-radius: 30px;
	background: #1f1d1a;
	color: #fff;
	font-size: .82rem;
	box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.elc-grid { grid-template-columns: 1fr; }
	.elc-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.elc-product__name { font-size: .88rem; padding: 10px 36px 11px 11px; }
	.elc-submit { width: 100%; }
}

/* ---------- Μειωμένη κίνηση ---------- */
@media (prefers-reduced-motion: reduce) {
	.elc-wrap *,
	.elc-wrap *::before { animation: none !important; transition: none !important; }
	.elc-success__icon circle,
	.elc-success__icon path { stroke-dashoffset: 0; }
}

/* ---------- Συμπαγής εκδοχή (popup) ---------- */
.elc-compact { --elc-gap: 12px; max-width: 640px; }
.elc-compact .elc-head { margin-bottom: 20px; }
.elc-compact .elc-title { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.elc-compact .elc-subtitle { font-size: .92rem; }
.elc-compact .elc-form fieldset { margin-bottom: 22px; }
.elc-compact .elc-legend { margin-bottom: 12px; }
.elc-compact .elc-product-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.elc-compact .elc-product__img { aspect-ratio: 1 / 1; }
.elc-compact .elc-product__name { font-size: .86rem; padding: 9px 40px 10px 10px; }
.elc-compact .elc-field input,
.elc-compact .elc-field select { padding: 21px 12px 7px; font-size: .95rem; }
.elc-compact .elc-field label { top: 15px; left: 13px; font-size: .95rem; }
.elc-compact .elc-actions { margin-top: 20px; }
.elc-compact .elc-submit { width: 100%; min-height: 50px; }
.elc-compact .elc-success { padding: 36px 12px; }
