/**
 * Shared Command / Account chat composer shell — layout + spacing only.
 * Screens differ only via toolbar slots (attach / mic / send / extra actions).
 */
:root {
  --mg-cc-radius-shell: 14px;
  --mg-cc-radius-input: 22px;
  --mg-cc-border: 1px solid #e5e7eb;
  --mg-cc-bg: rgba(255, 255, 255, 0.98);
  --mg-cc-shadow: 0 -2px 14px rgba(0, 0, 0, 0.07);
  --mg-cc-pad-x: 12px;
  --mg-cc-pad-y: 10px;
  --mg-cc-toolbar-gap: 8px;
  --mg-vv-keyboard: 0px;
}

.mg-cc-composer {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  border-radius: var(--mg-cc-radius-shell);
  background: var(--mg-cc-bg);
  border: var(--mg-cc-border);
  box-shadow: var(--mg-cc-shadow);
  padding: var(--mg-cc-pad-y) var(--mg-cc-pad-x);
  padding-bottom: calc(
    var(--mg-cc-pad-y) + max(env(safe-area-inset-bottom, 0px), var(--mg-vv-keyboard))
  );
}

.mg-cc-composer__meta {
  width: 100%;
  min-width: 0;
}

.mg-cc-composer__input-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

/* Primary text field row — full width, pill-shaped inner well */
.mg-cc-composer__input-row {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: var(--mg-cc-radius-input);
  background: #fff;
  padding: 8px 12px;
  min-height: 44px;
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
}

.mg-cc-composer__field {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  resize: none;
  min-height: 28px;
  max-height: 120px;
  font-size: 16px;
  line-height: 1.35;
  background: transparent;
  font-family: inherit;
  color: #111827;
}

.mg-cc-composer__field:is(input) {
  min-height: 24px;
  max-height: none;
}

/* Toolbar: actions below the field (Meta-style bottom action row) */
.mg-cc-composer__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--mg-cc-toolbar-gap);
  width: 100%;
  min-width: 0;
}

.mg-cc-composer__toolbar-left,
.mg-cc-composer__toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--mg-cc-toolbar-gap);
  min-width: 0;
}

.mg-cc-composer__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
  touch-action: manipulation;
  cursor: pointer;
}

.mg-cc-composer__icon-btn:hover {
  background: #f3f4f6;
}

.mg-cc-composer__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #00a854;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  flex-shrink: 0;
  touch-action: manipulation;
  cursor: pointer;
}

.mg-cc-composer__send:hover {
  opacity: 0.92;
}

.mg-cc-back-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mg-cc-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  touch-action: manipulation;
  cursor: pointer;
}

.mg-cc-back-btn:hover {
  background: #f9fafb;
}
