/**
 * Checkout v2 — single-page order form (webform.webform.checkout_v2.yml).
 *
 * Ported 1:1 from html/Checkout.css + the inline styles in html/Checkout.html.
 * Everything here is scoped under .cv2 (the webform's own #attributes.class,
 * see settings.form_attributes in the webform config) so it can never leak
 * into or collide with the older wizard-based `checkout` webform, which
 * reuses generic Bootstrap .form-check/.form-control styling instead.
 */

.cv2 { }
.cv2 .cv2-intro { padding-top: 0; padding-bottom: 10px; }
.cv2-eyebrow { font-family: 'Space Grotesk', sans-serif; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #FF2D6B; font-weight: 600; }
.cv2-h1 { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 40px; letter-spacing: -.02em; margin: 8px 0 0; color: #0F0F12; }
.cv2-sub { color: #6A6A72; font-size: 16px; margin: 8px 0 0; }

.cv2-step-title { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 22px; margin: 30px 0 16px; color: #0F0F12; }

/* 1 · Packs */
.cv2-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 10px; }
@media (max-width: 900px) { .cv2-packs { grid-template-columns: 1fr; } }

.cv2-pack-card { box-sizing: border-box; text-align: left; cursor: pointer; background: #fff; border-radius: 18px; padding: 26px; position: relative; font-family: 'Manrope', sans-serif; border: 1px solid #E6E6EA; display: block; width: 100%; transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, border-color .2s ease; }
.cv2-pack-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 15, 18, .09); }
.cv2-pack-card:active { transform: translateY(-1px) scale(.99); }
.cv2-pack-card.is-selected { border: 2px solid #FF2D6B; box-shadow: 0 24px 50px rgba(255, 45, 107, .16); }
.cv2-pack-card.is-selected:hover { transform: translateY(-3px); box-shadow: 0 28px 54px rgba(255, 45, 107, .2); }
@media (prefers-reduced-motion: reduce) {
  .cv2-pack-card { transition: none; }
  .cv2-pack-card:hover, .cv2-pack-card.is-selected:hover { transform: none; }
}
.cv2-pack-badge { position: absolute; top: -12px; left: 24px; background: #FF2D6B; color: #fff; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; opacity: 0; transform: translateY(4px) scale(.9); transition: opacity .2s ease, transform .2s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.cv2-pack-card.is-selected .cv2-pack-badge { opacity: 1; transform: translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce) { .cv2-pack-badge { transition: none; } }
.cv2-pack-cat { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9A9AA2; }
.cv2-pack-name { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 22px; margin: 6px 0 4px; color: #0F0F12; }
.cv2-pack-desc { font-size: 13px; color: #6A6A72; line-height: 1.5; min-height: 52px; }
.cv2-pack-price { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 26px; margin: 12px 0 2px; color: #0F0F12; }
.cv2-pack-price span { font-size: 13px; color: #9A9AA2; font-weight: 600; }
.cv2-pack-eur { font-size: 13px; color: #FF2D6B; font-weight: 700; }
.cv2-pack-divider { height: 1px; background: #EEE; margin: 16px 0; }
.cv2-pack-includes { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #3A3A42; }

/* Main two-column layout */
.cv2-main-grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: 28px; align-items: start; padding-top: 34px; padding-bottom: 20px; }
@media (max-width: 980px) { .cv2-main-grid { grid-template-columns: 1fr; } }
.cv2-left-col { display: flex; flex-direction: column; gap: 22px; }

.cv2-section { background: #fff; border-radius: 18px; padding: 28px; }
.cv2-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; flex-wrap: wrap; gap: 8px; }
.cv2-section-title { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 20px; color: #0F0F12; }
.cv2-badge { font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; }
.cv2-badge--onetime { color: #FF8A3D; background: #FFF1E7; }
.cv2-badge--monthly { color: #7A3BFF; background: #EDE7FF; }
.cv2-section-sub { font-size: 14px; color: #6A6A72; margin: 0 0 16px; }

/* 2 & 3 · One-time / monthly option rows */
.cv2-opt-list { display: flex; flex-direction: column; gap: 10px; }
.cv2-opt-row { box-sizing: border-box; cursor: pointer; text-align: left; font-family: 'Manrope', sans-serif; background: #FBFBFC; border: 1px solid #ECECEF; border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; }
.cv2-opt-row[hidden] { display: none; }
.cv2-opt-name { font-weight: 700; font-size: 15px; color: #0F0F12; }
.cv2-opt-desc { font-size: 13px; color: #6A6A72; }
.cv2-opt-right { display: flex; align-items: center; gap: 14px; flex: none; }
.cv2-opt-price { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; color: #0F0F12; }
.cv2-opt-row--month .cv2-opt-price { color: #7A3BFF; }
.cv2-track { width: 44px; height: 26px; border-radius: 999px; position: relative; display: inline-block; flex: none; background: #D4D4D8; transition: background .15s ease; }
.cv2-track.is-on { background: #FF2D6B; }
.cv2-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .2s ease; }
.cv2-track.is-on .cv2-knob { left: 21px; }
.cv2-more { margin-top: 14px; background: none; border: 0; color: #FF2D6B; font-weight: 700; font-size: 14px; cursor: pointer; font-family: 'Manrope', sans-serif; padding: 0; }

/* 4 · Details */
.cv2-detail-stack { display: flex; flex-direction: column; gap: 12px; }
.cv2-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .cv2-detail-grid { grid-template-columns: 1fr; } }
.cv2-detail-grid .form-item,
.cv2-detail-stack .form-item { margin: 0; }
.cv2-detail-stack textarea.form-control { height: 96px; resize: none; }

/* 5 · Payment methods */
.cv2-methods { display: flex; flex-direction: column; gap: 12px; }
.cv2-method-row { box-sizing: border-box; width: 100%; cursor: pointer; text-align: left; font-family: 'Manrope', sans-serif; background: #fff; border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 16px; border: 1px solid #E6E6EA; }
.cv2-method.is-selected .cv2-method-row { border: 2px solid #FF2D6B; }
.cv2-method-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; background: #F4F4F6; }
.cv2-method.is-selected .cv2-method-icon { background: #FFE7EF; }
.cv2-method-name { font-weight: 800; font-size: 16px; color: #0F0F12; }
.cv2-method-benefit { font-size: 13px; color: #6A6A72; }
.cv2-method-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; background: #fff; border: 2px solid #D4D4D8; box-sizing: border-box; }
.cv2-method.is-selected .cv2-method-dot { background: #FF2D6B; border: 6px solid #FF2D6B; }
.cv2-method-detail { display: none; background: #F4F4F6; border-radius: 0 0 14px 14px; margin-top: -6px; padding: 16px 18px; font-size: 14px; color: #3A3A42; line-height: 1.6; }
.cv2-method.is-selected .cv2-method-detail { display: block; }
.cv2-secure-note { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: #9A9AA2; }

/* Summary sidebar */
.cv2-right-col { position: sticky; top: 90px; }
@media (max-width: 980px) { .cv2-right-col { position: static; } }
.cv2-summary { background: #0F0F12; color: #fff; border-radius: 20px; padding: 28px; }
.cv2-summary-title { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.cv2-summary-selected { font-size: 13px; color: #9A9AA2; margin-bottom: 20px; }
.cv2-summary-rows { display: flex; flex-direction: column; gap: 13px; font-size: 15px; }
.cv2-row { display: flex; justify-content: space-between; align-items: baseline; }
.cv2-row-label { color: #C9C9D2; }
.cv2-row-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.cv2-annual-hint { display: none; color: #7A3BFF; font-size: 11px; font-weight: 700; }
.cv2-discount-row { display: none; justify-content: space-between; align-items: baseline; }
.cv2-discount-row .cv2-row-label { color: #7A3BFF; }
.cv2-discount-row .cv2-row-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: #7A3BFF; }
.cv2-invoice-rows { display: none; flex-direction: column; gap: 13px; }
.cv2-divider { height: 1px; background: rgba(255, 255, 255, .12); }
.cv2-tva-value { color: #FF8A3D; }
.cv2-summary-divider { height: 1px; background: rgba(255, 255, 255, .15); margin: 20px 0; }
.cv2-grand-row { display: flex; justify-content: space-between; align-items: flex-end; }
.cv2-grand-caption { font-size: 13px; color: #9A9AA2; }
.cv2-grand-year { font-size: 12px; color: #6A6A72; }
.cv2-grand-mad { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 34px; line-height: 1; text-align: right; }
.cv2-grand-eur { font-size: 14px; color: #FF2D6B; font-weight: 700; margin-top: 4px; text-align: right; }
@media (prefers-reduced-motion: no-preference) { .cv2-pulse { animation: cv2Pulse .5s ease; } }
@keyframes cv2Pulse { 0% { color: #FF2D6B; } 100% { color: #fff; } }

.cv2-toggle-wrap { margin-top: 20px; display: none; }
.cv2-toggle { box-sizing: border-box; width: 100%; cursor: pointer; font-family: 'Manrope', sans-serif; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }

/* These interactive rows/cards are plain <div role="button" tabindex="0">,
 * not real <button> elements — Drupal's webform_markup renderer strips
 * <button>/<form>/<input> tags out of raw '#markup' content (a real bug hit
 * on first live deploy: every pack card, option row, payment method and
 * toggle silently lost its wrapping tag, class and click target). Divs pass
 * through untouched, but they need an explicit focus style since browsers
 * don't draw one automatically the way they do for a real <button>. */
.cv2-pack-card:focus-visible,
.cv2-opt-row:focus-visible,
.cv2-method-row:focus-visible,
.cv2-more:focus-visible,
.cv2-toggle:focus-visible {
  outline: 2px solid #FF2D6B;
  outline-offset: 2px;
}
.cv2-toggle-title { font-weight: 700; font-size: 14px; color: #fff; }
.cv2-toggle-desc { font-size: 12px; color: #9A9AA2; }
.cv2-invoice-toggle-wrap { margin-top: 12px; }
.cv2-invoice-fields { display: none; margin-top: 12px; flex-direction: column; gap: 10px; }
.cv2-invoice-fields .cv2-detail-grid { gap: 10px; }
.cv2-invoice-fields .form-control { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #fff; height: 46px; }
.cv2-invoice-fields .form-control::placeholder { color: rgba(255, 255, 255, .5); }
.cv2-invoice-fields .form-control:focus { box-shadow: 0 0 0 3px rgba(255, 45, 107, .25); }

.cv2-actions-wrap.webform-actions,
.cv2-actions-wrap { margin: 20px 0 0; display: block; }
.cv2-submit-btn.button,
.cv2-submit-btn { display: block; width: 100%; text-align: center; background: #FF2D6B !important; color: #fff !important; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 16px; padding: 16px; border-radius: 12px; border: 0; cursor: pointer; }
.cv2-submit-btn:hover, .cv2-submit-btn:focus { background: #d81f56 !important; }

.cv2-whatsapp-btn { display: block; text-align: center; margin-top: 10px; background: rgba(37, 211, 102, .14); border: 1px solid rgba(37, 211, 102, .4); color: #25D366; font-weight: 700; font-size: 15px; padding: 13px; border-radius: 12px; }
.cv2-legal { text-align: center; font-size: 12px; color: #9A9AA2; margin-top: 14px; line-height: 1.6; }

.cv2-review { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 13px; color: #6A6A72; }
.cv2-review-stars { color: #FF8A3D; }
.cv2-legal-outer { text-align: center; font-size: 12px; color: #9A9AA2; margin-top: 6px; }
