/* Zé Apostas V3 · Home conversacional */

.za-conversation-home {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, var(--za-bg-surface-variant-131,rgba(56, 189, 248, .13)), transparent 28%),
    linear-gradient(180deg, var(--za-bg-surface-variant-132,#07111f) 0%, var(--za-bg-surface-variant-34,#020617) 100%);
}

.za-central-viva.za-conversation-home,
body.za-conversational-app {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

.za-conversation-home .za-conversation-layout {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.za-conversation-home .za-central-wrap.za-conversation-layout {
  width: 100%;
  max-width: none;
  margin: 0;
}

.za-conversation-home .za-ze-shell {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border-radius: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--za-bg-surface-variant-133,rgba(8, 15, 29, .94));
  border: 0;
  box-shadow: none;
}

.za-conversation-home .za-ze-shell.is-app-shell {
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  border-radius: 0;
}

.za-conversation-home .za-ze-shell.is-collapsed {
  min-height: 0;
}

.za-conversation-home .za-ze-shell.is-collapsed .za-ze-thread,
.za-conversation-home .za-ze-shell.is-collapsed .za-ze-taskbar {
  display: flex;
}

.za-conversation-home .za-ze-shell__top {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 52px;
  padding: 8px clamp(18px, 4vw, 64px);
  background: var(--za-app-canvas) !important;
  border-bottom: 1px solid var(--za-border-subtle-variant-81,rgba(148, 163, 184, .11));
  backdrop-filter: blur(14px);
}

.za-conversation-home .za-ze-shell__brand {
  min-width: 0;
}

.za-conversation-home .za-ze-shell__identity {
  min-width: 0;
}

.za-conversation-home .za-ze-shell__controls {
  flex-shrink: 0;
}

.za-conversation-home .za-ze-shell.is-app-shell .za-ze-shell__controls:empty {
  display: none;
}

.za-conversation-home .za-ze-shell__controls button,
.za-conversation-home .za-ze-taskbar button {
  min-height: 44px;
}

.za-conversation-home .za-ze-thread {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  max-height: none;
  padding: 24px clamp(24px, 5vw, 72px) 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 132px;
  scrollbar-gutter: stable;
}

.za-conversation-home .za-ze-msg {
  width: min(76%, 1120px);
  max-width: none;
}

.za-conversation-home .za-ze-msg--user {
  align-self: flex-end;
  width: fit-content;
  max-width: min(78%, 720px);
  margin-left: auto;
}

/* Assistant simple replies size to their text; rich replies keep the base content width. */
.za-conversation-home .za-ze-msg--ze.za-ze-msg--simple {
  align-self: flex-start;
  width: fit-content;
  max-width: min(72%, 900px);
}

.za-conversation-home .za-ze-msg--ze.za-ze-msg--simple .za-ze-msg__bubble {
  width: fit-content;
  max-width: calc(100% - 49px);
  text-align: left;
}

/* Typing is its own compact message state; it never inherits rich-message width. */
.za-conversation-home .za-ze-msg--typing {
  align-self: flex-start;
  width: auto;
  max-width: none;
}

.za-conversation-home .za-ze-msg--typing .za-ze-typing-bubble {
  width: fit-content;
  min-width: 0;
  max-width: none;
  flex: 0 0 auto;
}

.za-conversation-home .za-ze-msg__bubble {
  width: 100%;
  max-width: 100%;
  padding: 16px;
  border-radius: 22px;
}

.za-conversation-home .za-ze-msg--user .za-ze-msg__bubble {
  width: fit-content;
  max-width: calc(100% - 49px);
  text-align: left;
}

.za-conversation-home .za-ze-opening {
  display: grid;
  gap: 10px;
}

.za-conversation-home .za-concierge-message-text {
  margin: 0;
  color: var(--za-text-secondary-variant-2,#e2e8f0);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.48;
  white-space: pre-line;
}

.za-conversation-home .za-ze-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--za-chat-action-gap, 10px);
}

.za-conversation-home .za-ze-actions button,
.za-conversation-home .za-ze-actions a {
  min-width: 0;
  min-height: var(--za-chat-action-height, 44px);
  justify-content: center;
  white-space: normal;
  text-align: center;
}


/* =========================================================
   TASKBAR / COMPOSER
   ========================================================= */

.za-conversation-home .za-ze-taskbar {
  position: relative;
  z-index: 9;

  margin: 0;
  gap: var(--za-chat-action-gap, 10px);

  padding:
    14px max(24px, calc(env(safe-area-inset-right) + 24px))
    max(16px, calc(env(safe-area-inset-bottom) + 16px))
    max(24px, calc(env(safe-area-inset-left) + 24px));

  border-top: 1px solid var(--za-border-subtle-variant-82,rgba(148, 163, 184, .13));

  background: var(--za-bg-surface-variant-135,rgba(8, 15, 29, .96));
  backdrop-filter: blur(16px);

  align-items: flex-end;
}


/*
 * Mantém compatibilidade temporária caso ainda exista INPUT.
 * Quando o PHP virar TEXTAREA, o bloco abaixo assume.
 */
.za-conversation-home .za-ze-taskbar input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;

  padding: 0 19px;

  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  background: transparent !important;
  color: inherit;

  font: inherit;
  font-size: 15px;

  box-sizing: border-box;
}


