/* Home v2: cards with the same elevation as the composer, gradient icon tiles. Loaded after home-premium.css. */
:root{
  --hv2-chat-a:#22d3b0;--hv2-chat-b:#0a8f7b;
  --hv2-code-a:#9d8cff;--hv2-code-b:#5b45e0;
  --hv2-image-a:#ffbe55;--hv2-image-b:#f0663c;
  --hv2-voice-a:#5cc2ff;--hv2-voice-b:#2f68e6;
  --hv2-live-a:#4fd69c;--hv2-live-b:#12945f;
  --hv2-card:#ffffff;
  --hv2-shadow:0 1px 0 #ffffff inset,0 2px 4px #0c4c3d0d,0 8px 18px #0c4c3d14,0 22px 48px #0c4c3d26;
  --hv2-shadow-hover:0 1px 0 #ffffff inset,0 3px 6px #0c4c3d10,0 12px 24px #0c4c3d1a,0 28px 56px #0c4c3d30;
}
:root[data-theme="dark"]{--hv2-card:var(--home-card);--hv2-shadow:0 1px 0 #ffffff14 inset,0 4px 10px #0000002e,0 18px 40px #00000040;--hv2-shadow-hover:0 1px 0 #ffffff1c inset,0 6px 14px #00000038,0 24px 48px #0000004d;}
@media(prefers-color-scheme:dark){:root:not([data-theme]){--hv2-card:var(--home-card);--hv2-shadow:0 1px 0 #ffffff14 inset,0 4px 10px #0000002e,0 18px 40px #00000040;--hv2-shadow-hover:0 1px 0 #ffffff1c inset,0 6px 14px #00000038,0 24px 48px #0000004d;}}

html .chat-main.is-home .home-shortcuts button{
  background:var(--hv2-card);
  -webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);
  border:1px solid var(--home-cardEdge);
  box-shadow:var(--hv2-shadow);
}
html .chat-main.is-home .home-shortcuts button:hover{box-shadow:var(--hv2-shadow-hover);border-color:color-mix(in srgb,var(--home-accent) 45%,var(--home-cardEdge));}
html .chat-main.is-home #form-composer .composer-surface{box-shadow:var(--hv2-shadow);}

/* Icon tile: gradient squircle with a white glyph and a soft colored glow. */
html .chat-main.is-home .home-shortcut-icon,
html .chat-main.is-home [data-home-action] .home-shortcut-icon{
  --a:var(--hv2-chat-a);--b:var(--hv2-chat-b);
  width:44px;height:44px;border-radius:14px;color:#fff;
  background:linear-gradient(150deg,var(--a) 0%,var(--b) 100%);
  box-shadow:0 1px 0 #ffffff59 inset,0 -1px 0 #00000014 inset,0 6px 14px -5px var(--b);
}
html .chat-main.is-home [data-home-action="remote"] .home-shortcut-icon{--a:var(--hv2-code-a);--b:var(--hv2-code-b);}
html .chat-main.is-home [data-home-action="image"] .home-shortcut-icon{--a:var(--hv2-image-a);--b:var(--hv2-image-b);}
html .chat-main.is-home [data-home-action="voices"] .home-shortcut-icon{--a:var(--hv2-voice-a);--b:var(--hv2-voice-b);}
html .chat-main.is-home [data-home-action="live"] .home-shortcut-icon{--a:var(--hv2-live-a);--b:var(--hv2-live-b);}
html .chat-main.is-home .home-shortcut-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
html .chat-main.is-home .home-shortcut-icon svg .fill{fill:currentColor;stroke:none;}
html .chat-main.is-home .home-shortcuts button:hover .home-shortcut-icon{transform:translateY(-1px) scale(1.04);transition:transform .2s;}

@media(max-width:768px){
  html .chat-main.is-home .home-shortcut-icon,
  html .chat-main.is-home [data-home-action] .home-shortcut-icon{width:38px;height:38px;border-radius:12px;}
  html .chat-main.is-home .home-shortcut-icon svg{width:22px;height:22px;}
}
@media(prefers-reduced-motion:reduce){html .chat-main.is-home .home-shortcuts button:hover .home-shortcut-icon{transform:none;}}

/* Menu: a marca "Shakk" leva para a home; sem botão "Início" separado. */
html #btn-nav-home{display:none!important;}

/* Ao focar a caixa, somem só os atalhos; logo e saudação ficam logo acima da caixa. */
html .chat-main.home-composing.is-home:not(.private-chat-active) #empty-state{visibility:visible;}
html .chat-main.home-composing.is-home:not(.private-chat-active):not(.workspace-view-open):not(.agent-view-open)>.messages{display:flex;flex-direction:column;justify-content:flex-end;}
html .chat-main.home-composing.is-home:not(.private-chat-active) #empty-state{padding-bottom:18px;}
@media(max-height:560px){html .chat-main.home-composing.is-home:not(.private-chat-active) #empty-state .home-mark{width:44px;height:48px;margin-bottom:8px;}html .chat-main.home-composing.is-home:not(.private-chat-active) #empty-state h1{font-size:24px;margin-bottom:2px;}html .chat-main.home-composing.is-home:not(.private-chat-active) #empty-state .home-subtitle{font-size:14px;}}
@media(max-width:760px){html.composer-keyboard-open .chat-main.home-composing.is-home:not(.private-chat-active):not(.workspace-view-open):not(.agent-view-open)>.messages{padding-bottom:calc(var(--keyboard-inset,0px) + 118px);}}
/* Na home já é uma conversa nova: sem o "+" no cabeçalho. */
html .chat-main.is-home:has(#empty-state:not([hidden])) #btn-header-new{display:none!important;}


/* Biblioteca, Tarefas e Projetos: o cabeçalho flutuante é só da home; nas telas internas ele volta ao fluxo. */
html .chat-main.is-home.workspace-view-open:not(.agent-view-open):not(.private-chat-active)>.chat-header{position:relative;top:auto;left:auto;right:auto;background:var(--ivory);}
html .chat-main.is-home.workspace-view-open:not(.agent-view-open):not(.private-chat-active){background:var(--ivory);}

/* Conversa privada vazia: mesmo layout da home, com o aviso logo acima da logo. */
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])):not(.workspace-view-open):not(.agent-view-open){
  background:var(--home-sky) url('/home-scene-light.svg') center/100% 100% no-repeat;
  justify-content:center;padding-top:calc(80px + var(--safe-area-top));padding-bottom:36px;overflow-y:auto;
}
:root[data-theme="dark"] .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])):not(.workspace-view-open):not(.agent-view-open){background:var(--home-sky) url('/home-scene-dark.svg') center/100% 100% no-repeat;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden]))>.chat-header{position:absolute;top:0;left:0;right:0;background:transparent;border:0;box-shadow:none;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden]))>.chat-header::after{display:none;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden]))>.messages{flex:0 0 auto;overflow:visible;min-height:0;padding:0;margin:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])) #private-chat-banner{width:min(calc(100% - 32px),920px);margin:0 auto 22px;box-sizing:border-box;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])) #empty-state{visibility:visible;flex:0 0 auto;min-height:0;padding:0 24px;margin:0 auto;width:100%;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden]))>.composer-area{flex:0 0 auto;align-self:center;width:min(100%,1000px);padding:0 40px;margin:28px auto 30px;background:transparent;}
html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])) #form-composer{width:100%;max-width:920px;}
@media(max-width:768px){
  html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden]))>.composer-area{padding:0 16px;margin:22px auto 0;}
  html .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])){padding-top:calc(76px + var(--safe-area-top));}
  html.composer-keyboard-open .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])){justify-content:flex-start;}
  html.composer-keyboard-open .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])) #empty-state .home-mark{width:44px;height:48px;margin-bottom:8px;}
  html.composer-keyboard-open .chat-main.is-home.private-chat-active:has(#empty-state:not([hidden])) #empty-state h1{font-size:24px;}
}

