/* Welcome pop-up and its editor. Self-contained: it also loads in wp-admin. */

.vs-wl-overlay {
	--card: #0f1115; --ink: #f2f2f4; --muted: #a4a6b0; --accent: #e8395a; --accent-ink: #fff;
	--panel: #15181d; --line: rgba(255,255,255,.08); --numeral: transparent;
	position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 20px;
	background: rgba(5,6,8,.78); font-family: 'Inter', -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
	opacity: 0; transition: opacity .4s ease;
}
.vs-wl-overlay.is-open { opacity: 1; }
.vs-wl-overlay, .vs-wl-overlay * { box-sizing: border-box; }

.vs-wl-overlay.vs-wl-crimson {
	--card: #a91f40; --ink: #fff; --muted: rgba(255,255,255,.82); --accent: #fff; --accent-ink: #a91f40;
	--panel: rgba(0,0,0,.2); --line: rgba(255,255,255,.14);
}
.vs-wl-overlay.vs-wl-paper {
	--card: #f7f4ee; --ink: #1a2744; --muted: #566074; --accent: #9b2335; --accent-ink: #fff;
	--panel: #ebe5d8; --line: rgba(26,39,68,.1);
	background: rgba(20,24,34,.7);
}

.vs-wl-card {
	position: relative; width: 100%; max-width: 860px; min-height: 540px; display: grid; grid-template-columns: 0.9fr 1.3fr;
	background: var(--card); color: var(--ink); border-radius: 20px; overflow: hidden;
	box-shadow: 0 30px 80px rgba(0,0,0,.55); border: 1px solid var(--line);
	transform: translateY(22px) scale(.97); opacity: 0; transition: transform .55s cubic-bezier(.2,.8,.2,1) .1s, opacity .45s ease .1s;
}
.vs-wl-overlay.is-open .vs-wl-card { transform: none; opacity: 1; }
.vs-wl-midnight .vs-wl-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), transparent 70%); z-index: 2; }

