/* Approved compact GIA Chat Agent interface. Core chat styles remain in style.css. */

.chat-shell {
  width: min(calc(100% - 24px), 1080px);
  height: min(calc(100dvh - 24px), 940px);
  min-height: 560px;
  margin: 12px auto;
}

.chat-header {
  gap: 12px;
  padding: 11px 16px;
}

.brand-mark {
  width: 44px;
  height: 44px;
}

.brand-copy .eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

.brand-copy h1 {
  font-size: clamp(17px, 2.3vw, 22px);
}

.brand-copy > p:last-child {
  margin-top: 2px;
  font-size: 11px;
}

.new-chat {
  min-height: 36px;
  padding: 7px 10px;
}

.tool-strip {
  gap: 6px;
  padding: 7px 14px;
}

.tool-strip button,
.tool-strip a {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10.5px;
}

.messages {
  padding: 14px clamp(11px, 3.2vw, 30px);
}

.message {
  gap: 10px;
  margin-bottom: 14px;
}

.welcome-message {
  margin-bottom: 10px;
}

.welcome-bubble {
  width: min(94%, 820px);
  max-width: min(94%, 820px);
  padding: 13px 15px 14px;
}

.welcome-topline {
  margin-bottom: 6px;
}

.welcome-greeting {
  font-size: clamp(17px, 2.5vw, 21px);
  line-height: 1.36 !important;
}

.pre-chat-line {
  min-height: 22px;
  margin-top: 2px !important;
  font-size: 14px;
}

.prompt-helper {
  margin-top: 8px !important;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45 !important;
}

.date-format-note {
  margin-top: 8px !important;
  padding: 7px 9px;
  border: 1px solid rgba(255, 211, 107, .22);
  border-radius: 10px;
  color: #dce8f2;
  background: rgba(255, 211, 107, .06);
  font-size: 10.5px;
  line-height: 1.45 !important;
}

.date-format-note strong,
.date-format-note span {
  color: var(--gold);
}

.example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.example-list button {
  min-height: 32px;
  padding: 6px 10px;
  border-color: rgba(98, 221, 255, .2);
  color: #dceeff;
  background: rgba(23, 55, 95, .62);
  font-size: 10.5px;
  line-height: 1.25;
}

.example-list button:hover,
.example-list button:focus-visible {
  border-color: var(--cyan);
  color: #fff;
  background: rgba(28, 94, 139, .5);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.composer {
  gap: 8px;
  margin: 0 12px;
  padding: 8px 9px;
  border-radius: 16px;
}

.input-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.input-wrap label {
  padding: 0 5px 1px;
  color: #7192a8;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
}

.input-wrap textarea {
  min-height: 35px;
  padding-top: 5px;
  padding-bottom: 4px;
}

.composer.has-draft {
  border-color: rgba(98, 221, 255, .72);
  box-shadow: 0 0 0 3px rgba(98, 221, 255, .08), 0 9px 28px rgba(0,0,0,.32);
}

.composer.has-draft .input-wrap label {
  color: var(--cyan);
}

.chat-footer {
  padding: 7px 14px 9px;
}

@media (max-width: 720px) {
  .chat-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    margin: 0;
  }

  .chat-header {
    gap: 9px;
    padding: calc(9px + env(safe-area-inset-top)) 10px 9px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy h1 {
    font-size: 16px;
  }

  .status-wrap {
    right: 84px;
    top: calc(22px + env(safe-area-inset-top));
  }

  .new-chat {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .tool-strip {
    padding: 6px 8px;
  }

  .tool-strip button,
  .tool-strip a {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .messages {
    padding: 10px 8px;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .welcome-message {
    gap: 8px;
  }

  .welcome-bubble {
    width: calc(100% - 2px);
    max-width: calc(100% - 2px);
    padding: 12px;
  }

  .welcome-greeting {
    font-size: 17px;
  }

  .pre-chat-line {
    font-size: 13px;
  }

  .prompt-helper {
    font-size: 10px;
  }

  .date-format-note {
    padding: 6px 8px;
    font-size: 9.5px;
  }

  .example-list {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, minmax(32px, auto));
    grid-auto-columns: minmax(160px, max-content);
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 1px 1px 5px;
    scrollbar-width: thin;
  }

  .example-list button {
    width: auto;
    max-width: 245px;
    min-height: 32px;
    white-space: nowrap;
  }

  .composer {
    margin: 0 7px;
    padding: 7px;
  }

  .input-wrap label {
    font-size: 8.5px;
  }

  .chat-footer {
    overflow: hidden;
    padding: 6px 10px calc(7px + env(safe-area-inset-bottom));
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@media (max-width: 460px) {
  .composer {
    grid-template-columns: 40px minmax(0, 1fr) 44px;
    margin: 0 8px;
  }

  .attach-pdf {
    min-width: 40px;
    width: 40px;
  }

  .input-wrap textarea {
    font-size: 16px;
  }
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}


/* Full questions: readable rows instead of abbreviated tiles. */
.example-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.example-list button {
  width: 100%;
  min-height: 44px;
  font-size: 11.5px;
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.example-list button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}

/* The composer itself is the single focus surface; prevent a second outline
   from appearing over the transparent textarea. */
.composer .input-wrap textarea:focus,
.composer .input-wrap textarea:focus-visible {
  outline: 0;
  box-shadow: none;
}

@media (max-width: 760px) {
  .example-list {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-auto-columns: auto;
    overflow-x: hidden;
    padding: 1px;
  }

  .example-list button {
    width: 100%;
    max-width: none;
    min-height: 43px;
    white-space: normal;
  }
}
