/* ============================================================
   Live Embed Counters — /embed-counters
   Styled with the v2-editorial design tokens (.v2 wrapper) so it
   matches our counter landing pages: brand blue, Fraunces serif,
   cream/ink bands. No ad-hoc gradients or off-brand colors.
   ============================================================ */

/* Any element carrying the hidden attribute stays hidden — a class display rule
   (e.g. .ec-qty-row's display:flex) must never override it. */
.v2 [hidden] { display: none !important; }

/* ---------- hero bullet points ---------- */
.v2 .ec-hero-points { list-style:none; margin:1.6rem 0 0; padding:0; display:flex; flex-wrap:wrap; gap:1rem 1.75rem; }
.v2 .ec-hero-points li { display:flex; align-items:center; gap:.6rem; font-size:.95rem; color:var(--muted); font-weight:500; }
.v2 .ec-hero-points li span {
    display:inline-flex; align-items:center; justify-content:center;
    width:2rem; height:2rem; border-radius:50%;
    background:var(--accent-soft); color:var(--accent-deep);
    font-family:'Fraunces',serif; font-weight:800; font-size:1rem;
}

/* ---------- the builder tool ---------- */
.v2 .ec-tool { display:flex; flex-direction:column; gap:1.1rem; }

.v2 .ec-preview {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:.2rem; min-height:118px; border-radius:14px;
    border:1px solid var(--rule); background:var(--cream); padding:1rem 1rem 1.1rem;
}
.v2 .ec-num { font-family:'Fraunces',serif; font-weight:800; font-size:48px; line-height:1; color:var(--accent); letter-spacing:-.01em; }
.v2 .ec-lab { font-size:.85rem; color:var(--muted); }
.v2 .ec-sub { font-size:.75rem; color:var(--muted); }
.v2 .ec-dot { width:9px; height:9px; border-radius:50%; background:var(--accent); animation:ecpulse 1.9s infinite; }
@keyframes ecpulse { 0%{box-shadow:0 0 0 0 var(--accent-glow)} 70%{box-shadow:0 0 0 8px transparent} 100%{box-shadow:0 0 0 0 transparent} }

.v2 .ec-fields { display:flex; flex-direction:column; gap:.9rem; }
.v2 .ec-field { display:flex; flex-direction:column; gap:.4rem; }
/* Respect the hidden attribute: .ec-field's display:flex otherwise wins over [hidden]
   (class beats attribute), leaving the event-only date fields visible on every type. */