.vs-wl-visual {
	position: relative; background: var(--panel); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 540px;
	background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 36px 36px;
}
.vs-wl-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: vs-wl-fade .7s ease both; }
.vs-wl-numeral {
	font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 220px; line-height: 1; letter-spacing: -.04em; user-select: none;
	color: transparent; -webkit-text-stroke: 2px var(--accent); animation: vs-wl-rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.vs-wl-crimson .vs-wl-numeral { -webkit-text-stroke-color: rgba(255,255,255,.9); }

.vs-wl-content { display: flex; flex-direction: column; padding: 44px 46px 34px; min-width: 0; }
.vs-wl-step { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.vs-wl-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 22px 0; }
.vs-wl-stage > * { animation: vs-wl-rise .6s cubic-bezier(.2,.8,.2,1) both; }
.vs-wl-stage > *:nth-child(2) { animation-delay: .08s; }
.vs-wl-stage > *:nth-child(3) { animation-delay: .16s; }
.vs-wl-title { font-family: 'Space Grotesk', Georgia, sans-serif; font-weight: 700; font-size: 36px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; color: var(--ink); }
.vs-wl-paper .vs-wl-title { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
.vs-wl-body { font-size: 17px; line-height: 1.65; color: var(--muted); margin: 0; max-width: 44ch; }

.vs-wl-ctas { display: grid; gap: 10px; margin-top: 26px; }
.vs-wl-cta { display: block; text-align: left; text-decoration: none; cursor: pointer; font: inherit; width: 100%; padding: 15px 18px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.vs-wl-cta:hover { transform: translateY(-2px); border-color: var(--accent); }
.vs-wl-cta strong { display: block; font-size: 16px; font-weight: 700; }
.vs-wl-cta span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.vs-wl-cta.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vs-wl-cta.is-primary span { color: inherit; opacity: .85; }
.vs-wl-ctas .vs-wl-cta { animation: vs-wl-rise .55s cubic-bezier(.2,.8,.2,1) both; }
.vs-wl-ctas .vs-wl-cta:nth-child(2) { animation-delay: .1s; }

.vs-wl-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vs-wl-dots { display: flex; gap: 6px; }
.vs-wl-dot { width: 26px; height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.vs-wl-dot::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s ease; }
.vs-wl-dot.is-done::after, .vs-wl-dot.is-active::after { transform: scaleX(1); }
.vs-wl-nav { display: flex; gap: 8px; }
.vs-wl-btn { font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; border-radius: 10px; padding: 11px 20px; border: 1px solid var(--line); background: transparent; color: var(--ink); transition: transform .2s ease, border-color .2s ease; }
.vs-wl-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.vs-wl-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vs-wl-btn[hidden] { display: none; }
.vs-wl-close { position: absolute; top: 14px; right: 16px; z-index: 3; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: transparent; border: 0; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
.vs-wl-close:hover { color: var(--ink); }
.vs-wl-visual + .vs-wl-content .vs-wl-step { margin-right: 60px; }

@keyframes vs-wl-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes vs-wl-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 720px) {
	.vs-wl-overlay { align-items: center; padding: 14px; }
	.vs-wl-card { grid-template-columns: 1fr; min-height: 0; max-height: 90vh; overflow-y: auto; border-radius: 20px; transform: translateY(18px) scale(.98); }
	.vs-wl-visual { min-height: 130px; height: 130px; }
	.vs-wl-numeral { font-size: 100px; }
	.vs-wl-content { padding: 26px 22px 24px; }
	.vs-wl-title { font-size: 28px; }
	.vs-wl-body { font-size: 16px; }
	.vs-wl-btn, .vs-wl-cta { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
	.vs-wl-overlay, .vs-wl-card { transition: opacity .2s ease; transform: none; }
	.vs-wl-stage > *, .vs-wl-numeral, .vs-wl-visual img, .vs-wl-ctas .vs-wl-cta { animation: none; }
}

/* ===================== Editor (portal + wp-admin) ===================== */
.vs-wle { max-width: 880px; --wle-line: rgba(128,128,128,.32); --wle-soft: rgba(128,128,128,.1); --wle-accent: #e8395a; }
.vs-wle * { box-sizing: border-box; }
.vs-wle-block { border: 1px solid var(--wle-line); border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; background: var(--wle-soft); }
.vs-wle-block h3 { margin: 0 0 4px; font-size: 16px; }
.vs-wle-hint { margin: 0 0 14px; font-size: 13px; opacity: .7; }
.vs-wle-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.vs-wle-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vs-wle-style { cursor: pointer; border: 2px solid var(--wle-line); border-radius: 12px; padding: 10px; background: transparent; color: inherit; font: inherit; text-align: left; transition: border-color .2s ease, transform .2s ease; }
.vs-wle-style:hover { transform: translateY(-2px); }
.vs-wle-style.is-selected { border-color: var(--wle-accent); }
.vs-wle-swatch { height: 70px; border-radius: 8px; margin-bottom: 8px; position: relative; overflow: hidden; }
.vs-wle-swatch::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 38%; opacity: .9; }
.vs-wle-swatch::after { content: ""; position: absolute; left: 46%; top: 22px; width: 40%; height: 8px; border-radius: 4px; box-shadow: 0 16px 0 -2px currentColor; background: currentColor; opacity: .75; }
.vs-wle-swatch.s-midnight { background: #0f1115; color: #f2f2f4; } .vs-wle-swatch.s-midnight::before { background: #1b1f26; border-right: 2px solid #e8395a; }
.vs-wle-swatch.s-crimson { background: #a91f40; color: #fff; } .vs-wle-swatch.s-crimson::before { background: rgba(0,0,0,.22); }
.vs-wle-swatch.s-paper { background: #f7f4ee; color: #1a2744; } .vs-wle-swatch.s-paper::before { background: #ebe5d8; }
.vs-wle-style strong { font-size: 14px; }
.vs-wle-slide { border: 1px solid var(--wle-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: rgba(128,128,128,.06); animation: vs-wl-rise .35s ease both; }
.vs-wle-slide-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.vs-wle-slide-tools { display: flex; gap: 6px; }
.vs-wle button.vs-wle-mini { font: inherit; font-size: 12px; cursor: pointer; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--wle-line); background: transparent; color: inherit; }
.vs-wle button.vs-wle-mini:hover { border-color: var(--wle-accent); }
.vs-wle label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.vs-wle label input[type=text], .vs-wle label textarea { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; }
.vs-wle textarea { min-height: 70px; resize: vertical; }
.vs-wle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vs-wle-imgrow { display: flex; gap: 8px; align-items: flex-end; }
.vs-wle-imgrow label { flex: 1; margin-bottom: 0; }
.vs-wle-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vs-wle-status { font-size: 13px; opacity: .8; }
@media (max-width: 640px) { .vs-wle-styles, .vs-wle-row { grid-template-columns: 1fr; } }
