/*
 * Mensagem Auto — padronização visual com a subpágina Ticket.
 * Somente aparência (cores, fontes, bordas, tamanhos e espaçamentos) da Mensagem Auto.
 * Todos os seletores ficam presos a .mensagem-auto-react; nenhuma outra página é afetada.
 * Valores copiados do estilo calculado do Ticket (lista, janela "Novo Painel" e editor).
 */

/* ---------- Lista "Meus Painéis" ---------- */
#root#root .mensagem-auto-react #dashboard-view {
  min-height: 100vh;
  background: #0d0d0d !important;
  color: #f7f7f7;
  font-size: 14px;
  line-height: 1.45;
}
#root#root .mensagem-auto-react #dashboard-view .container {
  padding: 42px 28px !important;
  background: transparent !important;
  line-height: 1.45;
}
#root#root .mensagem-auto-react #dashboard-view .top .spike-shared-page-intro__title {
  font-size: 32px !important;
  line-height: 1.12 !important;
  letter-spacing: -0.04em !important;
  color: #ececec !important;
}
#root#root .mensagem-auto-react #dashboard-view .top { margin-bottom: 18px !important; }
#root#root .mensagem-auto-react #dashboard-view .top > .btn-main { min-height: 42px !important; }
#root#root .mensagem-auto-react #dashboard-view .grid > .card {
  border-color: #383838 !important;
  box-shadow: none !important;
}
#root#root .mensagem-auto-react #dashboard-view .container .badge,
#root#root .mensagem-auto-react #dashboard-view .container .badge.on {
  padding: 4px 7px !important;
  border: 1px solid rgba(192, 192, 192, .30) !important;
  background: #121212 !important;
  color: #c0c0c0 !important;
  font-size: 8px !important;
  line-height: 1.45 !important;
  letter-spacing: .04em !important;
}
#root#root .mensagem-auto-react #dashboard-view .container .panel-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
#root#root .mensagem-auto-react #dashboard-view .container .act {
  font-size: 12px !important;
  line-height: 1.45 !important;
}
#root#root .mensagem-auto-react #dashboard-view .container .act.danger {
  border-color: #ef4444 !important;
  background: rgba(127, 29, 29, .32) !important;
  color: #f87171 !important;
  box-shadow: none !important;
}
#root#root .mensagem-auto-react #dashboard-view .container .act.danger:hover {
  background: rgba(127, 29, 29, .48) !important;
  color: #fca5a5 !important;
}
#root#root .mensagem-auto-react #dashboard-view .panel-preview {
  border-color: #383838 !important;
  background: #121212 !important;
}
#root#root .mensagem-auto-react #dashboard-view .panel-preview-tag { color: #999999 !important; }
#root#root .mensagem-auto-react #dashboard-view .panel-preview-top > :nth-child(2) { color: #b8b8b8 !important; }

/* ---------- Janela "Novo Painel" ---------- */
#root#root .mensagem-auto-react #dashboard-view .overlay .body > div { margin-bottom: 14px; }
#root#root .mensagem-auto-react #dashboard-view .overlay .body > div:last-child { margin-bottom: 0; }
#root#root .mensagem-auto-react #dashboard-view .overlay {
  background: rgba(0, 0, 0, .76) !important;
  color: #ececec;
}
#root#root .mensagem-auto-react #dashboard-view .overlay .modal {
  border-color: #383838 !important;
  border-radius: 16px !important;
}
#root#root .mensagem-auto-react #dashboard-view .overlay .close {
  border-color: #383838 !important;
  background: #262626 !important;
  color: #ececec !important;
}
#root#root .mensagem-auto-react #dashboard-view .overlay .close:hover {
  border-color: #c0c0c0 !important;
  color: #c0c0c0 !important;
}
#root#root .mensagem-auto-react #dashboard-view .overlay .label,
#root#root .mensagem-auto-react #dashboard-view .overlay label {
  color: #e1e1e1 !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1.45 !important;
}
#root#root .mensagem-auto-react #dashboard-view .overlay :is(.input, input:not([type="checkbox"]):not([type="radio"]):not([type="color"])) {
  padding: 10px 11px !important;
  border-color: #252525 !important;
  border-radius: 8px !important;
  background: #151515 !important;
  color: #e0e0e0 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
