/* ══════ Primeiro cesto - teaser + wizard (estilo Knuspr) ══════ */

.fb-teaser {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9400;
  width: min(400px, calc(100vw - 32px));
  background: #f4f4f2;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .22);
  padding: 26px 22px 18px;
  font-family: var(--font, "Inter", sans-serif);
  animation: fbSlideUp .35s ease;
}

@keyframes fbSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fb-close {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #333;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-close:hover { background: #f1f1f1; }

.fb-teaser__title {
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  color: var(--c-text, #1a1d1b);
  margin-bottom: 6px;
}

.fb-teaser__sub {
  font-size: .8rem;
  color: var(--c-text-muted, #6b706d);
  text-align: center;
  margin-bottom: 16px;
}

.fb-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--c-border, #e4e6e5);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  text-align: left;
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.fb-option:hover {
  border-color: var(--c-accent, #F25C54);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.fb-option__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-accent, #F25C54);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-option__icon svg { width: 22px; height: 22px; }

.fb-option__txt strong { display: block; font-size: .92rem; font-weight: 700; }
.fb-option__txt span   { display: block; font-size: .78rem; color: var(--c-text-muted, #6b706d); margin-top: 2px; }

.fb-skip {
  display: block;
  margin: 8px auto 0;
  background: none;
  border: none;
  font-size: .82rem;
  color: var(--c-text, #333);
  text-decoration: underline;
}
.fb-skip:hover { color: var(--c-accent, #F25C54); }

/* ── Painel wizard (substitui o conteúdo do teaser) ── */

.fb-progress {
  height: 3px;
  background: #ddd;
  border-radius: 99px;
  margin-bottom: 16px;
  overflow: hidden;
}
.fb-progress i {
  display: block;
  height: 100%;
  background: var(--c-accent, #F25C54);
  border-radius: 99px;
  transition: width .25s ease;
}

.fb-step__kicker {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-text-muted, #6b706d);
  margin-bottom: 4px;
}

.fb-step__title {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.fb-step__hint {
  font-size: .78rem;
  color: var(--c-text-muted, #6b706d);
  margin-bottom: 14px;
}

.fb-answers { display: flex; flex-direction: column; gap: 8px; }

.fb-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--c-border, #e4e6e5);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: .9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fb-answer:hover { border-color: var(--c-accent, #F25C54); box-shadow: 0 3px 10px rgba(0, 0, 0, .07); }

.fb-answer__icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-accent, #F25C54);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

/* chips multi-seleção (dietas) */
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.fb-chip {
  border: 1px solid var(--c-border, #e4e6e5);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.fb-chip--on {
  background: var(--c-accent, #F25C54);
  border-color: var(--c-accent, #F25C54);
  color: #fff;
}

.fb-continue {
  display: block;
  margin: 4px auto 0;
  background: none;
  border: none;
  font-size: .9rem;
  font-weight: 700;
  color: #b9bdb9;
  padding: 8px 18px;
}
.fb-continue--ready { color: var(--c-accent, #F25C54); cursor: pointer; }
.fb-continue--ready:hover { text-decoration: underline; }

/* upload */
.fb-drop {
  position: relative;
  display: block;
  border: 2px dashed #cfd2cf;
  border-radius: 12px;
  background: #fff;
  padding: 30px 18px;
  text-align: center;
  cursor: pointer;
  color: var(--c-text-muted, #6b706d);
  font-size: .84rem;
  transition: border-color .15s ease, background .15s ease;
  overflow: hidden;
}
.fb-drop:hover,
.fb-drop--hover { border-color: var(--c-accent, #F25C54); background: #fffaf6; }
.fb-drop--ready { border-style: solid; border-color: #c8e6c9; }
.fb-drop--loading { opacity: .7; pointer-events: none; }
.fb-drop svg { width: 34px; height: 34px; color: var(--c-accent, #F25C54); margin: 0 auto 8px; display: block; }
.fb-drop img { max-height: 140px; margin: 0 auto 8px; border-radius: 8px; display: block; }
/* Input transparente a cobrir toda a zona - evita display:none (quebra iOS/Safari) */
.fb-drop__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.fb-upload-error {
  margin: .65rem 0 0;
  font-size: .8rem;
  line-height: 1.4;
  color: #b91c1c;
  text-align: center;
}

.fb-primary {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: var(--c-accent, #F25C54);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: .95rem;
  font-weight: 700;
  transition: background .15s ease;
}
.fb-primary:hover:not(:disabled) { background: #e65c00; }
.fb-primary:disabled { background: #d9dcd9; color: #999; cursor: default; }

/* loading */
.fb-loading { text-align: center; padding: 26px 8px; }
.fb-loading__spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 3px solid #e8e8e6;
  border-top-color: var(--c-accent, #F25C54);
  border-radius: 50%;
  animation: fbSpin .8s linear infinite;
}
@keyframes fbSpin { to { transform: rotate(360deg); } }
.fb-loading p { font-size: .88rem; color: var(--c-text-muted, #6b706d); }

/* resultado */
.fb-result { max-height: min(56vh, 460px); display: flex; flex-direction: column; }
.fb-result__list {
  flex: 1;
  overflow-y: auto;
  margin: 4px -6px 0;
  padding: 0 6px;
}

.fb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--c-border, #e4e6e5);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 7px;
}
.fb-item__img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: #fafafa;
}
.fb-item__info { flex: 1; min-width: 0; }
.fb-item__name {
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fb-item__meta { font-size: .74rem; color: var(--c-text-muted, #6b706d); margin-top: 2px; }
.fb-item__price { font-size: .84rem; font-weight: 700; white-space: nowrap; }
.fb-item__remove {
  border: none;
  background: none;
  color: #b3b7b3;
  font-size: 15px;
  padding: 4px;
  line-height: 1;
}
.fb-item__remove:hover { color: #d33; }

.fb-result__total {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  font-weight: 700;
  padding: 10px 2px 0;
}

.fb-unmatched {
  font-size: .74rem;
  color: var(--c-text-muted, #6b706d);
  margin-top: 8px;
}
.fb-unmatched--block {
  background: #f4f5f4;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 4px;
  line-height: 1.35;
}

.fb-error {
  background: #fdecea;
  color: #b3261e;
  font-size: .8rem;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .fb-teaser {
    right: 12px;
    left: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }
}

/* ── Dark · Knuspr tangerine-dark ── */
html[data-theme="dark"] .fb-teaser,
html[data-theme="dark"] .fb-modal,
html[data-theme="dark"] .fb-wizard,
html[data-theme="dark"] .fb-panel {
  background: #252525;
  color: #f2f4f4;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .fb-close {
  background: #1c2529;
  color: #f2f4f4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .fb-close:hover { background: #374045; }
html[data-theme="dark"] .fb-teaser h2,
html[data-theme="dark"] .fb-teaser h3,
html[data-theme="dark"] .fb-wizard h2,
html[data-theme="dark"] .fb-drop {
  color: #f2f4f4;
  background: #1c2529;
  border-color: #374045;
}
html[data-theme="dark"] .fb-drop--hover {
  background: #522500;
  border-color: #f88424;
}
html[data-theme="dark"] .fb-teaser p,
html[data-theme="dark"] .fb-wizard p {
  color: #b6bdc0;
}
html[data-theme="dark"] .fb-error {
  background: rgba(209, 17, 0, .18);
  color: #ec9f99;
}