.v2 .ec-field[hidden] { display:none; }
.v2 .ec-field-row { display:flex; gap:.75rem; }
.v2 .ec-field-grow { flex:1; }
.v2 .ec-field > label { font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
.v2 .ec-field input[type=text] {
    width:100%; padding:.62rem .7rem; border:1px solid var(--rule-strong); border-radius:9px;
    background:var(--cream); color:var(--ink); font-size:.95rem; font-family:inherit;
}
.v2 .ec-field input[type=text]:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.v2 .ec-hint { font-size:.8rem; color:var(--muted); margin:.1rem 0 0; }

/* segmented controls */
.v2 .ec-seg { display:flex; gap:.35rem; }
.v2 .ec-seg button {
    flex:1; padding:.55rem .4rem; border:1px solid var(--rule-strong); border-radius:9px;
    background:var(--cream); color:var(--ink-soft); font-size:.82rem; font-weight:600;
    font-family:inherit; cursor:pointer; transition:background .12s, border-color .12s, color .12s;
}
.v2 .ec-seg button:hover { border-color:var(--accent); }
.v2 .ec-seg button.is-active { background:var(--accent); border-color:var(--accent); color:#fff; }

/* swatches */
.v2 .ec-swatches { display:flex; gap:.4rem; }
.v2 .ec-swatches button { width:1.9rem; height:1.9rem; border-radius:8px; background:var(--sw); border:2px solid var(--rule); cursor:pointer; padding:0; }
.v2 .ec-swatches button.is-active { border-color:var(--ink); box-shadow:0 0 0 2px var(--cream), 0 0 0 4px var(--sw); }

/* event date-range calendar (click a start day, then an end day) — compact */
.v2 .ec-cal { border:1px solid var(--rule-strong); border-radius:9px; padding:.4rem; background:var(--cream); }
.v2 .ec-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:.3rem; }
.v2 .ec-cal-title { font-family:'Fraunces',serif; font-weight:800; font-size:.82rem; color:var(--ink); }
.v2 .ec-cal-nav { width:1.65rem; height:1.65rem; border:1px solid var(--rule-strong); border-radius:6px; background:#fff; color:var(--ink); font-size:1rem; line-height:1; cursor:pointer; font-family:inherit; padding:0; }
.v2 .ec-cal-nav:hover:not(:disabled) { border-color:var(--accent); color:var(--accent-deep); }
.v2 .ec-cal-nav:disabled { opacity:.35; cursor:default; }
.v2 .ec-cal-dow { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; margin-bottom:1px; }
.v2 .ec-cal-dow span { text-align:center; font-size:.55rem; font-weight:700; color:var(--muted); text-transform:uppercase; }
.v2 .ec-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; }
.v2 .ec-cal-day { width:100%; min-height:1.65rem; border:none; border-radius:6px; background:transparent; color:var(--ink); font-size:.78rem; font-family:inherit; cursor:pointer; padding:0; }
.v2 .ec-cal-day:hover:not(.is-disabled) { background:var(--accent-soft); }
.v2 .ec-cal-day.is-today { box-shadow:inset 0 0 0 1px var(--rule-strong); }
.v2 .ec-cal-day.is-disabled { color:var(--rule); cursor:default; }
.v2 .ec-cal-day.is-range { background:var(--accent-soft); color:var(--accent-deep); border-radius:0; }
.v2 .ec-cal-day.is-start, .v2 .ec-cal-day.is-end, .v2 .ec-cal-day.is-single { background:var(--accent); color:#fff; font-weight:700; }
.v2 .ec-cal-day.is-start { border-radius:6px 0 0 6px; }
.v2 .ec-cal-day.is-end { border-radius:0 6px 6px 0; }
.v2 .ec-cal-day.is-single { border-radius:6px; }

/* event time slot + timezone */
.v2 .ec-when-cap { font-size:.66rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
.v2 .ec-time-row { display:flex; gap:.6rem; margin-top:.6rem; }
.v2 .ec-time-cell { display:flex; flex-direction:column; gap:.25rem; flex:1 1 0; min-width:0; }
.v2 .ec-tz-cell { margin-top:.6rem; }
.v2 .ec-time-input, .v2 .ec-tz-select {
    width:100%; padding:.55rem .6rem; border:1px solid var(--rule-strong); border-radius:9px;
    background:var(--cream); color:var(--ink); font-size:.9rem; font-family:inherit;
}
.v2 .ec-time-input:focus, .v2 .ec-tz-select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }

/* "grab another counter" link + quantity stepper + trial note */
.v2 .ec-linkbtn { background:none; border:none; padding:0; color:var(--accent-deep); font:inherit; text-decoration:underline; cursor:pointer; }
.v2 .ec-linkbtn:hover { color:var(--accent); }
.v2 .ec-qty-row { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-top:.5rem; }
.v2 .ec-qty-control { display:inline-flex; align-items:center; border:1px solid var(--rule-strong); border-radius:9px; overflow:hidden; }
.v2 .ec-qty-btn { width:2rem; height:2rem; border:none; background:var(--cream); color:var(--ink); font-size:1.1rem; line-height:1; cursor:pointer; font-family:inherit; }
.v2 .ec-qty-btn:hover { background:var(--accent-soft); color:var(--accent-deep); }
.v2 .ec-qty-input { width:2.8rem; height:2rem; border:none; border-left:1px solid var(--rule); border-right:1px solid var(--rule); text-align:center; background:#fff; color:var(--ink); font-size:.9rem; font-family:inherit; -moz-appearance:textfield; }
.v2 .ec-qty-input::-webkit-outer-spin-button, .v2 .ec-qty-input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.v2 .ec-qty-note { font-size:.8rem; color:var(--muted); }
.v2 .ec-trial-note { text-align:center; margin:.75rem 0 0; font-size:.82rem; color:var(--ink-soft); }

.v2 .ec-get { width:100%; justify-content:center; margin-top:.15rem; }

/* gated result */
.v2 .ec-result { border-top:1px solid var(--rule); padding-top:1.1rem; margin-top:.15rem; }
.v2 .ec-result h3 { font-family:'Fraunces',serif; font-size:1.2rem; margin:0 0 .4rem; color:var(--ink); }
.v2 .ec-result p { font-size:.9rem; color:var(--ink-soft); margin:0 0 .9rem; line-height:1.5; }
.v2 .ec-result .ec-r-site { color:var(--accent-deep); font-weight:700; }
.v2 .ec-result-ctas { display:flex; flex-direction:column; gap:.5rem; }
.v2 .ec-result-ctas .v2-btn { width:100%; justify-content:center; }
.v2 .ec-alt {
    display:inline-block; margin-top:.8rem; padding:0; font-size:.83rem; color:var(--muted);
    text-decoration:underline; cursor:pointer; background:none; border:none; font-family:inherit;
}
.v2 .ec-alt:hover { color:var(--accent-deep); }
.v2 .ec-save { display:inline-block; margin-left:.4rem; font-size:.7rem; font-weight:700; color:var(--accent-deep); background:var(--accent-soft); padding:.1rem .4rem; border-radius:5px; }

/* ---------- bands (how it works / pricing) ---------- */
.v2 .ec-band { padding:4rem 1.25rem; }
.v2 .ec-band-ink { background:var(--ink); color:var(--cream); }
.v2 .ec-band-ink .ec-h2, .v2 .ec-band-ink .ec-step h3 { color:var(--cream); }
.v2 .ec-band-ink .ec-step p, .v2 .ec-band-ink .ec-snippet-eg { color:var(--muted-light); }
.v2 .ec-band-cream { background:var(--cream); color:var(--ink); }
.v2 .ec-band-paper { background:var(--paper); color:var(--ink); }
.v2 .ec-wrap { max-width:940px; margin:0 auto; }
.v2 .ec-h2 { font-size:clamp(1.6rem, 4vw, 2.4rem); font-weight:800; text-align:center; margin:0 0 2.2rem; line-height:1.1; }

.v2 .ec-steps { display:grid; grid-template-columns:repeat(3, 1fr); gap:1.75rem; }
.v2 .ec-step-n {
    display:inline-flex; align-items:center; justify-content:center; width:2.5rem; height:2.5rem;
    border-radius:50%; background:var(--accent); color:#fff; font-family:'Fraunces',serif;
    font-weight:800; font-size:1.1rem; margin-bottom:.7rem;
}
.v2 .ec-step h3 { font-family:'Fraunces',serif; font-size:1.15rem; margin:0 0 .35rem; }
.v2 .ec-step p { font-size:.92rem; margin:0; line-height:1.5; }
.v2 .ec-snippet-eg { text-align:center; margin:2.2rem 0 0; font-size:.85rem; }

/* "three things you can count" cards */
.v2 .ec-types { display:grid; grid-template-columns:repeat(3, 1fr); gap:1.25rem; }
.v2 .ec-type-card { background:#fff; border:1px solid var(--rule); border-radius:14px; padding:1.5rem; }
.v2 .ec-type-card h3 { font-size:1.25rem; margin:0 0 .35rem; color:var(--ink); }
.v2 .ec-type-what { font-weight:700; color:var(--accent-deep); font-size:.95rem; margin:0 0 .55rem; }
.v2 .ec-type-card p:last-child { font-size:.9rem; color:var(--ink-soft); margin:0; line-height:1.55; }
.v2 .ec-types-note { text-align:center; margin:1.9rem 0 0; font-size:.9rem; color:var(--muted); }

/* pricing */
.v2 .ec-plans { display:grid; grid-template-columns:repeat(2, 1fr); gap:1.25rem; max-width:720px; margin:0 auto; }
.v2 .ec-plan { background:#fff; border:1px solid var(--rule); border-radius:16px; padding:1.7rem; display:flex; flex-direction:column; }
.v2 .ec-plan-pro { border-color:var(--accent); box-shadow:0 10px 34px var(--accent-soft); }
.v2 .ec-plan-top { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:1.1rem; }
.v2 .ec-plan-name { font-family:'Fraunces',serif; font-weight:800; font-size:1.3rem; color:var(--ink); }
.v2 .ec-plan-price { font-family:'Fraunces',serif; font-weight:800; font-size:1.65rem; color:var(--accent-deep); }
.v2 .ec-plan-price small { font-size:.85rem; color:var(--muted); font-weight:400; }
.v2 .ec-plan ul { list-style:none; margin:0 0 1.3rem; padding:0; display:flex; flex-direction:column; gap:.55rem; flex:1; }
.v2 .ec-plan li { position:relative; padding-left:1.5rem; font-size:.92rem; color:var(--ink-soft); }
.v2 .ec-plan li::before { content:"✓"; position:absolute; left:0; color:var(--accent); font-weight:800; }
.v2 .ec-plan-cta { width:100%; justify-content:center; }
.v2 .ec-plan-ctas { display:flex; flex-direction:column; gap:.5rem; }
.v2 .ec-plan-ctas .v2-btn { width:100%; justify-content:center; }
.v2 .ec-trial { display:block; text-align:center; margin-top:.8rem; font-size:.85rem; color:var(--muted); text-decoration:underline; }
.v2 .ec-trial:hover { color:var(--accent-deep); }
.v2 .ec-fine { text-align:center; margin:1.6rem 0 0; font-size:.8rem; color:var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
    .v2 .ec-steps { grid-template-columns:1fr; gap:1.25rem; }
    .v2 .ec-types { grid-template-columns:1fr; }
    .v2 .ec-plans { grid-template-columns:1fr; }
    .v2 .ec-band { padding:3rem 1.1rem; }
}
