/**
 * AI Diet Generator — wizard.css v2
 * Design: Premium Wellness · Clean · High Contrast
 * Brak dark mode override — wizard zawsze jasny, pasuje do białej strony WP.
 */

/* ============================================================
   PAGE-LEVEL — tło całej strony dopasowane do wizarda
   Klasa .aidg-page jest dodawana przez JS przy inicjalizacji.
   ============================================================ */
html,
body.aidg-page {
  background-color: #F4F8F6 !important;
  /* Nadpisanie zmiennej WP block theme (Twenty Twenty-Five używa --wp--preset--color--base) */
  --wp--preset--color--base: #F4F8F6 !important;
  --wp--preset--color--base-2: #F4F8F6 !important;
}

/* Twenty Twenty-Five i inne block themes */
body.aidg-page .wp-site-blocks,
body.aidg-page #page,
body.aidg-page .site,
body.aidg-page main,
body.aidg-page .wp-block-post-content,
body.aidg-page [class*="wp-block"],
body.aidg-page .entry-content {
  background-color: #F4F8F6 !important;
}

/* Usuń białe tło z kontenerów blokowych */
body.aidg-page .wp-block-group:not(.has-background),
body.aidg-page .is-layout-constrained,
body.aidg-page .is-layout-flow {
  background: transparent !important;
}

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --aidg-sage:         #4F9C7E;
  --aidg-sage-dark:    #276046;
  --aidg-sage-light:   #E6F4EE;
  --aidg-sage-mid:     #C2DECE;
  --aidg-terracotta:   #D4855A;
  --aidg-bg:           #F4F8F6;
  --aidg-surface:      #FFFFFF;
  --aidg-ink:          #0E1A15;
  --aidg-muted:        #627970;
  --aidg-border:       #D8E7E0;
  --aidg-success:      #38946A;
  --aidg-warning:      #C8912A;
  --aidg-danger:       #C14040;

  --aidg-radius-sm:    10px;
  --aidg-radius-md:    16px;
  --aidg-radius-lg:    24px;

  --aidg-shadow-sm:    0 1px 4px rgba(0,30,15,.07), 0 4px 16px rgba(0,30,15,.05);
  --aidg-shadow-md:    0 4px 20px rgba(0,30,15,.10), 0 16px 52px rgba(0,30,15,.08);
  --aidg-shadow-card:  0 2px 10px rgba(0,30,15,.08), 0 8px 32px rgba(0,30,15,.06);
  --aidg-shadow-glow:  0 4px 28px rgba(79,156,126,.36);
  --aidg-shadow-glow-lg: 0 8px 44px rgba(79,156,126,.48);

  --aidg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --aidg-t:    200ms var(--aidg-ease);
  --aidg-pct:  50%;
}

/* ============================================================
   BASE — zawsze jasny, brak dark mode
   ============================================================ */
.aidg {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  color: var(--aidg-ink);
  background: var(--aidg-bg);
  min-height: 100vh;
  padding-bottom: 120px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Wyrwij z constraints blokowych WP — pełna szerokość */
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
  position: relative;
}

/* ============================================================
   HEADER — minimalistyczny licznik kroków
   ============================================================ */
.aidg-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244,248,246,.95);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(0,0,0,.05);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Progress bar i dots — ukryte, nie potrzebne */
.aidg-progress-wrap,
.aidg-step-dots { display: none !important; }

.aidg-progress-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--aidg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.aidg-saved {
  margin: 0;
  font-size: 12px;
  color: var(--aidg-success);
  font-weight: 600;
}

/* ============================================================
   STEP ANIMATIONS
   ============================================================ */
@keyframes aidgStepIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.aidg-step:not([hidden]) {
  animation: aidgStepIn 360ms var(--aidg-ease) both;
}

/* ============================================================
   MAIN
   ============================================================ */
.aidg-main {
  max-width: 660px;
  margin: 0 auto;
  padding: 52px 24px 32px;
}

.aidg-step h1 {
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 900;
  margin: 0 0 10px;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: var(--aidg-ink);
}

.aidg-sub {
  color: var(--aidg-muted);
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.65;
}

.aidg-h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 40px 0 14px;
  letter-spacing: -0.02em;
  color: var(--aidg-ink);
}

