/* EST Team Licensing — pre-checkout modal
   Retheme by overriding the variables below to match EST brand colors. */
:root {
	--est-primary: #2563eb;
	--est-primary-hover: #1d4ed8;
	--est-primary-soft: #eff4ff;
	--est-ink: #111827;
	--est-muted: #6b7280;
	--est-border: #e5e7eb;
	--est-surface: #ffffff;
	--est-radius: 16px;
	--est-shadow: 0 20px 60px rgba(17, 24, 39, 0.18);
}

.est-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 40px);
}
.est-modal.is-open { display: flex; }

.est-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	backdrop-filter: blur(2px);
}

.est-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: var(--est-surface);
	border-radius: var(--est-radius);
	box-shadow: var(--est-shadow);
	padding: clamp(22px, 4vw, 32px);
	color: var(--est-ink);
	font-family: inherit;
	animation: est-pop 0.18s ease-out;
}
@keyframes est-pop {
	from { transform: translateY(8px) scale(0.98); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

.est-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: var(--est-muted);
	cursor: pointer;
}
.est-modal__close:hover { color: var(--est-ink); }

.est-modal__title {
	margin: 0 0 4px;
	font-size: clamp(1.25rem, 2.4vw, 1.5rem);
	font-weight: 700;
}
.est-modal__sub {
	margin: 0 0 18px;
	color: var(--est-muted);
	font-size: 0.95rem;
}

/* Plan card (confirm step) */
.est-plan-card {
	border: 1px solid var(--est-border);
	border-radius: 12px;
	padding: 16px 18px;
	margin-bottom: 20px;
	background: var(--est-primary-soft);
}
.est-plan-card__name { font-size: 1.15rem; font-weight: 700; }
.est-plan-card__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 6px;
	color: var(--est-muted);
	font-size: 0.92rem;
}
.est-plan-card__price strong { color: var(--est-ink); }

/* Counter */
.est-counter {
	display: grid;
	grid-template-columns: 56px 1fr 56px;
	align-items: stretch;
	border: 1px solid var(--est-border);
	border-radius: 12px;
	overflow: hidden;
	margin: 8px 0 14px;
}
.est-counter__btn {
	border: 0;
	background: #f9fafb;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--est-ink);
	cursor: pointer;
	transition: background 0.15s;
}
.est-counter__btn:hover { background: #f0f1f3; }
.est-counter__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.est-counter__input {
	border: 0;
	border-left: 1px solid var(--est-border);
	border-right: 1px solid var(--est-border);
	text-align: center;
	font-size: 1.7rem;
	font-weight: 700;
	color: var(--est-ink);
	-moz-appearance: textfield;
	width: 100%;
	padding: 14px 0;
}
.est-counter__input::-webkit-outer-spin-button,
.est-counter__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.est-counter__hint,
.est-counter__unit {
	text-align: center;
	color: var(--est-muted);
	font-size: 0.9rem;
	margin: 2px 0;
}
.est-counter__unit strong { color: var(--est-ink); }

/* Total */
.est-total {
	border: 1px solid var(--est-primary);
	background: var(--est-primary-soft);
	border-radius: 12px;
	padding: 16px;
	text-align: center;
	margin: 16px 0 8px;
}
.est-total__label { color: var(--est-primary); font-weight: 700; font-size: 0.9rem; }
.est-total__value { font-size: 1.9rem; font-weight: 800; margin: 2px 0; }
.est-total__calc { color: var(--est-muted); font-size: 0.85rem; }

.est-error {
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 0.88rem;
	margin: 10px 0 0;
}

/* Buttons */
.est-actions { display: flex; gap: 10px; margin-top: 18px; }
.est-actions .est-btn--ghost { flex: 0 0 auto; }
.est-actions .est-btn--primary { flex: 1; }

.est-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	border: 0;
	border-radius: 10px;
	padding: 14px 20px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}
.est-btn--primary { background: var(--est-primary); color: #fff; }
.est-btn--primary:hover { background: var(--est-primary-hover); }
.est-btn--primary:disabled { opacity: 0.7; cursor: wait; }
.est-btn--ghost {
	width: auto;
	background: transparent;
	color: var(--est-muted);
	border: 1px solid var(--est-border);
}
.est-btn--ghost:hover { color: var(--est-ink); }

.est-btn__spinner {
	width: 16px; height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: est-spin 0.7s linear infinite;
}
@keyframes est-spin { to { transform: rotate(360deg); } }

/* Cart page locked quantity */
.est-locked-qty {
	display: inline-block;
	min-width: 2.5em;
	text-align: center;
	font-weight: 600;
}
