/* Viral Campaign Manager — frontend. Scoped under .vcm so themes are unaffected. */

.vcm {
	--vcm-primary: #0f766e;
	--vcm-button: #25d366;
	--vcm-button-text: #ffffff;
	--vcm-font: inherit;
	--vcm-ink: #14201e;
	--vcm-muted: #5b6b68;
	--vcm-line: #dfe7e5;
	--vcm-soft: #f3f7f6;
	--vcm-card: #ffffff;
	--vcm-radius: 14px;
	--vcm-success: #146c43;
	--vcm-success-bg: #e8f6ee;
	--vcm-danger: #b42318;
	--vcm-danger-bg: #fdecea;
	font-family: var(--vcm-font);
	color: var(--vcm-ink);
	line-height: 1.5;
	max-width: 640px;
	margin: 0 auto 2rem;
	-webkit-text-size-adjust: 100%;
	box-sizing: border-box;
}
.vcm *, .vcm *::before, .vcm *::after { box-sizing: inherit; }
.vcm [hidden] { display: none !important; }
.vcm img { max-width: 100%; height: auto; display: block; }

/* Hero */
.vcm-hero {
	background: var(--vcm-card);
	border: 1px solid var(--vcm-line);
	border-radius: var(--vcm-radius);
	overflow: hidden;
	margin-bottom: 1rem;
}
.vcm-hero__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vcm-hero__body { padding: 1.25rem 1.25rem 1.1rem; border-top: 4px solid var(--vcm-primary); }
.vcm-hero__title { margin: 0 0 .5rem; font-size: clamp(1.4rem, 5vw, 1.9rem); line-height: 1.2; color: var(--vcm-ink); }
.vcm-hero__desc { color: var(--vcm-muted); }
.vcm-hero__desc p { margin: 0 0 .6rem; }
.vcm-hero__meta { margin: .5rem 0 0; font-size: .875rem; font-weight: 600; color: var(--vcm-primary); }

/* Reward */
.vcm-reward {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 1rem;
	align-items: start;
	padding: 1.1rem 1.25rem;
	margin-bottom: 1rem;
	border-radius: var(--vcm-radius);
	background: var(--vcm-soft);
	border: 1px solid var(--vcm-line);
}
.vcm-reward:not(:has(.vcm-reward__media)) { grid-template-columns: 1fr; }
.vcm-reward__img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: #fff; }
.vcm-reward__eyebrow { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--vcm-muted); font-weight: 600; }
.vcm-reward__title { margin: .15rem 0 .35rem; font-size: 1.25rem; line-height: 1.25; color: var(--vcm-ink); }
.vcm-reward__value { margin: 0 0 .35rem; font-weight: 600; color: var(--vcm-primary); }
.vcm-reward__desc { font-size: .95rem; color: var(--vcm-muted); }
.vcm-reward__desc p { margin: 0 0 .4rem; }
.vcm-reward__note { margin: .35rem 0 0; font-size: .85rem; font-weight: 600; }
.vcm-reward__tiers { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .9rem; }