.aidg-info {
  color: var(--aidg-muted);
  font-style: italic;
  font-size: 15px;
}

/* ============================================================
   FORM FIELDS
   ============================================================ */
.aidg-field { margin-bottom: 24px; }

.aidg-field label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 9px;
  color: var(--aidg-ink);
}

.req { color: var(--aidg-danger); margin-left: 2px; }

.aidg-field input[type="text"],
.aidg-field input[type="email"],
.aidg-field input[type="number"],
.aidg-field input[type="date"],
.aidg-field input[type="time"],
.aidg-field select,
.aidg-field textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--aidg-border);
  border-radius: var(--aidg-radius-sm);
  background: var(--aidg-surface);
  color: var(--aidg-ink);
  font-family: inherit;
  transition: border-color var(--aidg-t), box-shadow var(--aidg-t);
  appearance: none;
  -webkit-appearance: none;
}

.aidg-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23627970' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}

.aidg-field input:focus,
.aidg-field select:focus,
.aidg-field textarea:focus {
  outline: none;
  border-color: var(--aidg-sage);
  box-shadow: 0 0 0 4px rgba(79,156,126,.16);
}

/* Range slider */
.aidg-field input[type="range"] {
  width: 100%;
  height: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  margin: 10px 0 4px;
}

.aidg-field input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--aidg-sage) 0%,
    var(--aidg-sage) var(--aidg-pct, 50%),
    var(--aidg-border) var(--aidg-pct, 50%)
  );
}

.aidg-field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--aidg-surface);
  border: 3px solid var(--aidg-sage);
  box-shadow: var(--aidg-shadow-sm);
  margin-top: -10px;
  cursor: pointer;
  transition: all var(--aidg-t);
}

.aidg-field input[type="range"]::-webkit-slider-thumb:hover,
.aidg-field input[type="range"]:focus::-webkit-slider-thumb {
  border-color: var(--aidg-sage-dark);
  box-shadow: var(--aidg-shadow-glow);
  transform: scale(1.22);
}

.aidg-field input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--aidg-border);
}
.aidg-field input[type="range"]::-moz-range-progress {
  height: 6px; border-radius: 999px; background: var(--aidg-sage);
}
.aidg-field input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--aidg-surface); border: 3px solid var(--aidg-sage); cursor: pointer;
}

.aidg-slider-val {
  text-align: center;
  font-size: 1.65rem;
  font-weight: 900;
  margin-top: 10px;
  color: var(--aidg-sage-dark);
  letter-spacing: -0.06em;
}

.aidg-hint  { font-size: 13px; color: var(--aidg-muted); margin: 6px 0 0; }
.aidg-error { color: var(--aidg-danger); font-size: 13px; margin: 6px 0 0; font-weight: 600; }

.aidg-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  padding: 6px 0;
  line-height: 1.55;
  color: var(--aidg-ink);
}

.aidg-check input {
  margin-top: 2px;
  accent-color: var(--aidg-sage);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ============================================================
   CARDS — layout pionowy, duże emoji, mocny active state
   ============================================================ */
.aidg-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aidg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 14px 24px;
  background: var(--aidg-surface);
  border: 2.5px solid var(--aidg-border);
  border-radius: var(--aidg-radius-lg);
  cursor: pointer;
  transition: border-color var(--aidg-t), box-shadow var(--aidg-t), transform var(--aidg-t), background var(--aidg-t);
  box-shadow: var(--aidg-shadow-sm);
  position: relative;
  min-height: 110px;
}

.aidg-card::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--aidg-border);
  background: transparent;
  transition: all var(--aidg-t);
}

.aidg-card:hover {
  border-color: var(--aidg-sage);
  transform: translateY(-4px);
  box-shadow: var(--aidg-shadow-card);
}

.aidg-card:hover .aidg-card-icon { transform: scale(1.14); }

