.twa-noscroll { overflow: hidden; }

.twa-wrap{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.twa-fab{
  width: 56px;
  height: 56px;
  border: none;
  cursor: pointer;
  border-radius: 16px;
  background: none;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
  display: grid;
  place-items: center;
}
.twa-fab img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ── Modal ── */
.twa-modal[hidden]{ display:none; }

.twa-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.twa-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.twa-card{
  position: absolute;
  right: 18px;
  bottom: 90px;
  width: min(420px, calc(100vw - 36px));
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.twa-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}
.twa-head-left{ flex: 1; min-width: 0; }

.twa-title{ font-size: 16px; font-weight: 700; color: #111; }
.twa-sub{ font-size: 13px; color: #666; margin-top: 2px; }

.twa-notice{
  font-size: 12.5px;
  background: #fff7e6;
  border-bottom: 1px solid #ffe1b3;
  color: #7a4b00;
  padding: 10px 16px;
  flex-shrink: 0;
  line-height: 1.45;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ── Toggle buttons ── */
.twa-toggle{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.twa-toggle-btn{
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #b8f0cd;
  border-radius: 8px;
  background: #e8fbef;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  color: #1a7a3a;
  text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}
.twa-toggle-btn:hover{
  border-color: #7de0a3;
  background: #d2f5df;
}
.twa-toggle-btn.twa-selected{
  background: #25d366;
  border-color: #1db954;
  color: #fff;
}

.twa-x{
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  flex-shrink: 0;
}

/* ── Back button ── */
.twa-back{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  padding: 0;
  margin-bottom: 8px;
}
.twa-back:hover{ color: #111; }
.twa-back[hidden]{ display: none; }

/* ── Body / Steps ── */
.twa-body{
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}

.twa-step[hidden]{ display: none; }

/* ── Menu buttons (Etapa 1) ── */
.twa-menu-btn{
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  gap: 10px;
}
.twa-menu-btn:hover{
  background: #f7f7f7;
  border-color: #d0d0d0;
}
.twa-menu-btn + .twa-menu-btn{
  margin-top: 8px;
}

.twa-menu-text{ flex: 1; min-width: 0; }
.twa-menu-title{ font-weight: 600; font-size: 14px; color: #111; }
.twa-menu-desc{ font-size: 12px; color: #888; margin-top: 2px; }

.twa-menu-arrow{
  flex-shrink: 0;
  font-size: 22px;
  color: #bbb;
  line-height: 1;
  display: flex;
  align-items: center;
}

/* ── Form fields (Etapa 2) ── */
.twa-label{
  display: block;
  font-size: 12px;
  color: #444;
  margin-top: 12px;
  font-weight: 600;
}
.twa-label:first-child{ margin-top: 0; }

.twa-input{
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.twa-input:focus{
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37,211,102,.15);
}

/* ── WhatsApp button reveal ── */
.twa-reveal{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .3s ease;
}
.twa-reveal.twa-show{
  max-height: 500px;
  opacity: 1;
  margin-top: 12px;
}

/* ── Aviso (prazo) ── */
.twa-aviso{
  font-size: 12.5px;
  background: #fff7e6;
  border: 1px solid #ffe1b3;
  color: #7a4b00;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.5;
}

/* ── Buttons ── */
.twa-btn{
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity .15s;
}
.twa-btn:hover{ opacity: .9; }

.twa-btn-wa{
  border-color: #25d366;
  background: #25d366;
  margin-top: 0;
}

.twa-btn-outline{
  background: #fff;
  color: #555;
  border-color: #ccc;
  font-weight: 600;
  font-size: 13px;
}
.twa-btn-outline:hover{
  background: #f7f7f7;
  color: #333;
  opacity: 1;
}

.twa-btn-posvenda{
  background: #fff;
  color: #111;
  border-color: #ddd;
}
.twa-btn-posvenda:hover{
  background: #f7f7f7;
  opacity: 1;
}

/* ── Footer ── */
.twa-foot{
  padding: 10px 14px 12px;
  border-top: 1px solid #eee;
  color: #666;
  flex-shrink: 0;
}

/* ── Mobile adjustments ── */
@media (max-width: 480px){
  .twa-card{
    right: 8px;
    bottom: 80px;
    width: calc(100vw - 16px);
  }
}