#root#root .mensagem-auto-react #dashboard-view .overlay :is(.select, select) {
  min-height: 44px !important;
  padding: 10px 38px 10px 14px !important;
  border: 1px solid rgba(255, 255, 255, .09) !important;
  border-radius: 10px !important;
  background: #0d0d0d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d0d0d0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center !important;
  color: #f8f8f8 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
}
#root#root .mensagem-auto-react #dashboard-view .overlay :is(.input, .select, input, select):focus,
#root#root .mensagem-auto-react #dashboard-view .overlay :is(.select, select):hover {
  border-color: #c0c0c0 !important;
  box-shadow: 0 0 0 3px rgba(192, 192, 192, .12) !important;
  outline: none !important;
}

/* ---------- Editor ---------- */
#root#root .mensagem-auto-react #editor-view .app {
  background: #0d0d0d !important;
  color: #ececec !important;
  font-family: Outfit, sans-serif !important;
}
#root#root .mensagem-auto-react #editor-view .app :is(button, input, select, textarea, .spike-settings-select-trigger) {
  font-family: inherit;
}
#root#root .mensagem-auto-react #editor-view .app .sidebar { border-right-color: #383838 !important; }
#root#root .mensagem-auto-react #editor-view .app .main .topbar { border-bottom-color: #383838 !important; }

/* Marca com o quadrado "S", igual ao Ticket. */
#root#root .mensagem-auto-react #editor-view .app .brand .logo {
  display: grid !important;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 13px !important;
  background: #c0c0c0 !important;
  background-image: none !important;
  color: #ececec !important;
  font-weight: 1000;
  box-shadow: 0 10px 28px rgba(192, 192, 192, .24) !important;
}

/* Navegação lateral */
#root#root .mensagem-auto-react #editor-view .app .nav-btn.active {
  border-color: rgba(192, 192, 192, .30) !important;
  background: linear-gradient(90deg, rgba(192, 192, 192, .10), rgba(192, 192, 192, .03)) !important;
  color: #c0c0c0 !important;
}
#root#root .mensagem-auto-react #editor-view .app .nav-btn.active .nav-icon {
  background: linear-gradient(135deg, #c0c0c0, #999999) !important;
  color: #0e0e0e !important;
}

/* Cabeçalho da etapa */
#root#root .mensagem-auto-react #editor-view .app .page { padding-bottom: 34px !important; }
#root#root .mensagem-auto-react #editor-view .app .page-head .eyebrow { color: #999999 !important; }
#root#root .mensagem-auto-react #editor-view .app .page-head .pill {
  border-color: #383838 !important;
  background: #121212 !important;
  color: #999999 !important;
}

/* Cartões: moldura com rótulo superior, como "Painel de tickets". */
#root#root .mensagem-auto-react #editor-view .stack .card {
  padding: 18px !important;
  border-color: #383838 !important;
  box-shadow: none !important;
  color: #ececec !important;
}
#root#root .mensagem-auto-react #editor-view .stack .card.accent {
  border-color: rgba(192, 192, 192, .30) !important;
  box-shadow: none !important;
}
#root#root .mensagem-auto-react #editor-view .stack .card::before {
  content: "Painel de anúncios";
  display: block;
  color: #7e7e7e;
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#root#root .mensagem-auto-react #editor-view .stack .card-head {
  border-bottom-color: #383838 !important;
  color: #ececec !important;
}
#root#root .mensagem-auto-react #editor-view .stack .card-head small { color: #999999 !important; }
#root#root .mensagem-auto-react #editor-view .stack .card-body { color: #ececec !important; }

/* Campos de digitação */
#root#root .mensagem-auto-react #editor-view .stack :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="hidden"]), textarea) {
  padding-left: 11px !important;
  padding-right: 11px !important;
  border: 1px solid #383838 !important;
  border-radius: 9px !important;
  background: #0d0d0d !important;
  color: #ececec !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
#root#root .mensagem-auto-react #editor-view .stack .image-input-wrap input { padding-right: 46px !important; }
#root#root .mensagem-auto-react #editor-view .stack :is(input, textarea):focus {
  border-color: #c0c0c0 !important;
  box-shadow: 0 0 0 3px rgba(192, 192, 192, .12) !important;
  outline: none !important;
}
#root#root .mensagem-auto-react #editor-view .stack .spike-settings-select-trigger {
  border: 1px solid #383838 !important;
  border-radius: 9px !important;
  background-color: #0d0d0d !important;
  color: #ececec !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
}
#root#root .mensagem-auto-react #editor-view .stack .spike-settings-select-trigger:is(:hover, :focus-visible) {
  border-color: #c0c0c0 !important;
  box-shadow: 0 0 0 3px rgba(192, 192, 192, .12) !important;
  outline: none !important;
}