.aidg-card.active {
  border-color: var(--aidg-sage);
  background: linear-gradient(160deg, var(--aidg-sage-light) 0%, #f2fcf8 100%);
  box-shadow: var(--aidg-shadow-glow);
  transform: translateY(-2px);
}

.aidg-card.active::after {
  background: var(--aidg-sage);
  border-color: var(--aidg-sage);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.aidg-card input { position: absolute; opacity: 0; pointer-events: none; }

.aidg-card-icon {
  font-size: 40px;
  line-height: 1;
  transition: transform var(--aidg-t);
}

.aidg-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aidg-card-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: var(--aidg-ink);
}

.aidg-card-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--aidg-muted);
  line-height: 1.4;
}

.aidg-card.active .aidg-card-sub {
  color: var(--aidg-sage-dark);
  opacity: 0.85;
}

.aidg-cards-sm { grid-template-columns: 1fr 1fr; }

/* ============================================================
   CHIPS — wyraźne, z emoji
   ============================================================ */
.aidg-chips { display: flex; flex-wrap: wrap; gap: 9px; }

.aidg-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--aidg-surface);
  border: 2px solid var(--aidg-border);
  font-size: 14px;
  font-weight: 500;
  color: var(--aidg-ink);
  transition: all var(--aidg-t);
  user-select: none;
  line-height: 1;
}

.aidg-chip:hover {
  border-color: var(--aidg-sage);
  background: var(--aidg-sage-light);
  transform: translateY(-2px);
  box-shadow: var(--aidg-shadow-sm);
}

.aidg-chip.active {
  background: var(--aidg-sage);
  color: #fff;
  border-color: var(--aidg-sage);
  box-shadow: var(--aidg-shadow-glow);
}

.aidg-chip.active::before {
  content: "✓";
  font-size: 11px;
  font-weight: 900;
}

.aidg-chip.disabled { opacity: .38; cursor: not-allowed; transform: none !important; }
.aidg-chip input { position: absolute; opacity: 0; pointer-events: none; }
.aidg-chip-emoji { font-size: 15px; line-height: 1; flex-shrink: 0; }

/* ============================================================
   SEGMENTED CONTROL
   ============================================================ */
.aidg-segmented {
  display: inline-flex;
  background: var(--aidg-border);
  padding: 3px;
  border-radius: var(--aidg-radius-sm);
  flex-wrap: wrap;
  gap: 3px;
}

.aidg-segmented label {
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--aidg-t);
  margin: 0;
  color: var(--aidg-muted);
  user-select: none;
}

.aidg-segmented label:hover { color: var(--aidg-ink); }

.aidg-segmented label.active {
  background: var(--aidg-surface);
  color: var(--aidg-sage-dark);
  box-shadow: var(--aidg-shadow-sm);
}

.aidg-segmented input { position: absolute; opacity: 0; pointer-events: none; }

/* ============================================================
   ACCORDION
   ============================================================ */
.aidg-accordion {
  border: 2px solid var(--aidg-border);
  border-radius: var(--aidg-radius-md);
  background: var(--aidg-surface);
  margin-bottom: 10px;
  padding: 16px 20px;
  transition: box-shadow var(--aidg-t), border-color var(--aidg-t);
}

.aidg-accordion[open] {
  box-shadow: var(--aidg-shadow-sm);
  border-color: var(--aidg-sage-mid);
  padding-bottom: 20px;
}

.aidg-accordion summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  color: var(--aidg-ink);
}

.aidg-accordion summary::-webkit-details-marker { display: none; }
.aidg-accordion summary::after { content: '＋'; color: var(--aidg-sage); font-weight: 400; font-size: 20px; flex-shrink: 0; }
.aidg-accordion[open] summary::after { content: '−'; }
.aidg-accordion > *:not(summary) { margin-top: 16px; }

/* ============================================================
   MEDICATIONS
   ============================================================ */
.aidg-med-row { display: flex; gap: 8px; margin-bottom: 8px; }
.aidg-med-row input { flex: 1; }

.aidg-btn-icon {
  background: transparent;
  border: 2px solid var(--aidg-border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 18px;
  color: var(--aidg-muted);
  transition: all var(--aidg-t);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
}

.aidg-btn-icon:hover {
  background: var(--aidg-danger);
  color: #fff;
  border-color: var(--aidg-danger);
  transform: scale(1.1);
}

/* ============================================================
   YES/NO SCREENER
   ============================================================ */
.aidg-yesno {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--aidg-border);
}