/* Leitura em voz alta sem painel: o botão de som da mensagem toca/pausa; voz e velocidade ficam nas configurações. */
html .reading-player{display:none!important;}

/* Ícones no estilo da referência: fundo pastel claro e traço colorido. */
html .chat-main.is-home .home-shortcut-icon,
html .chat-main.is-home [data-home-action] .home-shortcut-icon{
  background:linear-gradient(150deg,color-mix(in srgb,var(--a) 14%,#fff),color-mix(in srgb,var(--b) 18%,#fff));
  color:var(--b);
  box-shadow:0 1px 0 #ffffff inset,0 0 0 1px color-mix(in srgb,var(--b) 10%,transparent) inset,0 6px 14px -8px var(--b);
}
html .chat-main.is-home .home-shortcut-icon svg{stroke-width:2;}
:root[data-theme="dark"] .chat-main.is-home [data-home-action] .home-shortcut-icon{background:linear-gradient(150deg,color-mix(in srgb,var(--a) 22%,var(--home-card)),color-mix(in srgb,var(--b) 26%,var(--home-card)));color:var(--a);box-shadow:0 1px 0 #ffffff14 inset,0 6px 14px -8px #000;}
@media(prefers-color-scheme:dark){:root:not([data-theme]) .chat-main.is-home [data-home-action] .home-shortcut-icon{background:linear-gradient(150deg,color-mix(in srgb,var(--a) 22%,var(--home-card)),color-mix(in srgb,var(--b) 26%,var(--home-card)));color:var(--a);box-shadow:0 1px 0 #ffffff14 inset,0 6px 14px -8px #000;}}
