/* EiChefe — modal de demonstração em etapa única. */
#fl[hidden],
.fl [hidden] {
  display: none !important;
}

.fl {
  --fl-ink: var(--ei-purple-dark, #430e61);
  --fl-ease: var(--ease, cubic-bezier(.16, 1, .3, 1));
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  background: rgba(32, 6, 48, .66);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: var(--fl-ink);
  font: 400 16px/1.5 Poppins, Arial, sans-serif;
  overscroll-behavior: contain;
  animation: fl-fade .2s ease-out both;
}

.fl *,
.fl *::before,
.fl *::after {
  box-sizing: border-box;
}

.fl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  min-width: 0;
  min-height: 0;
  max-height: min(780px, calc(100vh - 48px));
  max-height: min(780px, calc(100dvh - 48px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 34px;
  background: #fff;
  color: var(--ei-text, #1a1a1a);
  box-shadow: 10px 7px 0 rgba(0, 0, 0, .7);
  overflow-wrap: anywhere;
  animation: fl-card-in .35s var(--fl-ease) both;
}

.fl-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 22px;
  background: var(--ei-lilac, #e9e5ff);
}

.fl-head > div {
  min-width: 0;
}

.fl .fl-title {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fl-ink);
  font: 700 clamp(25px, 5vw, 32px)/1.1 Poppins, Arial, sans-serif;
  letter-spacing: -.035em;
  text-align: left;
  text-transform: none;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.fl-subtitle {
  max-width: 48ch;
  margin: 10px 0 0;
  color: var(--fl-ink);
  font-size: 15px;
  line-height: 1.5;
}

#fl .fl-close {
  display: inline-flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ei-purple-dark, #430e61);
  font: 400 30px/1 Arial, sans-serif;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

#fl .fl-close:hover {
  background: rgba(96, 14, 143, .1);
}

#fl .fl-close:focus-visible,
#fl .fl-submit:focus-visible,
#fl .fl-wa:focus-visible,
#fl .fl-back:focus-visible,
#fl .fl-retry:focus-visible,
#fl .fl-field input:focus-visible {
  outline: 3px solid var(--ei-purple, #600e8f);
  outline-offset: 3px;
}

.fl-form {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 26px 32px 32px;
}

.fl-field {
  min-width: 0;
  margin: 0;
  scroll-margin-block: 12px;
}

.fl-field label {
  display: block;
  margin: 0 0 7px;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.fl-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 0 16px;
  border: 2px solid var(--ei-line, #e2e2e2);
  border-radius: 16px;
  background: #fff;
  color: #1a1a1a;
  font: 400 16px/1.2 Poppins, Arial, sans-serif;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.fl-field input::placeholder {
  color: #777;
  opacity: 1;
}

.fl-field input:focus-visible {
  border-color: var(--ei-purple, #600e8f);
  box-shadow: 0 0 0 3px rgba(96, 14, 143, .2);
  outline: none;
}

.fl-field input[aria-invalid="true"] {
  border-color: #b3261e;
  background: #fff7f6;
}

.fl-error {
  margin: 6px 2px 0;
  color: #b3261e;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.fl-privacy {
  margin: 0;
  color: #555;
  font-size: 12.5px;
  line-height: 1.55;
}

.fl-privacy a {
  color: var(--ei-purple, #600e8f);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#fl .fl-submit,
#fl .fl-retry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  margin: 2px 0 0;
  padding: 15px 22px;
  border: 0;
  border-radius: 18px;
  background: var(--ei-green, #16da5b);
  color: #000;
  font: 700 16px/1.3 Poppins, Arial, sans-serif;
  letter-spacing: -.2px;
  text-align: center;
  text-transform: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s var(--fl-ease);
}

#fl .fl-submit:hover,
#fl .fl-submit:focus-visible,
#fl .fl-retry:hover,
#fl .fl-retry:focus-visible {
  background: #000;
  color: var(--ei-gray, #f7f7fa);
}

#fl .fl-submit:active,
#fl .fl-retry:active {
  transform: scale(.985);
}

#fl .fl-submit:disabled,
#fl .fl-sending .fl-submit {
  background: #cfcfd6;
  color: #555;
  cursor: progress;
  transform: none;
}

.fl-sending .fl-submit::after {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: fl-spin .7s linear infinite;
}

.fl-result {
  width: 100%;
  min-width: 0;
  padding: 26px 32px 32px;
}

.fl-result .fl-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 5vw, 30px);
}

.fl-result-text {
  margin: 14px 0;
  color: var(--fl-ink);
  font-size: 15px;
  line-height: 1.6;
}

.fl-result-text strong {
  color: #000;
  white-space: nowrap;
}

.fl-result--ok > span.fl-result-text:first-child {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 0 22px;
  border: 3px solid #000;
  border-radius: 50%;
  background: var(--ei-green, #16da5b);
  color: #000;
  box-shadow: 6px 5px 0 rgba(0, 0, 0, .7);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  animation: fl-card-in .45s var(--fl-ease) both;
}

.fl-next {
  margin: 20px 0;
  padding: 18px 20px 8px;
  border-radius: 22px;
  background: var(--ei-lilac, #e9e5ff);
  color: var(--fl-ink);
}

.fl-next h3 {
  margin: 0 0 14px;
  color: var(--ei-purple-dark, #430e61);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.fl-next ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: fl-next;
}

.fl-next li {
  position: relative;
  margin: 0 0 14px;
  padding-left: 40px;
  color: var(--fl-ink);
  font-size: 14px;
  line-height: 1.55;
  counter-increment: fl-next;
}

.fl-next li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ei-purple, #600e8f);
  color: #fff;
  content: counter(fl-next);
  font-size: 13px;
  font-weight: 700;
}

.fl-next strong {
  color: var(--ei-purple-dark, #430e61);
}

#fl .fl-wa,
#fl .fl-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin: 10px 0 0;
  padding: 12px 20px;
  border: 2px solid #000;
  border-radius: 16px;
  background: #fff;
  color: #000;
  font: 700 16px/1.3 Poppins, Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

#fl .fl-wa::before {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #25d366;
  content: "";
}

#fl .fl-wa:hover,
#fl .fl-wa:focus-visible,
#fl .fl-back:hover,
#fl .fl-back:focus-visible {
  border-color: #000;
  background: #000;
  color: #fff;
}

#fl .fl-back {
  border-color: var(--ei-line, #e2e2e2);
  color: var(--fl-ink);
}

.fl-result--fail .fl-result-text:first-of-type {
  margin-top: 0;
}

@keyframes fl-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fl-card-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes fl-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .fl {
    align-items: stretch;
    padding: 0;
  }

  .fl-card {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    animation: none;
  }

  .fl-head {
    padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 18px;
  }

  .fl-form,
  .fl-result {
    padding: 22px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .fl-field input {
    min-height: 54px;
    font-size: 16px;
  }
}

@media (max-width: 359px) {
  .fl-head {
    gap: 10px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .fl-form,
  .fl-result {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fl,
  .fl-card,
  .fl-result--ok > span.fl-result-text:first-child,
  .fl-sending .fl-submit::after {
    animation: none !important;
  }

  #fl .fl-close,
  #fl .fl-submit,
  #fl .fl-retry,
  #fl .fl-wa,
  #fl .fl-back,
  .fl-field input {
    transition: none;
  }
}
