
/* hide InSales theme page title above the quiz */
.insales-section-page--individual-design-test .text-title { display: none !important; }
/* allow quiz to feel "full bleed" on mobile within the InSales container */
.insales-section-page--individual-design-test .text-content { padding: 0; }
/* hero image */
.ev-hero { color: transparent; background-color: #E8D4C4; background-position: center; background-size: cover; }
.ev-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* case photo as real img */

/* ===== ИД-квиз для Everink, vanilla JS ===== */
  .ev-quiz * { box-sizing: border-box; margin: 0; padding: 0; }
  .ev-quiz {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: #1A1A1A;
    background: #FAFAFA;
    min-height: 100vh;
    padding-bottom: 100px;
  }
  .ev-quiz a { color: inherit; }

  /* progress bar */
  .ev-progress {
    position: sticky; top: 0; left: 0; right: 0;
    height: 4px; background: #E8E8E8; z-index: 10;
  }
  .ev-progress__fill {
    height: 100%; background: linear-gradient(90deg, #8B5A5A 0%, #7a4a4a 100%);
    width: 0%; transition: width 0.3s ease;
  }

  /* screen container */
  .ev-screen { display: none; max-width: 480px; margin: 0 auto; padding: 24px 20px; }
  .ev-screen.active { display: block; animation: fadeIn 0.4s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  .ev-back {
    background: transparent; border: none; cursor: pointer;
    color: #1A1A1A; font-size: 20px; padding: 8px;
    margin-left: -8px; margin-bottom: 8px;
  }
  .ev-step-label {
    font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 16px;
  }

  .ev-h1 { font-size: 30px; font-weight: 700; line-height: 1.2; color: #0E0E0E; margin-bottom: 12px; }
  .ev-sub { font-size: 16px; color: #444; line-height: 1.5; margin-bottom: 24px; }

  /* hero */
  .ev-hero { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, #E8D4C4, #D9C4B8);
    border-radius: 14px; margin-bottom: 24px; display: flex; align-items: center; justify-content: center;
    color: #888; font-size: 14px; font-weight: 500;
    background-size: cover; background-position: center; overflow: hidden;
  }

  /* trust */
  .ev-trust {
    background: #F1EDE9; padding: 12px 16px; border-radius: 10px;
    text-align: center; font-size: 14px; font-weight: 500; color: #0E0E0E;
    margin-bottom: 24px;
  }

  /* USP */
  .ev-usp { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 28px; }
  @media (max-width: 480px) { .ev-usp { grid-template-columns: 1fr; } }
  .ev-usp__card {
    background: white; padding: 14px 12px; border-radius: 12px;
    border: 1px solid #E8E8E8; text-align: center;
  }
  .ev-usp__icon { font-size: 24px; margin-bottom: 6px; }
  .ev-usp__title { font-size: 13px; font-weight: 600; color: #0E0E0E; line-height: 1.3; }

  /* cases carousel */
  .ev-cases { margin-bottom: 28px; }
  .ev-case {
    background: white; border: 1px solid #E8E8E8; border-radius: 12px;
    padding: 16px; margin-bottom: 12px; overflow: hidden;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .ev-case__photo {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 8px; display: block; max-width: 100%;
  }
  .ev-case__quote { font-size: 14px; line-height: 1.5; color: #1A1A1A;
    grid-column: 1 / 3; margin-top: 4px; }
  .ev-case__author { font-size: 13px; font-weight: 600; color: #6B6B6B;
    grid-column: 1 / 3; }

  /* faq */
  .ev-faq { margin-bottom: 24px; }
  .ev-faq__item { border-top: 1px solid #E8E8E8; }
  .ev-faq__item:last-child { border-bottom: 1px solid #E8E8E8; }
  .ev-faq__trigger { background: none; border: none; cursor: pointer; padding: 14px 0;
    width: 100%; text-align: left; font-size: 14px; color: #1A1A1A;
    display: flex; justify-content: space-between; align-items: center; font-family: inherit; }
  .ev-faq__trigger:hover { color: #8B5A5A; }
  .ev-faq__icon { color: #999; font-size: 20px; line-height: 1; flex-shrink: 0; margin-left: 12px; }
  .ev-faq__content { display: none; font-size: 14px; color: #6B6B6B; line-height: 1.5; padding: 0 0 14px 0; }
  .ev-faq__item.open .ev-faq__content { display: block; }
  .ev-faq__item.open .ev-faq__icon { color: #8B5A5A; }

  /* options buttons (size pickers) */
  .ev-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
  .ev-options.cols-1 { grid-template-columns: 1fr; }
  .ev-option {
    background: white; border: 2px solid #E8E8E8; border-radius: 12px;
    padding: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
    text-align: left; font-family: inherit;
  }
  .ev-option:hover { border-color: #8B5A5A; }
  .ev-option.active { border-color: #8B5A5A; background: #F5F0EE; }
  .ev-option__label { font-size: 15px; font-weight: 600; color: #0E0E0E; margin-bottom: 4px; }
  .ev-option__hint { font-size: 12px; color: #6B6B6B; line-height: 1.3; }

  /* arm silhouette */
  .ev-arm-wrap { background: #F5F0EE; border-radius: 12px; padding: 18px;
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
  .ev-arm { width: 80%; max-width: 240px; height: auto; }
  .ev-arm-marker { fill: #8B5A5A; opacity: 0.6; transition: all 0.3s ease; }
  .ev-size-display { font-size: 14px; font-weight: 600; color: #0E0E0E; text-align: center; margin-bottom: 16px; }

  /* upload zone */
  .ev-upload { border: 2px dashed #C8C8C8; border-radius: 12px; padding: 24px; text-align: center;
    cursor: pointer; transition: all 0.15s; margin-bottom: 12px; background: white; }
  .ev-upload:hover, .ev-upload.dragover { border-color: #8B5A5A; background: #F5F0EE; }
  .ev-upload__icon { font-size: 28px; margin-bottom: 8px; }
  .ev-upload__text { font-size: 14px; color: #6B6B6B; line-height: 1.4; }
  .ev-upload__small { font-size: 12px; color: #999; margin-top: 6px; }
  .ev-upload__preview { display: none; align-items: center; gap: 12px; padding: 12px;
    background: #F1EDE9; border-radius: 10px; margin-bottom: 12px; }
  .ev-upload__preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
  .ev-upload__preview-name { font-size: 13px; color: #1A1A1A; flex: 1; word-break: break-all; }
  .ev-upload__remove { background: none; border: none; color: #999; cursor: pointer;
    font-size: 18px; padding: 4px 8px; }
  .ev-upload__remove:hover { color: #D32F2F; }
  .ev-upload__progress { font-size: 12px; color: #8B5A5A; margin-top: 8px; display: none; }

  /* form */
  .ev-form-group { margin-bottom: 20px; }
  .ev-label { display: block; font-size: 14px; font-weight: 600; color: #0E0E0E; margin-bottom: 8px; }
  .ev-textarea, .ev-input {
    width: 100%; padding: 12px 14px; border: 2px solid #E8E8E8; border-radius: 10px;
    font-size: 14px; font-family: inherit; color: #1A1A1A; transition: border-color 0.15s;
    background: white;
  }
  .ev-textarea { min-height: 110px; resize: vertical; }
  .ev-textarea:focus, .ev-input:focus { outline: none; border-color: #8B5A5A; }
  .ev-input.error, .ev-textarea.error { border-color: #D32F2F; background: #FFF7F7; }
  .ev-counter { font-size: 11px; color: #999; text-align: right; margin-top: 4px; }
  .ev-counter.warn { color: #E36363; }
  .ev-hint { font-size: 12px; color: #6B6B6B; line-height: 1.4; margin-top: 6px; }

  .ev-tip {
    background: #F5F0EE; padding: 12px 14px; border-radius: 10px;
    font-size: 13px; color: #6B6B6B; line-height: 1.5; margin-bottom: 24px;
  }
  .ev-tip__title { font-weight: 600; color: #1A1A1A; margin-bottom: 4px; }

  /* pricing grid */
  .ev-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
  .ev-price {
    background: white; border: 2px solid #E8E8E8; border-radius: 12px;
    padding: 28px 12px 14px; cursor: pointer; transition: all 0.15s;
    position: relative; text-align: center;
  }
  .ev-price:hover { border-color: #8B5A5A; }
  .ev-price.active { border-color: #8B5A5A; background: #F5F0EE; }
  .ev-price__qty { font-size: 14px; font-weight: 600; color: #0E0E0E; margin-bottom: 4px; }
  .ev-price__per { font-size: 17px; font-weight: 700; color: #8B5A5A; }
  .ev-price__total { font-size: 11px; color: #999; margin-top: 2px; }
  .ev-price__badge {
    position: absolute; top: 6px; right: 6px;
    background: #4CAF50; color: white; padding: 3px 7px; border-radius: 4px;
    font-size: 10px; font-weight: 600;
  }
  .ev-price__badge.hot { background: #FF6B00; }

  /* sticky CTA */
  .ev-cta-wrap {
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 14px 20px; background: white;
    border-top: 1px solid #E8E8E8;
    z-index: 5;
  }
  .ev-cta-inner { max-width: 480px; margin: 0 auto; }
  .ev-cta {
    width: 100%; padding: 14px 20px; border: none; border-radius: 999px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    background: #0E0E0E; color: white; transition: background 0.15s;
    font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .ev-cta:hover:not(:disabled) { background: #2A2A2A; }
  .ev-cta:disabled { background: #C8C8C8; cursor: not-allowed; }

  .ev-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .ev-toast {
    position: fixed; bottom: 90px; left: 20px; right: 20px; max-width: 480px; margin: 0 auto;
    background: #1A1A1A; color: white; padding: 12px 16px; border-radius: 10px;
    font-size: 13px; z-index: 100; animation: toastSlide 0.3s ease;
  }
  @keyframes toastSlide { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

  /* responsive */
  @media (max-width: 480px) { .ev-h1 { font-size: 26px; } .ev-screen { padding: 20px 16px; } }

/* Compact layout — fit step screens in mobile viewport without scroll */
.ev-quiz { padding-bottom: 84px; }
.ev-screen { padding: 14px 16px; }
.ev-back { margin-bottom: 4px; padding: 4px; font-size: 22px; }
.ev-step-label { margin-bottom: 8px; }
.ev-h1 { font-size: 24px; margin-bottom: 8px; line-height: 1.15; }
.ev-sub { font-size: 14px; margin-bottom: 16px; line-height: 1.4; }

/* Step 1 — sizes + arm */
.ev-options { gap: 8px; margin-bottom: 12px; }
.ev-option { padding: 10px 12px; }
.ev-option__label { font-size: 14px; margin-bottom: 2px; }
.ev-option__hint { font-size: 11px; line-height: 1.2; }
.ev-arm-wrap { padding: 8px; margin-bottom: 0; }
.ev-arm { max-width: 140px; height: 160px; }
.ev-size-display { margin-bottom: 8px; font-size: 13px; }

/* Step 2 — upload + textarea */
.ev-form-group { margin-bottom: 12px; }
.ev-label { margin-bottom: 6px; font-size: 13px; }
.ev-upload { padding: 16px; }
.ev-upload__icon { font-size: 24px; margin-bottom: 4px; }
.ev-upload__text { font-size: 13px; }
.ev-upload__small { font-size: 11px; }
.ev-textarea { min-height: 80px; padding: 10px 12px; }
.ev-counter { font-size: 11px; }

/* Step 3 — prices + telegram */
.ev-prices { gap: 8px; margin-bottom: 14px; }
.ev-price { padding: 24px 8px 10px; }
.ev-price__qty { font-size: 13px; margin-bottom: 2px; }
.ev-price__per { font-size: 15px; }
.ev-price__total { font-size: 10px; }
.ev-price__badge { padding: 2px 6px; font-size: 9px; top: 4px; right: 4px; }
.ev-input { padding: 10px 12px; font-size: 14px; }
.ev-hint { font-size: 11px; line-height: 1.3; }

/* Sticky CTA tightening */
.ev-cta-wrap { padding: 10px 16px; }
.ev-cta { padding: 12px 18px; font-size: 14px; }

/* Hide breadcrumb on quiz page to save vertical space */
.insales-section-page--individual-design-test ~ .breadcrumb,
body.controller-pages .breadcrumb-wrapper { display: none !important; }
.insales-breadcrumbs { display: none !important; }

/* Steps: make the content area fill viewport without scroll where possible */

.ev-screen[data-step="1"] .ev-h1,
.ev-screen[data-step="2"] .ev-h1,
.ev-screen[data-step="3"] .ev-h1 { font-size: 22px; margin-bottom: 6px; }
.ev-screen[data-step="2"] .ev-sub,
.ev-screen[data-step="3"] .ev-sub { font-size: 13px; margin-bottom: 12px; }

/* Step 1: smaller arm */
.ev-arm { max-width: 110px; height: 130px; }
.ev-arm-wrap { padding: 6px; }

/* Step 2: tighter upload + textarea */
.ev-upload { padding: 12px; }
.ev-textarea { min-height: 64px; }

/* Step 3: tighter prices, smaller hint */
.ev-prices { gap: 6px; margin-bottom: 10px; }
.ev-price { padding: 22px 6px 8px; }
.ev-hint { font-size: 11px; line-height: 1.3; margin-top: 4px; }

/* Steps 1-3: hide InSales footer + lock viewport, no scroll */
body[data-ev-step="1"] .insales-section-footer,
body[data-ev-step="2"] .insales-section-footer,
body[data-ev-step="3"] .insales-section-footer { display: none !important; }
body[data-ev-step="1"], body[data-ev-step="2"], body[data-ev-step="3"] {
  overflow: hidden;
}

/* Step screens: vertical center content within viewport */
.ev-screen.active[data-step="1"],
.ev-screen.active[data-step="2"],
.ev-screen.active[data-step="3"] {
  min-height: 0;
  display: block;
  padding-top: 12px;
}

/* Step 3 — "Что будет дальше" flow block */
.ev-flow {
  background: #F1EDE9; border-radius: 10px; padding: 12px 14px;
  margin-bottom: 16px;
}
.ev-flow__step {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.4; color: #1A1A1A;
}
.ev-flow__step + .ev-flow__step { margin-top: 7px; }
.ev-flow__num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: #8B5A5A; color: white;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  margin-top: 1px;
}
.ev-flow__txt { flex: 1; }

.ev-input-wrap { position: relative; }
.ev-input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ev-input--with-icon { padding-left: 38px; }

/* Step 3 — extra compact so Telegram fits without scroll */
.ev-screen.active[data-step="3"] .ev-h1 { font-size: 20px; margin-bottom: 8px; }
.ev-screen.active[data-step="3"] .ev-prices { gap: 6px; margin-bottom: 10px; }
.ev-screen.active[data-step="3"] .ev-price { padding: 18px 6px 6px; }
.ev-screen.active[data-step="3"] .ev-price__qty { font-size: 12px; margin-bottom: 1px; }
.ev-screen.active[data-step="3"] .ev-price__per { font-size: 14px; }
.ev-screen.active[data-step="3"] .ev-price__total { font-size: 10px; margin-top: 1px; }
.ev-screen.active[data-step="3"] .ev-price__badge { font-size: 9px; padding: 2px 5px; top: 3px; right: 3px; }
.ev-screen.active[data-step="3"] .ev-flow { padding: 10px 12px; margin-bottom: 12px; }
.ev-screen.active[data-step="3"] .ev-flow__step { font-size: 12px; line-height: 1.35; }
.ev-screen.active[data-step="3"] .ev-flow__step + .ev-flow__step { margin-top: 5px; }
.ev-screen.active[data-step="3"] .ev-flow__num { width: 18px; height: 18px; font-size: 10px; }
.ev-screen.active[data-step="3"] .ev-form-group { margin-bottom: 8px; }
.ev-screen.active[data-step="3"] .ev-label { font-size: 12px; margin-bottom: 5px; }
.ev-screen.active[data-step="3"] .ev-input { padding: 9px 12px; font-size: 14px; }
.ev-screen.active[data-step="3"] .ev-hint { font-size: 11px; margin-top: 4px; }

/* Kill all top whitespace above the quiz */
body:has(.insales-section-page--individual-design-test) .insales-section-breadcrumb { display: none !important; }
.insales-section-page--individual-design-test { padding-top: 0 !important; padding-bottom: 0 !important; border-top: 0 !important; }
.insales-section-page--individual-design-test .container { padding-top: 0 !important; padding-bottom: 0 !important; max-width: 480px; }
.insales-section-page--individual-design-test .text { padding: 0 !important; margin: 0 !important; }
.insales-section-page--individual-design-test .text-content { padding: 0 !important; margin: 0 !important; }
.insales-section-page--individual-design-test hr { display: none; }
.insales-section-page--individual-design-test .row > .col-12 { padding: 0; }

/* Pull back button + step label up tight to top */
.ev-back { margin-top: 0; padding-top: 0; }
.ev-screen.active[data-step="1"], .ev-screen.active[data-step="2"], .ev-screen.active[data-step="3"] {
  padding-top: 4px !important;
}

.ev-nb { white-space: nowrap; }