/*
 * Campo conversacional definitivo.
 *
 * O textarea começa com uma linha e pode crescer
 * até aproximadamente três linhas.
 */
.za-conversation-home .za-ze-taskbar textarea {
  flex: 1 1 auto;

  width: 100%;
  min-width: 0;

  min-height: 52px;
  max-height: 116px;

  height: 52px;

  padding: 14px 19px;

  resize: none;

  overflow-x: hidden;
  overflow-y: hidden;

  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;

  background: transparent !important;
  color: inherit;

  font: inherit;
  font-size: 15px;
  line-height: 1.45;

  box-sizing: border-box;

  white-space: pre-wrap;
  overflow-wrap: break-word;

  scrollbar-width: thin;
}


/*
 * Remove também qualquer foco/borda que navegador,
 * tema ou CSS legado tente colocar dentro do composer.
 */
.za-conversation-home .za-ze-taskbar input:focus,
.za-conversation-home .za-ze-taskbar textarea:focus,
.za-conversation-home .za-ze-taskbar input:focus-visible,
.za-conversation-home .za-ze-taskbar textarea:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}


/*
 * Botões laterais do composer.
 */
.za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu,
.za-conversation-home .za-ze-taskbar #zaZeSend {
  width: 52px;
  height: 52px;

  min-width: 52px;
  min-height: 52px;

  max-width: 52px;
  max-height: 52px;

  flex: 0 0 52px;
}


/* =========================================================
   DRAWER
   ========================================================= */

.za-conversation-home .za-ze-drawer {
  position: absolute;
  z-index: 12;

  left: 14px;
  right: 14px;

  bottom: calc(74px + env(safe-area-inset-bottom));

  max-height: min(420px, calc(100dvh - 150px));
  overflow-y: auto;

  /*
   * RESPIRO ENTRE BORDA E BOTÕES.
   */
  padding: 12px;

  /*
   * ESPAÇO ENTRE OS BOTÕES.
   */
  gap: 8px;

  box-sizing: border-box;

  border: 1px solid var(--za-border-subtle-variant-83,rgba(125, 211, 252, .22));

  background: var(--za-bg-surface-variant-136,rgba(8, 15, 29, .98));

  box-shadow:
    0 24px 70px var(--za-shadow-color-variant-42,rgba(0, 0, 0, .45));
}

.za-conversation-home .za-ze-drawer.is-open {
  display: grid;
}


/*
 * Drawer compacto:
 * botão se explica pelo próprio nome.
 */
.za-conversation-home .za-ze-drawer > a,
.za-conversation-home .za-ze-drawer > button {
  width: 100%;

  min-width: 0;
  min-height: 44px;

  margin: 0;
  padding: 0 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  text-align: center;
}


/*
 * Não deixa estilos antigos criarem espaçamento
 * ou altura excessiva.
 */
.za-conversation-home .za-ze-drawer strong {
  display: block;

  margin: 0;

  line-height: 1.2;

  text-align: center;
}


/*
 * Segurança:
 * caso algum SPAN explicativo sobreviva no PHP,
 * ele não aparece.
 *
 * Depois que você substituir o PHP do drawer,
 * isto simplesmente deixa de ter efeito.
 */
.za-conversation-home .za-ze-drawer > a > span:not(.za-ze-drawer__label):not(.za-ze-drawer__icon),
.za-conversation-home .za-ze-drawer > button > span:not(.za-ze-drawer__label):not(.za-ze-drawer__icon) {
  display: none !important;
}

/* R25.4.33.2.4 · Keep the canonical launcher label visible. */
.za-conversation-home .za-ze-drawer .za-ze-drawer__label {
  display: inline !important;
}


