/**
 * Abela HCP Connect — storefront widgets, aligned with abela.shop (Woodmart).
 * Abela crvena #E3000F · Abela teal #4FAF9C · Poppins.
 */

.abela-hcp-code {
	--abela-red: #e3000f;
	--abela-red-600: #c0000d;
	--abela-teal: #4faf9c;
	--abela-teal-600: #3c8f7f;
	position: relative;
	border: 1px solid #ececec;
	border-radius: 16px;
	padding: 18px 20px;
	margin: 0 0 22px;
	background: linear-gradient(180deg, #fcfcfc, #f7f7f7);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	box-shadow: 0 2px 10px rgba(36, 36, 36, 0.04);
}

.abela-hcp-code__title {
	margin: 0 0 8px;
	font-weight: 600;
	font-size: 15px;
	color: #242424;
	display: flex;
	align-items: center;
	gap: 8px;
}

.abela-hcp-code__title::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #e3000f;
	box-shadow: 0 0 0 4px rgba(227, 0, 15, 0.12);
	flex: 0 0 auto;
}

.abela-hcp-code__hint { margin: 0 0 14px; font-size: 13px; color: #767676; line-height: 1.55; }
.abela-hcp-code__privacy { margin: 12px 0 0; font-size: 11px; color: #9b9b9b; }
.abela-hcp-code__form { display: flex; gap: 10px; flex-wrap: wrap; }

.abela-hcp-code__input {
	flex: 1 1 190px;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid #dcdcdc;
	border-radius: 12px;
	font-family: inherit;
	font-size: 15px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
	background: #fff;
}

.abela-hcp-code__input:focus {
	border-color: #4faf9c;
	box-shadow: 0 0 0 3px rgba(79, 175, 156, 0.18);
	outline: none;
}

.abela-hcp-code__button {
	min-height: 46px;
	padding: 0 22px;
	border-radius: 999px;
	background: #e3000f;
	color: #fff;
	border: 0;
	font-family: inherit;
	font-weight: 600;
	font-size: 13.5px;
	cursor: pointer;
	transition: background 0.18s ease, transform 0.16s ease, box-shadow 0.2s ease;
	box-shadow: 0 10px 20px rgba(227, 0, 15, 0.22);
	position: relative;
}

.abela-hcp-code__button:hover { background: #c0000d; transform: translateY(-1px); }
.abela-hcp-code__button:disabled { background: #cfcfcf; box-shadow: none; cursor: not-allowed; transform: none; }
.abela-hcp-code__button.is-loading { color: transparent; }
.abela-hcp-code__button.is-loading::after {
	content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px;
	border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
	animation: abela-hcp-spin 0.7s linear infinite;
}

.abela-hcp-code__button--ghost {
	background: #fff;
	color: #242424;
	border: 1px solid #dcdcdc;
	box-shadow: none;
}
.abela-hcp-code__button--ghost:hover { background: #f7f7f7; color: #242424; }

.abela-hcp-code__active { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13.5px; color: #242424; }
.abela-hcp-code__badge {
	background: #e8f5f2; color: #3c8f7f; border-radius: 999px; padding: 4px 11px;
	font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
}
.abela-hcp-code__org { color: #767676; }
.abela-hcp-code__method { color: #9b9b9b; font-size: 11.5px; }
.abela-hcp-code__remove { margin: 12px 0 0; }

.abela-hcp-code__notice {
	border-radius: 12px;
	padding: 11px 14px;
	margin-bottom: 12px;
	font-size: 13px;
	animation: abela-hcp-fade 0.3s ease;
}
.abela-hcp-code__notice--error { background: #ffecee; color: #b42318; }
.abela-hcp-code__notice--success { background: #ecfdf3; color: #067647; }
.abela-hcp-code__notice--info { background: #e8f5f2; color: #3c8f7f; }
.abela-hcp-code--compact { padding: 14px 16px; }

@keyframes abela-hcp-spin { to { transform: rotate(360deg); } }
@keyframes abela-hcp-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- HCP price block ---------- */
.abela-hcp-price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 12px 0 8px;
	padding: 12px 16px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(79, 175, 156, 0.12), rgba(79, 175, 156, 0.05));
	border: 1px solid rgba(79, 175, 156, 0.38);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	animation: abela-hcp-fade 0.32s ease;
}
.abela-hcp-price__badge {
	background: #4faf9c;
	color: #fff;
	border-radius: 999px;
	padding: 4px 11px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
}
.abela-hcp-price__value { font-size: 21px; font-weight: 600; color: #242424; letter-spacing: -0.01em; }
.abela-hcp-price__old { color: #9b9b9b; font-size: 13px; }
.abela-hcp-price__save { color: #3c8f7f; font-size: 12.5px; font-weight: 600; }
.abela-hcp-price__note { flex: 1 1 100%; margin: 0; font-size: 11.5px; color: #767676; }

.abela-hcp-loop-price {
	display: inline-block;
	margin-top: 5px;
	font-size: 12.5px;
	font-weight: 600;
	color: #3c8f7f;
	background: rgba(79, 175, 156, 0.12);
	border-radius: 8px;
	padding: 2px 9px;
}

.abela-hcp-cart-price { font-weight: 600; color: #242424; }
.abela-hcp-cart-price__old { color: #9b9b9b; font-size: 12px; }
.abela-hcp-cart-savings th { color: #3c8f7f; }
.abela-hcp-cart-savings small { color: #767676; font-weight: 400; }

/* ---------- Storefront toast ---------- */
.abela-hcp-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; max-width: min(340px, calc(100vw - 32px)); }
.abela-hcp-toast {
	background: #fff; border: 1px solid #ececec; border-left: 4px solid #4faf9c; border-radius: 12px;
	box-shadow: 0 18px 40px rgba(36, 36, 36, 0.16); padding: 13px 16px; font-size: 13px; color: #242424;
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	animation: abela-hcp-toast 0.3s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.abela-hcp-toast--error { border-left-color: #e3000f; }
@keyframes abela-hcp-toast { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.woocommerce-cart .abela-hcp-code, .woocommerce-checkout .abela-hcp-code { margin-top: 0; }

/* ==========================================================================
   Public partner application form — [abela_hcp_apply]
   Rendered inside the theme, so it carries its own compact styles.
   ========================================================================== */
.abela-apply {
	--apply-red: #e3000f;
	--apply-red-600: #c0000d;
	--apply-red-soft: #fff6f6;
	--apply-ink: #1c1d1f;
	--apply-ink-2: #3b3d40;
	--apply-muted: #78797b;
	--apply-faint: #9c9a98;
	--apply-line: #ece7e4;
	--apply-paper: #fbf9f7;
	--apply-teal: #4faf9c;
	--apply-pill: 999px;
	position: relative;
	margin: 0 0 28px;
	padding: 24px 22px;
	border: 1px solid var(--apply-line);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(28, 29, 31, 0.04), 0 22px 40px -38px rgba(28, 29, 31, 0.55);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--apply-ink);
}

.abela-apply > h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--apply-ink);
}
.abela-apply > h2::before {
	content: "";
	flex: 0 0 auto;
	width: 5px;
	height: 22px;
	border-radius: 3px;
	background: linear-gradient(180deg, var(--apply-red), #ff5e69);
}
.abela-apply p { font-size: 13.5px; line-height: 1.6; }
.abela-apply .abela-muted { color: var(--apply-muted); margin: 0 0 18px; }
.abela-apply .abela-footnote {
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px dashed var(--apply-line);
	font-size: 11.5px;
	line-height: 1.65;
	color: var(--apply-faint);
}

.abela-apply *,
.abela-apply *::before,
.abela-apply *::after { box-sizing: border-box; }

.abela-apply .abela-grid { display: grid; gap: 0 16px; }
.abela-apply .abela-grid--two { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) {
	.abela-apply .abela-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.abela-apply .abela-field { display: block; margin: 0 0 16px; }
.abela-apply .abela-field > span {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--apply-ink-2);
}
.abela-apply .abela-field__help {
	display: block;
	margin: 6px 0 0;
	font-size: 11.5px;
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: 0;
	color: var(--apply-muted);
}
.abela-apply .abela-field > .abela-field__help { font-weight: 400; color: var(--apply-muted); }
.abela-apply .abela-required { color: var(--apply-red); }

.abela-apply input[type="text"],
.abela-apply input[type="email"],
.abela-apply input[type="tel"],
.abela-apply select,
.abela-apply textarea {
	width: 100%;
	min-height: 46px;
	padding: 11px 16px;
	border: 1px solid var(--apply-line);
	border-radius: 14px;
	background: var(--apply-paper);
	color: var(--apply-ink);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.abela-apply textarea { min-height: 96px; resize: vertical; padding-top: 12px; }
.abela-apply select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 42px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378797b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
}
.abela-apply input:focus,
.abela-apply select:focus,
.abela-apply textarea:focus {
	outline: none;
	border-color: rgba(227, 0, 15, 0.4);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(227, 0, 15, 0.08);
}

.abela-apply .abela-alert {
	border-radius: 16px;
	border: 1px solid var(--apply-line);
	padding: 14px 16px;
	margin: 0 0 16px;
	font-size: 13.5px;
	line-height: 1.55;
}
.abela-apply .abela-alert--error { border-color: #f7d3cf; background: #fef3f2; color: #8e1b12; }
.abela-apply .abela-alert--success { border-color: #c3e8d5; background: #eaf7f0; color: #0b5c3b; }

.abela-apply .abela-form__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.abela-apply .abela-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	padding: 0 24px;
	border: 1px solid transparent;
	border-radius: var(--apply-pill);
	background: #fff;
	color: var(--apply-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.abela-apply .abela-btn--primary {
	background: linear-gradient(180deg, #ff2b39, var(--apply-red));
	color: #fff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 20px -12px rgba(227, 0, 15, 0.85);
}
.abela-apply .abela-btn--primary:hover {
	background: linear-gradient(180deg, #ff3d4a, var(--apply-red-600));
	color: #fff;
	transform: translateY(-1px);
}
.abela-apply .abela-btn--ghost { border-color: var(--apply-line); background: #fff; color: var(--apply-ink); }
.abela-apply .abela-btn--block { width: 100%; }

/* honeypot */
.abela-apply .abela-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
