/* Compact Creato chat. Applied after the workspace and studio navigation styles. */
.cc-workspace[data-creato-mode="ask"] .cc-composer textarea[data-prompt]:is(:focus,:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.cc-workspace[data-creato-mode="ask"] .cc-composer:has(textarea[data-prompt]:focus) {
  border-color: #81708f !important;
  box-shadow: none !important;
}
.cc-workspace[data-creato-mode="ask"] .cc-composer-inner:has(textarea[data-prompt]:focus) {
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

@media (max-width: 680px) {
  .cc-workspace {
    --cc-mobile-header: 68px;
    --cc-mobile-modes: 39px;
    grid-template-rows: var(--cc-mobile-header) var(--cc-mobile-modes) minmax(0, 1fr);
  }
  .cc-workspace.is-loading { grid-template-rows: var(--cc-mobile-header) minmax(0, 1fr); }
  .cc-workspace .cc-header { padding: 3px 10px 4px; gap: 2px 6px; }
  .cc-workspace .cc-brand { height: 30px; }
  .cc-workspace .cc-brand img { width: 21px; height: 21px; }
  .cc-workspace .cc-brand strong { font-size: 14px; }
  .cc-workspace .cc-studio { min-height: 28px; border-radius: 7px; }
  .cc-workspace .cc-history-toggle { min-height: 30px; }
  .cc-workspace .cc-history { top: var(--cc-mobile-header); }
  .cc-workspace .cc-inspector { top: calc(var(--cc-mobile-header) + var(--cc-mobile-modes)); }
  .cc-workspace .cc-toolbar { gap: 4px; padding: 0 7px; }
  .cc-workspace .cc-modes {
    flex: 1 1 auto;
    width: fit-content;
    max-width: 340px;
    padding: 2px;
    gap: 2px;
    border: 1px solid #ffffff10;
    border-radius: 9px;
    background: #ffffff06;
  }
  .cc-workspace .cc-mode {
    flex: 1 1 auto;
    min-height: 30px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 11px !important;
  }
  .cc-workspace .cc-mode.is-active {
    color: #f6eaff !important;
    background: #b793ff30;
    box-shadow: inset 0 0 0 1px #b793ff35;
  }
  .cc-workspace .cc-settings-toggle { min-height: 34px; min-width: 32px; padding: 0 6px; }
  .cc-workspace[data-creato-mode="ask"] .cc-results { padding: 12px 12px 3px; }
  .cc-workspace[data-creato-mode="ask"] .cc-message { font-size: 13px; line-height: 1.52; margin-bottom: 12px; }
  .cc-workspace[data-creato-mode="ask"] .cc-message-text { font-size: 13px; line-height: 1.52; }
  .cc-workspace[data-creato-mode="ask"] .cc-message.is-user { padding: 7px 10px; }
  .cc-workspace[data-creato-mode="ask"] .cc-result-actions { margin-top: 5px; }
  .cc-workspace[data-creato-mode="ask"] :is(.cc-action,.cc-download) { min-height: 32px; font-size: 10px !important; }
  .cc-workspace[data-creato-mode="ask"] .cc-main > .cc-composer.aim-studio-card {
    width: calc(100% - 16px) !important;
    margin: 0 auto max(44px, env(safe-area-inset-bottom)) !important;
    border-radius: 11px !important;
  }
  .cc-workspace[data-creato-mode="ask"] .cc-composer .cc-composer-inner.aim-studio-input { padding: 5px 7px 6px !important; }
  .cc-workspace[data-creato-mode="ask"] .cc-composer textarea[data-prompt] {
    min-height: 29px !important;
    height: var(--cc-prompt-height, 29px);
    max-height: 88px !important;
    padding: 3px 4px;
    resize: none;
    font-size: 16px !important;
    line-height: 1.35;
  }
  .cc-workspace[data-creato-mode="ask"] .cc-composer-toolbar { flex-wrap: nowrap; gap: 5px; }
  .cc-workspace[data-creato-mode="ask"] .cc-model { flex: 1 1 0; }
  .cc-workspace[data-creato-mode="ask"] .cc-model select { height: 36px; padding-inline-start: 7px; }
  .cc-workspace[data-creato-mode="ask"] :is(.cc-upload,.cc-send) { min-height: 36px; }
  .cc-workspace[data-creato-mode="ask"] .cc-upload { min-width: 36px; padding: 0 6px; }
  .cc-workspace[data-creato-mode="ask"] .cc-upload > span { display: none; }
  .cc-workspace[data-creato-mode="ask"] .cc-send { font-size: 11px !important; padding: 0 8px; gap: 4px; }
  .cc-workspace[data-creato-mode="ask"] .cc-composer-note { display: none; }
  .cc-workspace[data-creato-mode="ask"] .cc-main > .cc-composer.aim-studio-card:has(textarea[data-prompt]:focus) {
    margin-bottom: max(6px, env(safe-area-inset-bottom)) !important;
  }
  body.creato-compact-active:has(.cc-workspace[data-creato-mode="ask"] textarea[data-prompt]:focus)
    :is(.support-launcher,.aim-pwa-install-launcher) { visibility: hidden !important; }
}
@media (max-width: 380px) {
  .cc-workspace .cc-settings-toggle > span { display: none; }
}