.aidg-yesno:last-child { border-bottom: none; }
.aidg-yesno label:first-child { margin-bottom: 0; font-size: 14px; line-height: 1.5; color: var(--aidg-ink); }

/* ============================================================
   FFQ
   ============================================================ */
.aidg-ffq { display: grid; gap: 7px; }

.aidg-ffq-row {
  display: grid;
  grid-template-columns: 1fr 155px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  background: var(--aidg-surface);
  border-radius: var(--aidg-radius-sm);
  border: 2px solid var(--aidg-border);
  transition: border-color var(--aidg-t);
}

.aidg-ffq-row:hover { border-color: var(--aidg-sage); }
.aidg-ffq-label { font-size: 14px; font-weight: 500; color: var(--aidg-ink); }
.aidg-ffq-row select { padding: 8px 32px 8px 10px; border-width: 1.5px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.aidg-btn-primary,
.aidg-btn-sec {
  padding: 16px 30px;
  border-radius: var(--aidg-radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--aidg-t);
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.aidg-btn-primary {
  background: linear-gradient(135deg, #5BAA8C 0%, #276046 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(79,156,126,.38);
}

.aidg-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.20) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 560ms var(--aidg-ease);
}

.aidg-btn-primary:hover::after { transform: translateX(130%); }

.aidg-btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(79,156,126,.52);
}

.aidg-btn-primary:active  { transform: scale(.97); }
.aidg-btn-primary:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

.aidg-btn-sec {
  background: var(--aidg-surface);
  color: var(--aidg-ink);
  border: 2px solid var(--aidg-border);
  box-shadow: var(--aidg-shadow-sm);
}

.aidg-btn-sec:hover {
  border-color: var(--aidg-sage);
  background: var(--aidg-sage-light);
  transform: translateY(-1px);
  box-shadow: var(--aidg-shadow-md);
}

/* ============================================================
   FOOTER NAV — floating pill
   ============================================================ */
.aidg-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: rgba(244,248,246,.96);
  backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.aidg-footer .aidg-btn-primary { flex: 1; }
.aidg-footer .aidg-btn-sec     { flex: 0 0 auto; min-width: 92px; padding: 14px 20px; }

@media (min-width: 680px) {
  .aidg-footer {
    max-width: 680px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    bottom: 24px;
    box-shadow: var(--aidg-shadow-md);
    border: 1.5px solid var(--aidg-border);
    padding-bottom: 14px;
  }
}

/* ============================================================
   RESTORE BANNER
   ============================================================ */
.aidg-restore-banner {
  background: linear-gradient(135deg, var(--aidg-sage-light) 0%, #f3fbf7 100%);
  border: 2px solid var(--aidg-sage-mid);
  border-radius: var(--aidg-radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  animation: aidgStepIn 300ms var(--aidg-ease) both;
}

.aidg-restore-banner p { margin: 0; font-size: 14px; font-weight: 500; flex: 1; color: var(--aidg-ink); }
.aidg-restore-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }
.aidg-restore-banner .aidg-btn-primary,
.aidg-restore-banner .aidg-btn-sec { padding: 10px 18px; font-size: 14px; }

/* ============================================================
   TOAST
   ============================================================ */
.aidg-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 100;
  background: var(--aidg-ink);
  color: #f4f8f6;
  padding: 13px 24px;
  border-radius: var(--aidg-radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--aidg-shadow-md);
  max-width: min(420px, calc(100vw - 40px));
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--aidg-ease), transform 220ms var(--aidg-ease);
  white-space: pre-line;
}

.aidg-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.aidg-toast--error   { background: var(--aidg-danger); }
.aidg-toast--success { background: var(--aidg-success); }
.aidg-toast--warning { background: var(--aidg-warning); color: var(--aidg-ink); }

/* ============================================================
   LOADING — lista kroków AI
   ============================================================ */
.aidg-loading {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  animation: aidgStepIn 380ms var(--aidg-ease) both;
}

.aidg-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 440px;
  width: 100%;
}

@keyframes aidgPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.aidg-loading-brain {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: aidgPulse 2.2s ease-in-out infinite;
}