/* Variáveis rápidas */
#root#root .mensagem-auto-react #editor-view .stack .card .variables .chip {
  border-color: #383838 !important;
  background: #121212 !important;
  color: #b8b8b8 !important;
}
#root#root .mensagem-auto-react #editor-view .stack .card .variables .chip:hover {
  border-color: #c0c0c0 !important;
  background: rgba(192, 192, 192, .10) !important;
  color: #ececec !important;
}

/* Botões */
#root#root .mensagem-auto-react #editor-view .stack .btn.small:not(.danger),
#root#root .mensagem-auto-react #editor-view .stack .btn.full {
  background: #080808 !important;
  color: #e5e7eb !important;
}
#root#root .mensagem-auto-react #editor-view .stack .btn.danger {
  border-color: #ef4444 !important;
  background: rgba(127, 29, 29, .32) !important;
  color: #f87171 !important;
  box-shadow: none !important;
}
#root#root .mensagem-auto-react #editor-view .stack .btn.danger:hover {
  background: rgba(127, 29, 29, .48) !important;
  color: #fca5a5 !important;
}

/* Dias de envio: seleção neutra como a navegação do Ticket. */
#root#root .mensagem-auto-react #editor-view .stack .schedule-day {
  border-color: #383838 !important;
  background: #121212 !important;
  color: #b8b8b8 !important;
  box-shadow: none !important;
}
#root#root .mensagem-auto-react #editor-view .stack .schedule-day:hover {
  border-color: #c0c0c0 !important;
  color: #ececec !important;
}
#root#root .mensagem-auto-react #editor-view .stack .schedule-day.active {
  border-color: rgba(192, 192, 192, .30) !important;
  background: linear-gradient(90deg, rgba(192, 192, 192, .16), rgba(192, 192, 192, .06)) !important;
  color: #ececec !important;
}
#root#root .mensagem-auto-react #editor-view .stack .time-tag {
  border-color: #383838 !important;
  background: #121212 !important;
  color: #ececec !important;
}

/* Interruptores */
#root#root .mensagem-auto-react #editor-view .stack .switch input:checked + .slider { background: #c0c0c0 !important; }
#root#root .mensagem-auto-react #editor-view .stack .switch input:checked + .slider::after {
  left: 21px !important;
  background: #ffffff !important;
}

/* Prévia */
#root#root .mensagem-auto-react #editor-view .preview-shell { box-shadow: 0 10px 28px rgba(0, 0, 0, .28) !important; }

/* ---------- Celular (mesmo ponto de quebra do Ticket) ---------- */
@media (max-width: 760px) {
  #root#root .mensagem-auto-react #dashboard-view .container { padding: 18px 12px 92px !important; }
  #root#root .mensagem-auto-react #dashboard-view .top .spike-shared-page-intro__title {
    font-size: 24px !important;
    line-height: 1.1 !important;
  }
  #root#root .mensagem-auto-react #dashboard-view .top > .btn-main {
    width: auto !important;
    max-width: none !important;
    min-height: 42px !important;
    padding: 11px 17px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  #root#root .mensagem-auto-react #dashboard-view .container .act {
    min-height: 40px !important;
    padding: 8px 6px !important;
    font-size: 12px !important;
  }
  #root#root .mensagem-auto-react #dashboard-view .container .act.danger {
    min-height: 44px !important;
    font-size: 11px !important;
  }

  #root#root .mensagem-auto-react #editor-view .app .topbar {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  #root#root .mensagem-auto-react #editor-view .app .topbar .btn {
    min-height: 40px !important;
    padding: 8px 11px !important;
  }
  #root#root .mensagem-auto-react #editor-view .app .page { padding: 15px 12px 34px !important; }
  #root#root .mensagem-auto-react #editor-view .app .page-head { margin-bottom: 15px !important; }
  #root#root .mensagem-auto-react #editor-view .app .page-head h1 { font-size: 23px !important; }
  #root#root .mensagem-auto-react #editor-view .app .page-head p {
    max-width: none !important;
    font-size: 11px !important;
    line-height: 1.55 !important;
  }
  #root#root .mensagem-auto-react #editor-view .stack .card-head,
  #root#root .mensagem-auto-react #editor-view .stack .card-body { padding: 13px !important; }
  #root#root .mensagem-auto-react #editor-view .stack input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="hidden"]) {
    min-height: 42px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  #root#root .mensagem-auto-react #editor-view .preview-top { padding: 0 11px !important; }
}
