/* ============================================================
   Bahia Bartender - Funil Multi-Step (Modal)
   Mobile-first / breakpoints: 480, 768
   ============================================================ */

.funil-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: stretch;
  justify-content: center;
  background: rgba(10,6,4,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: funil-fade .28s ease-out;
}
.funil-modal.is-open { display: flex; }
.funil-modal[aria-hidden="false"] { display: flex; }

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

.funil-panel {
  position: relative;
  background: #1B130C;
  width: 100%;
  display: flex;
  flex-direction: column;
  color: #F8F1E4;
  font-family: var(--font-body, "Manrope", sans-serif);
  /* Mobile: tela inteira */
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  animation: funil-slide .35s cubic-bezier(.16,1,.3,1);
}
@keyframes funil-slide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (min-width: 768px) {
  .funil-modal { padding: 24px; }
  .funil-panel {
    max-width: 720px;
    height: auto;
    max-height: calc(100dvh - 48px);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
  }
}

/* HEADER */
.funil-header {
  flex: 0 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(224,165,44,.18);
  background: linear-gradient(180deg,#0A0604 0%, #1B130C 100%);
}
.funil-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
}
.funil-progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg,#F2C14E,#E0A52C);
  border-radius: 999px;
  transition: width .35s ease;
}
.funil-step-label {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #C9BFAE;
  white-space: nowrap;
}
.funil-step-label strong {
  color: #E0A52C;
}
.funil-close {
  background: transparent;
  border: 0;
  color: #C9BFAE;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.funil-close:hover { background: rgba(255,255,255,.06); color: #fff; }

/* BODY */
.funil-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 16px;
}

@media (min-width: 768px) {
  .funil-body { padding: 32px 40px 16px; }
}