.aidg-loading-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--aidg-ink);
  margin: 0 0 32px;
  text-align: center;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.aidg-loading-steps-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aidg-ls-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-radius: var(--aidg-radius-md);
  transition: all 340ms var(--aidg-ease);
  border: 2px solid transparent;
}

.aidg-ls-pending { opacity: 0.28; }

.aidg-ls-active {
  opacity: 1;
  background: linear-gradient(135deg, var(--aidg-sage-light) 0%, #f3fbf7 100%);
  border-color: var(--aidg-sage-mid);
  animation: aidgPulse 1.8s ease-in-out infinite;
}

.aidg-ls-done {
  opacity: 0.74;
  background: rgba(56,148,106,.08);
  border-color: rgba(56,148,106,.24);
  animation: none;
}

.aidg-ls-icon { font-size: 1.3rem; flex-shrink: 0; width: 28px; text-align: center; line-height: 1; }
.aidg-ls-text { flex: 1; font-size: 14px; font-weight: 600; color: var(--aidg-ink); line-height: 1.45; }
.aidg-ls-check { color: var(--aidg-success); font-weight: 900; font-size: 16px; opacity: 0; transition: opacity 280ms; flex-shrink: 0; }
.aidg-ls-done .aidg-ls-check { opacity: 1; }

/* ============================================================
   GATE
   ============================================================ */
.aidg-gate { padding: 52px 20px; animation: aidgStepIn 340ms var(--aidg-ease) both; }

.aidg-gate-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 44px;
  background: var(--aidg-surface);
  border-radius: var(--aidg-radius-lg);
  box-shadow: var(--aidg-shadow-md);
  border: 2px solid var(--aidg-border);
}

.aidg-gate-card::before { content: "⚕️"; font-size: 3.2rem; display: block; margin-bottom: 22px; }
.aidg-gate-card h2 { margin: 0 0 14px; font-size: 1.65rem; letter-spacing: -0.04em; font-weight: 800; color: var(--aidg-ink); }
.aidg-gate-card p { color: var(--aidg-muted); line-height: 1.7; }
.aidg-gate-card .aidg-btn-primary { margin-top: 28px; width: 100%; }

/* ============================================================
   REVEAL SECTION
   ============================================================ */
.aidg-reveal {
  max-width: 960px;
  margin: 0 auto;
  padding: 52px 20px;
  animation: aidgStepIn 420ms var(--aidg-ease) both;
}

.aidg-reveal > h1 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: -0.045em;
  font-weight: 900;
  color: var(--aidg-ink);
}

.aidg-reveal-subtitle {
  text-align: center;
  color: var(--aidg-mist);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.aidg-bento { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 56px; }

@media (min-width: 768px) { .aidg-bento { grid-template-columns: 2fr 1fr 1fr; } }

.aidg-bento-card {
  background: var(--aidg-surface);
  border-radius: var(--aidg-radius-lg);
  padding: 28px;
  box-shadow: var(--aidg-shadow-sm);
  border: 2px solid var(--aidg-border);
  transition: box-shadow var(--aidg-t), transform var(--aidg-t);
}

.aidg-bento-card:hover { box-shadow: var(--aidg-shadow-md); transform: translateY(-2px); }

.aidg-bento-card h3 {
  margin: 0 0 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--aidg-muted);
  font-weight: 700;
}

.aidg-big {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--aidg-sage-dark);
  margin: 0 0 20px;
  letter-spacing: -0.06em;
  line-height: 1;
}

.aidg-kcal-label,
.aidg-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aidg-kcal-label {
  margin: 0 0 8px;
  color: var(--aidg-muted);
  font-size: 13px;
  font-weight: 600;
}

.aidg-info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--aidg-border);
  border-radius: 999px;
  background: #fff;
  color: var(--aidg-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
}

.aidg-info-tip::before {
  content: "";
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--aidg-ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--aidg-t), visibility var(--aidg-t);
  z-index: 4;
}

.aidg-info-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, 72vw);
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--aidg-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  letter-spacing: normal;
  box-shadow: var(--aidg-shadow-sm);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--aidg-t), visibility var(--aidg-t);
  z-index: 4;
}

.aidg-info-tip:hover,
.aidg-info-tip:focus-visible {
  border-color: var(--aidg-sage-dark);
  color: var(--aidg-sage-dark);
}

