/* /ana-beatriz/chat — app fullscreen estilo ChatGPT */

html:has(body.binds-anaGptPage),
body.binds-anaGptPage {
  height: 100%;
  overflow: hidden;
  background: #09060f !important;
}

body.binds-anaGptPage main#content {
  height: 100vh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  background: #09060f;
}

body.binds-anaGptPage .whatsapp-btn,
body.binds-anaGptPage .cc-window,
body.binds-anaGptPage .cc-revoke {
  display: none !important;
}

.agpt {
  --agpt-bg: #09060f;
  --agpt-side: #0c0816;
  --agpt-line: rgba(175, 154, 214, 0.16);
  --agpt-text: rgba(255, 255, 255, 0.94);
  --agpt-muted: rgba(255, 255, 255, 0.58);
  --agpt-accent: #9871dd;
  --agpt-glow: rgba(103, 58, 183, 0.45);
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  color: var(--agpt-text);
  background: var(--agpt-bg);
}

.agpt button {
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.agpt-scrim {
  display: none;
}

.agpt-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 14px;
  background: var(--agpt-side);
  border-right: 1px solid var(--agpt-line);
  min-height: 0;
}

.agpt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.agpt-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(152, 113, 221, 0.35);
}

.agpt-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.agpt-new:hover {
  background: rgba(255, 255, 255, 0.08);
}

.agpt-nav {
  display: grid;
  gap: 2px;
}

.agpt-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--agpt-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.agpt-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.agpt-nav i {
  width: 16px;
  color: var(--agpt-accent);
}

.agpt-chats {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.agpt-chats__head {
  padding: 8px 10px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--agpt-muted);
}

.agpt-chats__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
}

.agpt-chats__list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--agpt-muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.agpt-chats__list button:hover,
.agpt-chats__list button.is-on {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.agpt-chats__empty {
  padding: 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
}

.agpt-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--agpt-line);
}

.agpt-user__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #673ab7;
  font-weight: 700;
  flex: none;
}

.agpt-user b,
.agpt-user em {
  display: block;
  line-height: 1.25;
}

.agpt-user b {
  font-size: 0.9rem;
}

.agpt-user em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--agpt-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agpt-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.agpt-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid transparent;
}

.agpt-menu {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.agpt-top__who b,
.agpt-top__who span {
  display: block;
  line-height: 1.2;
}

.agpt-top__who b {
  font-size: 0.95rem;
}

.agpt-top__who span {
  font-size: 0.78rem;
  color: var(--agpt-muted);
}

.agpt-top__title {
  margin: 0;
  text-align: center;
  color: var(--agpt-muted);
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agpt-top__out {
  color: var(--agpt-muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.agpt-top__out:hover {
  color: #fff;
}

.agpt-stage {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.agpt-empty {
  margin: auto;
  max-width: 640px;
  padding: 24px 24px 8px;
  text-align: center;
}

.agpt-empty__orb {
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(152, 113, 221, 0.45), rgba(9, 6, 15, 0) 70%);
  box-shadow: 0 0 48px var(--agpt-glow);
}

.agpt-empty__orb img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
}

.agpt-empty h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
  font-weight: 750;
}

.agpt-empty p {
  margin: 0 auto;
  max-width: 460px;
  color: var(--agpt-muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

.agpt-thread {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.agpt-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 100%;
}

.agpt-msg img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  margin-top: 2px;
}

.agpt-msg--user {
  align-self: flex-end;
  max-width: min(78%, 560px);
}

.agpt-msg__bubble {
  font-size: 1.02rem;
  line-height: 1.65;
}

.agpt-msg__bubble a {
  color: var(--agpt-accent);
}

.agpt-msg--user .agpt-msg__bubble {
  padding: 10px 16px;
  border-radius: 22px;
  background: rgba(111, 59, 255, 0.28);
  border: 1px solid rgba(175, 154, 214, 0.22);
}

.agpt-msg--typing .agpt-msg__bubble {
  display: flex;
  gap: 5px;
  padding-top: 10px;
}

.agpt-msg--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--agpt-accent);
  animation: agpt-dot 1s infinite ease-in-out;
}

.agpt-msg--typing span:nth-child(2) { animation-delay: 0.15s; }
.agpt-msg--typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes agpt-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.agpt-dock {
  width: min(780px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 22px;
}

.agpt-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.agpt-cards button {
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--agpt-line);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(103, 58, 183, 0.08);
}

.agpt-cards button:hover {
  border-color: rgba(152, 113, 221, 0.45);
  background: rgba(152, 113, 221, 0.08);
}

.agpt-cards i {
  color: var(--agpt-accent);
  margin-bottom: 10px;
  filter: drop-shadow(0 0 8px var(--agpt-glow));
}

.agpt-cards strong,
.agpt-cards span {
  display: block;
}

.agpt-cards strong {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.agpt-cards span {
  color: var(--agpt-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.agpt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.agpt-chips button {
  border: 1px solid var(--agpt-line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--agpt-text);
  font-size: 0.85rem;
  cursor: pointer;
}

.agpt-composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 12px 12px 18px;
  border-radius: 28px;
  border: 1px solid rgba(152, 113, 221, 0.35);
  background: rgba(16, 10, 28, 0.92);
  box-shadow: 0 0 0 1px rgba(103, 58, 183, 0.12), 0 18px 50px rgba(0, 0, 0, 0.35), 0 0 42px rgba(103, 58, 183, 0.18);
}

.agpt-composer textarea {
  flex: 1;
  min-height: 28px;
  max-height: 140px;
  resize: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  line-height: 1.45;
  padding: 6px 0;
}

.agpt-composer textarea:focus {
  outline: 0;
}

.agpt-send {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #5b2db3;
  flex: none;
  cursor: pointer;
}

.agpt-send:hover {
  background: #f3eaff;
}

.agpt-gate {
  padding: 22px;
  margin-bottom: 8px;
  border-radius: 20px;
  border: 1px solid rgba(152, 113, 221, 0.28);
  background: rgba(16, 8, 28, 0.94);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.agpt-gate > p:first-child {
  margin: 0 0 16px;
  font-size: 1.02rem;
}

.agpt-gate__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.agpt-gate label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--agpt-muted);
}

.agpt-gate input {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--agpt-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
}

.agpt-gate__go {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #9871dd;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.agpt-gate__err {
  margin: 10px 0 0;
  color: #ed4d7f;
  font-size: 0.88rem;
}

.agpt-gate__note {
  margin: 10px 0 0;
  color: var(--agpt-muted);
  font-size: 0.8rem;
}

.agpt-gate__note a {
  color: var(--agpt-accent);
}

@media (max-width: 900px) {
  .agpt {
    grid-template-columns: 1fr;
  }

  .agpt-side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 300px);
    z-index: 20;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .agpt.is-sideOpen .agpt-side {
    transform: none;
  }

  .agpt-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 19;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
  }

  .agpt-menu {
    display: grid;
    place-items: center;
  }

  .agpt-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .agpt-top__who {
    display: none;
  }

  .agpt-cards {
    grid-template-columns: 1fr;
  }

  .agpt-gate__grid {
    grid-template-columns: 1fr;
  }

  .agpt-thread,
  .agpt-dock {
    width: calc(100% - 24px);
  }
}
