/* BOTVIET V1.0.293
   Scope: /app/content > quick AI tools only.
   Responsive by the real composer-card width, not browser viewport width. */

.content-reference-shell.content-v140 #content-composer-card {
  container-name: botvietContentComposer;
  container-type: inline-size;
  min-width: 0;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 10px !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 12px;
  overflow: visible;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools > button {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px !important;
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  min-height: 64px;
  height: auto;
  padding: 10px 11px !important;
  box-sizing: border-box;
  overflow: hidden;
  text-align: left;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools > button > span {
  display: grid !important;
  place-items: center;
  flex: 0 0 30px;
  width: 30px !important;
  min-width: 30px;
  height: 30px !important;
  margin: 0;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools > button > div {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-width: 0 !important;
  max-width: 100%;
  overflow: hidden;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools b,
.content-reference-shell.content-v140 #content-composer-card .content-ai-tools small {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools b {
  color: #e6f1ff;
  font-size: 12.5px !important;
  font-weight: 800;
  line-height: 1.22;
}

.content-reference-shell.content-v140 #content-composer-card .content-ai-tools small {
  margin-top: 4px;
  color: #91a9c1 !important;
  font-size: 10.5px !important;
  line-height: 1.3;
}

@container botvietContentComposer (max-width: 859px) {
  .content-reference-shell.content-v140 #content-composer-card .content-ai-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-reference-shell.content-v140 #content-composer-card .content-ai-tools > button {
    min-height: 62px;
  }
}

@container botvietContentComposer (max-width: 459px) {
  .content-reference-shell.content-v140 #content-composer-card .content-ai-tools {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .content-reference-shell.content-v140 #content-composer-card .content-ai-tools > button {
    min-height: 58px;
  }
}

/* Fallback: auto-fit follows the component's available width even if
   container queries are unavailable. */
@supports not (container-type: inline-size) {
  .content-reference-shell.content-v140 #content-composer-card .content-ai-tools {
    grid-template-columns:
      repeat(auto-fit, minmax(min(100%, 210px), 1fr)) !important;
  }
}

@media (max-width: 420px) {
  .content-reference-shell.content-v140 #content-composer-card .content-ai-tools {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }
}