.za-conversation-home .za-info-modal {
  z-index: 40;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .za-conversation-home .za-conversation-layout {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .za-conversation-home .za-ze-shell {
    border-radius: 0;
  }

  .za-conversation-home .za-ze-shell__top {
    min-height: 50px;
    padding-inline: 12px;
  }

  .za-conversation-home .za-ze-thread {
    gap: 18px;
    padding: 16px 12px 22px;
  }

  .za-conversation-home .za-ze-msg {
    width: 88%;
  }

  .za-conversation-home .za-ze-msg--user {
    width: fit-content;
    max-width: 86%;
  }

  .za-conversation-home .za-ze-msg--ze.za-ze-msg--simple {
    width: fit-content;
    max-width: 86%;
  }

  .za-conversation-home .za-ze-msg--typing {
    align-self: flex-start;
    width: auto;
    max-width: none;
  }

  .za-conversation-home .za-ze-msg__bubble {
    padding: 14px;
    border-radius: 18px;
  }

  .za-conversation-home .za-ze-actions {
    grid-template-columns: 1fr;
    gap: 9px;
  }


  /*
   * Composer mobile.
   */
  .za-conversation-home .za-ze-taskbar {
    gap: 8px;

    padding:
      10px max(10px, calc(env(safe-area-inset-right) + 10px))
      max(12px, calc(env(safe-area-inset-bottom) + 12px))
      max(10px, calc(env(safe-area-inset-left) + 10px));
  }

  .za-conversation-home .za-ze-taskbar input {
    min-width: 0;
    min-height: 48px;

    padding: 0 17px;

    font-size: 16px;
  }

  .za-conversation-home .za-ze-taskbar textarea {
    min-width: 0;

    min-height: 48px;
    max-height: 108px;

    height: 48px;

    padding: 12px 17px;

    font-size: 16px;
    line-height: 1.45;
  }

  .za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu,
  .za-conversation-home .za-ze-taskbar #zaZeSend {
    width: 48px;
    height: 48px;

    min-width: 48px;
    min-height: 48px;

    max-width: 48px;
    max-height: 48px;

    flex-basis: 48px;
  }


  /*
   * Drawer mobile.
   */
  .za-conversation-home .za-ze-drawer {
    left: 10px;
    right: 10px;

    bottom: calc(70px + env(safe-area-inset-bottom));

    max-height: min(380px, calc(100dvh - 132px));

    padding: 10px;
    gap: 8px;
  }

  .za-conversation-home .za-ze-drawer > a,
  .za-conversation-home .za-ze-drawer > button {
    min-height: 44px;
    padding-inline: 14px;
  }
}


/* =========================================================
   TELAS MUITO ESTREITAS
   ========================================================= */

@media (max-width: 360px) {

  .za-conversation-home .za-ze-shell__top {
    gap: 8px;
  }

  .za-conversation-home .za-ze-shell__controls {
    gap: 6px;
  }

  .za-conversation-home .za-ze-taskbar input,
  .za-conversation-home .za-ze-taskbar textarea {
    min-width: 0;
  }
}


/* =========================================================
   ACESSIBILIDADE / REDUÇÃO DE MOVIMENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .za-conversation-home *,
  .za-conversation-home *::before,
  .za-conversation-home *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* R25.4.30.6.1 · Shell chrome correction (conversation-home precedence)
   Keep the generous touch target, but make menu/send visually icon-only and transparent.
*/
.za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu,
.za-conversation-home .za-ze-taskbar #zaZeSend{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
  color:var(--za-text-primary-variant-43,rgba(226,232,240,.78))!important;
}
.za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu:hover,
.za-conversation-home .za-ze-taskbar #zaZeSend:hover{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--za-text-primary-variant-30,#f8fafc)!important;
}
.za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu:focus-visible,
.za-conversation-home .za-ze-taskbar #zaZeSend:focus-visible{
  outline:1px solid var(--za-border-subtle-variant-80,rgba(125,211,252,.58))!important;
  outline-offset:3px!important;
  background:transparent!important;
}
.za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu svg,
.za-conversation-home .za-ze-taskbar #zaZeSend svg{
  width:21px!important;
  height:21px!important;
  display:block;
}
@media(max-width:640px){
  .za-conversation-home .za-ze-taskbar .za-ze-taskbar__menu svg,
  .za-conversation-home .za-ze-taskbar #zaZeSend svg{width:20px!important;height:20px!important}
}

/* R25.4.31.2 · send icon horizontal alignment corrective */
.za-conversation-home .za-ze-taskbar #zaZeSend svg{
  transform:translateX(1px) rotate(45deg)!important;
  transform-origin:center!important;
}