.funil-step {
  display: none;
  animation: funil-step-in .3s ease-out;
}
.funil-step.is-active { display: block; }
@keyframes funil-step-in {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.funil-step h2 {
  font-family: var(--font-display, Georgia), serif;
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: 0 0 8px;
  color: #F8F1E4;
  line-height: 1.15;
}
.funil-step .funil-help {
  font-size: 14px;
  color: #C9BFAE;
  margin: 0 0 20px;
}

/* Cards de pacote (step 1) */
.funil-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.funil-card {
  border: 2px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: border-color .2s, transform .15s, background .2s;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: inherit;
}
.funil-card:hover { border-color: rgba(224,165,44,.5); }
.funil-card.is-selected {
  border-color: #E0A52C;
  background: rgba(224,165,44,.08);
}
.funil-card-num {
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #E0A52C;
  display: block;
  margin-bottom: 4px;
}
.funil-card-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #F8F1E4;
}
.funil-card-price {
  font-size: 22px;
  color: #E0A52C;
  font-weight: 700;
  margin-bottom: 6px;
}
.funil-card-price small { font-size: 13px; color: #C9BFAE; font-weight: 400; }
.funil-card-desc {
  font-size: 13px;
  color: #C9BFAE;
  margin: 0;
}

/* Drinks pickers (step 2) */
.funil-drinks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 480px) {
  .funil-drinks { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .funil-drinks { grid-template-columns: repeat(3, 1fr); }
}
.funil-drink {
  border: 2px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #F8F1E4;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  transition: border-color .2s, background .2s;
  text-align: left;
}
.funil-drink:hover { border-color: rgba(224,165,44,.4); }
.funil-drink.is-selected {
  border-color: #E0A52C;
  background: rgba(224,165,44,.12);
}
.funil-drink .dot {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(224,165,44,.5);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.funil-drink.is-selected .dot {
  border-color: #E0A52C;
  background: #E0A52C;
}
.funil-drink.is-selected .dot::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0A0604;
  font-size: 10px;
  font-weight: 700;
}
.funil-drinks-cat {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #E0A52C;
  margin: 18px 0 6px;
  font-weight: 600;
}
.funil-drinks-cat:first-child { margin-top: 0; }

.funil-pick-counter {
  font-size: 13px;
  color: #C9BFAE;
  margin-top: 12px;
  text-align: center;
  padding: 8px;
  background: rgba(0,0,0,.2);
  border-radius: 8px;
}
.funil-pick-counter strong { color: #E0A52C; }

/* Form fields */
.funil-field {
  margin-bottom: 16px;
}
.funil-field label {
  display: block;
  font-size: 13px;
  color: #C9BFAE;
  margin-bottom: 6px;
  font-weight: 500;
}
.funil-field label .req { color: #E0A52C; }

.funil-field input,
.funil-field select,
.funil-field textarea {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 13px 14px;
  color: #F8F1E4;
  /* Mínimo 16px pra evitar zoom no iOS */
  font-size: 16px;
  font-family: inherit;
  transition: border-color .2s, background .2s;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}
.funil-field input:focus,
.funil-field select:focus,
.funil-field textarea:focus {
  outline: 0;
  border-color: #E0A52C;
  background: rgba(255,255,255,.06);
}
.funil-field input::placeholder,
.funil-field textarea::placeholder {
  color: rgba(201,191,174,.5);
}
.funil-field textarea { resize: vertical; min-height: 80px; }

/* Select arrow */
.funil-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23E0A52C' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.funil-field select option { background: #1B130C; color: #F8F1E4; }

.funil-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 480px) {
  .funil-row.cols-2 { grid-template-columns: 1fr 1fr; }
}

/* Erro de validacao */
.funil-error {
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.3);
  color: #ff9999;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}
.funil-field.has-error input,
.funil-field.has-error select,
.funil-field.has-error textarea {
  border-color: #ff6b6b;
}

/* Honeypot - escondido visualmente mas presente no DOM */
.funil-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* LGPD */
.funil-lgpd {
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 14px;
  margin-top: 16px;
}
.funil-lgpd label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #C9BFAE;
  cursor: pointer;
  line-height: 1.5;
}
.funil-lgpd input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #E0A52C;
  flex-shrink: 0;
}
.funil-lgpd a { color: #E0A52C; text-decoration: underline; }

/* Resumo (step 5) */
.funil-resumo {
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(224,165,44,.2);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}
.funil-resumo-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: 14px;
}
.funil-resumo-row:last-child { border-bottom: 0; }
.funil-resumo-row .lbl { color: #C9BFAE; }
.funil-resumo-row .val { color: #F8F1E4; font-weight: 500; text-align: right; }

/* FOOTER (botoes navegacao) */
.funil-footer {
  flex: 0 0 auto;
  padding: 14px 20px;
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(224,165,44,.18);
  background: #110B07;
  /* Safe area pra iPhones com notch */
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .funil-footer { padding: 18px 40px; }
}
.funil-btn {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s, opacity .2s;
}
.funil-btn-primary {
  background: linear-gradient(135deg,#F2C14E,#E0A52C);
  color: #0A0604;
}
.funil-btn-primary:hover { transform: translateY(-1px); }
.funil-btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.funil-btn-ghost {
  background: transparent;
  border: 2px solid rgba(255,255,255,.18);
  color: #F8F1E4;
  flex: 0 0 auto;
  padding: 0 18px;
}
.funil-btn-ghost:hover { border-color: #E0A52C; color: #E0A52C; }

/* Sucesso */
.funil-success {
  text-align: center;
  padding: 30px 0;
}
.funil-success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg,#F2C14E,#E0A52C);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0A0604;
  font-size: 40px;
  font-weight: 700;
}
.funil-success h2 { margin-bottom: 12px; }
.funil-success p { color: #C9BFAE; margin: 0 0 24px; }
.funil-protocolo {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(224,165,44,.1);
  border: 1px solid rgba(224,165,44,.3);
  border-radius: 999px;
  font-size: 13px;
  color: #E0A52C;
  letter-spacing: .1em;
  margin-bottom: 24px;
}

/* Loading state */
.funil-btn-primary.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.funil-btn-primary.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(10,6,4,.3);
  border-top-color: #0A0604;
  border-radius: 50%;
  animation: funil-spin .7s linear infinite;
}
@keyframes funil-spin {
  to { transform: rotate(360deg); }
}

/* Trava scroll do body quando modal aberto */
body.funil-open { overflow: hidden; }

/* ============================================================
   Drink Cards - Step 2 do funil (com emoji + descricao)
   Mobile-first
============================================================ */
.funil-drinks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 6px 0 12px;
}
@media (min-width: 480px) {
  .funil-drinks-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .funil-drinks-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}

.funil-drink-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: #F8F1E4;
  min-height: 56px;
  transition: border-color .2s, background .2s, transform .15s;
  position: relative;
}
.funil-drink-card:hover {
  border-color: rgba(224,165,44,.5);
  background: rgba(255,255,255,.05);
}
.funil-drink-card.is-selected {
  border-color: #E0A52C;
  background: rgba(224,165,44,.12);
}
.funil-drink-emoji {
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.funil-drink-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.funil-drink-info strong {
  font-size: 14px;
  font-weight: 600;
  color: #F8F1E4;
  line-height: 1.2;
}
.funil-drink-info small {
  font-size: 11px;
  color: rgba(201,191,174,.7);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.funil-drink-check {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(224,165,44,.4);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: background .2s, border-color .2s;
}
.funil-drink-card.is-selected .funil-drink-check {
  background: #E0A52C;
  border-color: #E0A52C;
}
.funil-drink-card.is-selected .funil-drink-check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0A0604;
  font-size: 13px;
  font-weight: 800;
}

/* ============================================================
   Dialogo de confirmacao (Limite Pacote 02 -> Pacote 03)
============================================================ */
.funil-confirm {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10,6,4,.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: funil-fade .25s ease-out;
}
.funil-confirm[hidden] { display: none; }
.funil-confirm-panel {
  background: linear-gradient(180deg,#221912 0%, #1a1410 100%);
  border: 2px solid rgba(224,165,44,.35);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  animation: funil-slide .35s cubic-bezier(.16,1,.3,1);
}
.funil-confirm-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.funil-confirm-panel h3 {
  font-family: var(--font-display, Georgia), serif;
  font-size: 22px;
  margin: 0 0 12px;
  color: #E0A52C;
}
.funil-confirm-panel p {
  font-size: 14px;
  color: #C9BFAE;
  line-height: 1.55;
  margin: 0 0 22px;
}
.funil-confirm-panel p strong { color: #F8F1E4; }
.funil-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 480px) {
  .funil-confirm-actions { flex-direction: row; }
  .funil-confirm-actions .funil-btn { flex: 1; }
}

/* ============================================================
   Date / Time picker icons em amber
============================================================ */
.funil-field input[type="date"],
.funil-field input[type="time"] {
  color-scheme: dark;
}
.funil-field input[type="date"]::-webkit-calendar-picker-indicator,
.funil-field input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(70%) sepia(60%) saturate(700%) hue-rotate(360deg) brightness(95%);
  cursor: pointer;
  opacity: 0.85;
  padding: 4px;
  border-radius: 4px;
  transition: opacity .15s, background .15s;
}
.funil-field input[type="date"]::-webkit-calendar-picker-indicator:hover,
.funil-field input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: rgba(224,165,44,.15);
}

/* ============================================================
   Counter +/- para Convidados
============================================================ */
.funil-counter {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
  transition: border-color .2s, background .2s;
  min-height: 48px;
}
.funil-counter:focus-within {
  border-color: #E0A52C;
  background: rgba(255,255,255,.06);
}
.funil-counter button {
  width: 52px;
  background: rgba(255,255,255,.05);
  border: 0;
  color: #E0A52C;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .2s, color .2s;
  line-height: 1;
}
.funil-counter button:hover {
  background: rgba(224,165,44,.18);
  color: #F2C14E;
}
.funil-counter button:active {
  transform: scale(0.96);
}
.funil-counter button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.funil-counter input {
  flex: 1;
  background: transparent !important;
  border: 0 !important;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: #F8F1E4;
  min-height: 48px;
  padding: 0 4px !important;
  -moz-appearance: textfield;
}
.funil-counter input::-webkit-outer-spin-button,
.funil-counter input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.funil-counter input:focus { outline: 0; }

/* ============================================================
   Autocomplete (Local do evento - via OSM Nominatim)
============================================================ */
.funil-autocomplete {
  position: relative;
}
.funil-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1a1410;
  border: 1px solid rgba(224,165,44,.35);
  border-radius: 10px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.funil-autocomplete-dropdown[hidden] { display: none; }
.funil-autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #F8F1E4;
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: background .15s;
}
.funil-autocomplete-item:last-child { border-bottom: 0; }
.funil-autocomplete-item:hover,
.funil-autocomplete-item.is-active {
  background: rgba(224,165,44,.15);
}
.funil-autocomplete-item strong {
  display: block;
  font-size: 14px;
  color: #F8F1E4;
  font-weight: 600;
}
.funil-autocomplete-item small {
  display: block;
  color: #C9BFAE;
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.3;
}
.funil-autocomplete-loading,
.funil-autocomplete-empty {
  padding: 12px 14px;
  text-align: center;
  font-size: 12px;
  color: #C9BFAE;
}
.funil-autocomplete-hint {
  font-size: 11px;
  color: rgba(201,191,174,.55);
  margin: 6px 0 0;
  font-style: italic;
}