.aidg-info-tip:hover::before,
.aidg-info-tip:focus-visible::before,
.aidg-info-tip:hover::after,
.aidg-info-tip:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.aidg-bento-card ul { list-style: none; padding: 0; margin: 0; }

.aidg-bento-card ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--aidg-border);
  font-size: 14px;
  color: var(--aidg-ink);
}

.aidg-bento-card ul li:last-child { border-bottom: none; }
.aidg-bento-card ul li span { color: var(--aidg-muted); }
.aidg-bento-card ul li b { font-weight: 700; }

.aidg-feat li {
  border: none !important;
  padding: 6px 0 !important;
  font-size: 14px;
  color: var(--aidg-muted);
  display: flex;
  gap: 8px;
}

/* ============================================================
   PLANS / PAYWALL
   ============================================================ */
.aidg-plans { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 28px; }

/* Mobile: roczny (best value) wyświetlany pierwszy */
@media (max-width: 679px) {
  .aidg-plans { display: flex; flex-direction: column-reverse; }
}

@media (min-width: 680px) { .aidg-plans { grid-template-columns: 1fr 1fr 1fr; } }

.aidg-plan {
  background: var(--aidg-surface);
  border: 2.5px solid var(--aidg-border);
  border-radius: var(--aidg-radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  box-shadow: var(--aidg-shadow-sm);
  transition: all var(--aidg-t);
  display: flex;
  flex-direction: column;
}

.aidg-plan:hover { box-shadow: var(--aidg-shadow-md); transform: translateY(-4px); }

.aidg-plan.highlighted {
  border-color: var(--aidg-sage);
  box-shadow: var(--aidg-shadow-glow);
  transform: scale(1.04);
  background: linear-gradient(170deg, var(--aidg-sage-light) 0%, var(--aidg-surface) 65%);
}

.aidg-plan.highlighted:hover { transform: scale(1.05) translateY(-3px); }

.aidg-plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--aidg-sage), var(--aidg-sage-dark));
  color: #fff;
  padding: 5px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(79,156,126,.42);
}

.aidg-plan h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: var(--aidg-ink); }

.aidg-plan-price {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--aidg-sage-dark);
  margin: 6px 0 0;
  letter-spacing: -0.06em;
  line-height: 1;
}

.aidg-plan-price-unit { font-size: 0.82rem; font-weight: 500; letter-spacing: 0; }
.aidg-plan-billing { color: var(--aidg-muted); font-size: 12px; margin: 4px 0 14px; line-height: 1.45; }
.aidg-plan-sub { color: var(--aidg-muted); font-size: 13px; margin: 0 0 18px; line-height: 1.5; }

.aidg-plan-bonus {
  background: rgba(212,133,90,.10);
  color: #8a4a25;
  border: 1.5px solid rgba(212,133,90,.25);
  padding: 10px 14px;
  border-radius: var(--aidg-radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.aidg-plan ul { list-style: none; padding: 0; margin: 0 0 auto; text-align: left; }

.aidg-plan ul li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--aidg-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.aidg-plan ul li::before { content: "✓"; color: var(--aidg-sage); font-weight: 900; flex-shrink: 0; }

.aidg-plan .aidg-btn-primary { width: 100%; margin-top: 22px; }

/* Kwartalny — celowo słabszy (efekt kotwicy cenowej) */
.aidg-plan.aidg-plan-dimmed { opacity: 0.82; transform: none !important; }
.aidg-plan.aidg-plan-dimmed:hover { opacity: 0.95; transform: translateY(-2px) !important; box-shadow: var(--aidg-shadow-sm); }
.aidg-plan.aidg-plan-dimmed .aidg-plan-price { font-size: 2rem; color: var(--aidg-muted); }
.aidg-plan-sub--weak { font-style: italic; font-size: 12px !important; opacity: 0.8; }

.aidg-trust {
  text-align: center;
  color: var(--aidg-muted);
  font-size: 13px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   SHAKE ANIMATION
   ============================================================ */
@keyframes aidgShake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  45%       { transform: translateX(6px); }
  65%       { transform: translateX(-4px); }
  85%       { transform: translateX(3px); }
}

.aidg-shake {
  animation: aidgShake 440ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