/* Steps */
.vcm-steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.vcm-steps li { display: flex; gap: .6rem; align-items: center; padding: .65rem .75rem; border: 1px solid var(--vcm-line); border-radius: 10px; font-size: .9rem; background: var(--vcm-card); margin: 0; }
.vcm-steps__n { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-grid; place-items: center; background: var(--vcm-primary); color: #fff; font-weight: 700; font-size: .85rem; }

/* Panels & forms */
.vcm-app { background: var(--vcm-card); border: 1px solid var(--vcm-line); border-radius: var(--vcm-radius); padding: 1.25rem; margin-bottom: 1rem; }
.vcm-standalone .vcm-app { margin-bottom: 0; }
.vcm-form__title { margin: 0 0 1rem; font-size: 1.15rem; color: var(--vcm-ink); }
.vcm-field { margin: 0 0 .9rem; }
.vcm-field > label, .vcm-field legend { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; padding: 0; }
.vcm-field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.vcm-req { color: var(--vcm-danger); }
.vcm input[type=text], .vcm input[type=tel], .vcm input[type=email], .vcm input[type=number], .vcm select, .vcm textarea {
	width: 100%;
	font: inherit;
	font-size: 16px; /* prevents iOS zoom on focus */
	color: var(--vcm-ink);
	background: #fff;
	border: 1px solid #c7d3d0;
	border-radius: 10px;
	padding: .7rem .8rem;
	min-height: 48px;
	margin: 0;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}
.vcm select { background-image: linear-gradient(45deg, transparent 50%, var(--vcm-muted) 50%), linear-gradient(135deg, var(--vcm-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.vcm input:focus, .vcm select:focus, .vcm textarea:focus { outline: 2px solid var(--vcm-primary); outline-offset: 1px; border-color: var(--vcm-primary); }
.vcm-tel { display: flex; align-items: stretch; }
.vcm-tel__cc { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid #c7d3d0; border-right: 0; border-radius: 10px 0 0 10px; background: var(--vcm-soft); font-weight: 600; color: var(--vcm-muted); }
.vcm-tel input[type=tel] { border-radius: 0 10px 10px 0; letter-spacing: .03em; }
.vcm-help { margin: .3rem 0 0; font-size: .8rem; color: var(--vcm-muted); }
.vcm-field__error { margin: .35rem 0 0; font-size: .85rem; color: var(--vcm-danger); font-weight: 600; }
.vcm-field.has-error input, .vcm-field.has-error select, .vcm-field.has-error textarea, .vcm-field.has-error .vcm-tel__cc { border-color: var(--vcm-danger); }
.vcm-field--check label, .vcm-choice { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; font-size: .9rem; margin: 0 0 .35rem; cursor: pointer; }
.vcm-field--check input, .vcm-choice input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; flex: 0 0 auto; accent-color: var(--vcm-primary); }
.vcm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.vcm-captcha:not(:empty) { margin: .25rem 0 .9rem; }
.vcm-form__error { margin: 0 0 .9rem; padding: .7rem .85rem; border-radius: 10px; background: var(--vcm-danger-bg); color: var(--vcm-danger); font-size: .9rem; font-weight: 600; }
.vcm-form__alt { margin: .9rem 0 0; text-align: center; font-size: .9rem; }

/* Buttons */
.vcm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	width: 100%;
	min-height: 50px;
	padding: .75rem 1rem;
	border: 0;
	border-radius: 12px;
	font: inherit;
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter .15s ease, background-color .15s ease;
}
.vcm-btn:disabled { opacity: .65; cursor: progress; }
.vcm-btn--primary { background: var(--vcm-primary); color: #fff !important; }
.vcm-btn--primary:hover { filter: brightness(1.08); }
.vcm-btn--wa { background: var(--vcm-button); color: var(--vcm-button-text) !important; font-size: 1.05rem; min-height: 56px; margin: .75rem 0 .5rem; }
.vcm-btn--wa:hover { filter: brightness(.96); }
.vcm-btn--ghost { background: transparent; color: var(--vcm-primary) !important; border: 1px solid var(--vcm-line); min-height: 44px; font-size: .92rem; font-weight: 600; }
.vcm-btn--ghost:hover { background: var(--vcm-soft); }
.vcm-btn.is-done { color: var(--vcm-success) !important; border-color: var(--vcm-success); }
.vcm-link { background: none; border: 0; padding: 0; font: inherit; color: var(--vcm-primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; }
.vcm-btn:focus-visible, .vcm-link:focus-visible { outline: 2px solid var(--vcm-primary); outline-offset: 2px; }

/* Alerts */
.vcm-alert { margin: 0 0 1rem; padding: .8rem .95rem; border-radius: 10px; font-size: .95rem; }
.vcm-alert--info { background: var(--vcm-soft); border: 1px solid var(--vcm-line); }
.vcm-alert--success { background: var(--vcm-success-bg); color: var(--vcm-success); border: 1px solid #b7e3c8; font-weight: 600; }
.vcm-alert--big { font-size: 1.02rem; }
.vcm-alert--warn { background: #fff7e6; border: 1px solid #f5d9a8; }
.vcm-status__msg { font-size: 1rem; }
.vcm-status__msg p { margin: 0 0 .6rem; }
.vcm-status__actions { margin: .75rem 0 0; }
.vcm-muted { color: var(--vcm-muted); }
.vcm-small { font-size: .85rem; }
.vcm-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }

/* Dashboard */
.vcm-dash__head { margin-bottom: 1rem; }
.vcm-dash__hello { margin: 0; font-size: 1.25rem; font-weight: 700; }
.vcm-dash__head .vcm-muted { margin: .15rem 0 0; font-size: .88rem; }
.vcm-progress { margin: 0 0 1rem; }
.vcm-progress__top { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; margin-bottom: .4rem; }
.vcm-progress__top strong { font-size: 1.5rem; color: var(--vcm-primary); }
.vcm-progress__bar { height: 12px; border-radius: 999px; background: #e5ecea; overflow: hidden; }
.vcm-progress__bar span { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--vcm-primary); transition: width .4s ease; }
.vcm-progress__status { margin: .45rem 0 0; font-weight: 600; font-size: .95rem; }
.vcm-progress__status.is-eligible { color: var(--vcm-success); }
.vcm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 1rem; }
.vcm-stats > div { background: var(--vcm-soft); border-radius: 10px; padding: .6rem .5rem; text-align: center; }
.vcm-stats dt { font-size: .72rem; color: var(--vcm-muted); text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.vcm-stats dd { margin: .15rem 0 0; font-size: 1.2rem; font-weight: 700; }
.vcm-stats dd.vcm-stats__small { font-size: .85rem; line-height: 1.3; }
.vcm-share { border-top: 1px solid var(--vcm-line); padding-top: 1rem; margin-bottom: 1rem; }
.vcm-share__label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.vcm-copy { display: flex; gap: .5rem; }
.vcm-copy input[type=text] { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; background: var(--vcm-soft); }
.vcm-copy .vcm-btn { width: auto; flex: 0 0 auto; white-space: nowrap; }
.vcm-share__row { display: flex; gap: .5rem; }
.vcm-share__row .vcm-btn { flex: 1; }
.vcm-milestones h4, .vcm-reflist h4, .vcm-section-title { margin: 0 0 .5rem; font-size: 1rem; }
.vcm-milestones ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.vcm-milestones li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border: 1px solid var(--vcm-line); border-radius: 10px; margin-bottom: .35rem; font-size: .9rem; }
.vcm-milestones li.is-reached { background: var(--vcm-success-bg); border-color: #b7e3c8; }
.vcm-mini-reward { display: flex; gap: .75rem; align-items: center; padding: .75rem; border-radius: 10px; background: var(--vcm-soft); margin-bottom: 1rem; }
.vcm-mini-reward img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.vcm-mini-reward span, .vcm-mini-reward strong { display: block; }
.vcm-mini-reward span { font-size: .78rem; }
.vcm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vcm-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 0; }
.vcm-table th, .vcm-table td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--vcm-line); white-space: nowrap; }
.vcm-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--vcm-muted); font-weight: 600; }
.vcm-tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; background: #fff3cd; color: #7a5a00; vertical-align: middle; }
.vcm-tag--muted { background: #eceff1; color: var(--vcm-muted); }
.vcm-dash__foot { margin: 1rem 0 0; text-align: center; font-size: .88rem; }

/* Leaderboard */
.vcm-leaderboard { background: var(--vcm-card); border: 1px solid var(--vcm-line); border-radius: var(--vcm-radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.vcm-leaderboard__list { list-style: none; margin: 0; padding: 0; }
.vcm-leaderboard__list li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--vcm-line); margin: 0; }
.vcm-leaderboard__list li:last-child { border-bottom: 0; }
.vcm-lb__rank { width: 1.8rem; height: 1.8rem; display: inline-grid; place-items: center; border-radius: 50%; background: var(--vcm-soft); font-weight: 700; font-size: .85rem; }
.vcm-lb__name { flex: 1; }
.vcm-lb__name small { color: var(--vcm-muted); }
.vcm-lb__n { font-weight: 700; color: var(--vcm-primary); }

/* Terms */
.vcm-terms { border: 1px solid var(--vcm-line); border-radius: var(--vcm-radius); padding: .8rem 1.1rem; background: var(--vcm-card); }
.vcm-terms summary { cursor: pointer; font-weight: 600; }
.vcm-terms__body { font-size: .9rem; color: var(--vcm-muted); margin-top: .5rem; }

/* Progress widget */
.vcm-progress-widget { background: var(--vcm-card); border: 1px solid var(--vcm-line); border-radius: var(--vcm-radius); padding: 1rem 1.25rem; }
.vcm-progress-widget .vcm-progress { margin: 0; }
.vcm-public-stats__row { margin: 0; font-size: .95rem; }
.vcm-public-stats__row strong { color: var(--vcm-primary); }
.vcm-missing { padding: .75rem; border: 1px dashed #c00; color: #c00; }

@media (max-width: 480px) {
	.vcm-app, .vcm-hero__body, .vcm-reward, .vcm-leaderboard { padding-left: 1rem; padding-right: 1rem; }
	.vcm-steps { grid-template-columns: 1fr; }
	.vcm-stats { grid-template-columns: repeat(2, 1fr); }
	.vcm-reward { grid-template-columns: 72px 1fr; }
	.vcm-reward__img { width: 72px; height: 72px; }
	.vcm-copy { flex-direction: column; }
	.vcm-copy .vcm-btn { width: 100%; }
	.vcm-share__row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	.vcm-progress__bar span, .vcm-btn { transition: none; }
}

/* Banner (standalone section so the form can follow it directly) */
.vcm-banner { margin-bottom: 1rem; border-radius: var(--vcm-radius); overflow: hidden; border: 1px solid var(--vcm-line); background: var(--vcm-soft); }
.vcm-banner__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Countdown timer */
.vcm-timer { margin-bottom: 1rem; padding: 1rem 1.25rem 1.1rem; border-radius: var(--vcm-radius); background: var(--vcm-primary); color: #fff; text-align: center; }
.vcm-timer__label { margin: 0 0 .6rem; font-weight: 600; font-size: .95rem; letter-spacing: .02em; color: #fff; }
.vcm-timer__boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; max-width: 420px; margin: 0 auto; }
.vcm-timer__box { background: rgba(255,255,255,.14); border-radius: 10px; padding: .55rem .25rem .45rem; }
.vcm-timer__num { display: block; font-size: clamp(1.5rem, 7vw, 2rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.vcm-timer__unit { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; margin-top: .15rem; }
.vcm-timer__date { margin: .6rem 0 0; font-size: .8rem; opacity: .85; color: #fff; }
.vcm-timer.is-urgent .vcm-timer__box { background: rgba(255,255,255,.24); }
.vcm-timer.is-done .vcm-timer__boxes { opacity: .5; }

/* Gift list */
.vcm-gifts { margin-bottom: 1rem; }
.vcm-gifts__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.vcm-gift { background: var(--vcm-card); border: 1px solid var(--vcm-line); border-radius: var(--vcm-radius); overflow: hidden; display: flex; flex-direction: column; }
.vcm-gift__media { aspect-ratio: 1 / 1; background: var(--vcm-soft); }
.vcm-gift__media--empty { aspect-ratio: 3 / 1; }
.vcm-gift__img { width: 100%; height: 100%; object-fit: cover; }
.vcm-gift__body { padding: .7rem .8rem .85rem; }
.vcm-gift__badge { display: inline-block; margin-bottom: .3rem; padding: .1rem .5rem; border-radius: 999px; background: var(--vcm-primary); color: #fff; font-size: .72rem; font-weight: 700; }
.vcm-gift__title { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--vcm-ink); }
.vcm-gift__value { margin: .2rem 0 0; font-weight: 600; font-size: .88rem; color: var(--vcm-primary); }
.vcm-gift__desc { margin: .3rem 0 0; font-size: .85rem; color: var(--vcm-muted); }
.vcm-milestones li { align-items: center; }
.vcm-milestones li img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.vcm-milestones li span { flex: 1; }
@media (max-width: 480px) {
	.vcm-gifts__grid { grid-template-columns: repeat(2, 1fr); }
	.vcm-timer { padding-left: 1rem; padding-right: 1rem; }
}

