.chatoame-ink-toggle,
button.chatoame-ink-toggle,
span.chatoame-ink-toggle {
  appearance: none;
  min-width: auto;
  min-height: auto;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  border-radius: 999px;
  -webkit-appearance: none;
  border: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0 !important;
  margin: 0 4px;
  flex: 0 0 40px !important;
  vertical-align: middle;
  color: inherit;
  text-decoration: none;
  font-size: inherit;
  line-height: 1;
}

.chatoame-ink-panel[hidden] {
  display: none !important;
}

.chatoame-ink-toggle:hover,
.chatoame-ink-toggle:focus-visible,
span.chatoame-ink-toggle:hover,
span.chatoame-ink-toggle:focus-visible {
  border: 0 !important;
  background: rgba(15, 23, 42, 0.06) !important;
  background-image: none !important;
  box-shadow: none !important;
  outline: none;
  opacity: 1;
}

.chatoame-ink-toggle::before,
.chatoame-ink-toggle::after {
  content: none !important;
}

.chatoame-ink-toggle[aria-expanded="true"] {
  color: #1d4ed8;
}

.chatoame-ink-icon {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  shape-rendering: geometricPrecision;
}

.chatoame-ink-icon *,
.chatoame-ink-toggle svg * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  vector-effect: non-scaling-stroke;
}

.chatoame-ink-panel {
  width: 100%;
  display: block;
  flex: 0 0 100%;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
}

.chatoame-ink-panel-header,
.chatoame-ink-panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.chatoame-ink-panel-header {
  justify-content: space-between;
  margin-bottom: 10px;
}

.chatoame-ink-tool-group,
.chatoame-ink-history-group,
.chatoame-ink-send-group,
.chatoame-ink-background-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chatoame-ink-background-label {
  font-size: 0.84rem;
  font-weight: 700;
}

.chatoame-ink-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 700;
}

.chatoame-ink-size {
  width: 120px;
}

.chatoame-ink-tool,
.chatoame-ink-action,
.chatoame-ink-background {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  cursor: pointer;
}

.chatoame-ink-tool.is-active,
.chatoame-ink-background.is-active {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 1px #1d4ed8 inset;
}

.chatoame-ink-stage-wrap {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  overflow: hidden;
  background: #fff;
}

.chatoame-ink-stage-resizer {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  overflow: hidden;
  position: relative;
  background-color: #fff;
}

.chatoame-ink-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  cursor: crosshair;
}

.chatoame-ink-bg-blank .chatoame-ink-stage-resizer {
  background-color: #fff;
}

.chatoame-ink-bg-lined .chatoame-ink-stage-resizer {
  background-color: #fff;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 45px,
    rgba(59, 130, 246, 0.16) 45px,
    rgba(59, 130, 246, 0.16) 46px
  );
}

.chatoame-ink-bg-grid .chatoame-ink-stage-resizer {
  background-color: #fff;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

.chatoame-ink-panel-actions {
  justify-content: space-between;
  margin-top: 10px;
}

.chatoame-ink-send.button.button-primary {
  color: #000;
}

@media (max-width: 860px) {
  .chatoame-ink-panel-header,
  .chatoame-ink-panel-actions {
    align-items: stretch;
  }

  .chatoame-ink-tool-group,
  .chatoame-ink-history-group,
  .chatoame-ink-send-group,
  .chatoame-ink-background-group,
  .chatoame-ink-size-wrap {
    width: 100%;
  }

  .chatoame-ink-tool,
  .chatoame-ink-action,
  .chatoame-ink-background {
    flex: 1 1 auto;
  }

  .chatoame-ink-size {
    flex: 1 1 auto;
    width: auto;
  }
}


.chatoame-ink-attachments {
  width: 100%;
  margin: 8px 0 0;
  display: block;
}

.chatoame-ink-attachments[hidden] {
  display: none !important;
}

.chatoame-ink-preview {
  display: inline-flex;
  max-width: 100%;
}

.chatoame-ink-preview .mwai-file-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: #fff;
}

.chatoame-ink-preview-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.chatoame-ink-preview-remove {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}

.chatoame-ink-panel--excalidraw {
  padding: 14px;
}

.chatoame-ink-panel-header--excalidraw {
  margin: 12px 0 10px;
  padding: 0;
}

.chatoame-ink-panel-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatoame-ink-panel-copy strong {
  font-size: 0.96rem;
}

.chatoame-ink-panel-copy span {
  font-size: 0.82rem;
  color: #475569;
}

.chatoame-ink-stage-wrap--excalidraw {
  background: #f8fafc;
  margin-bottom: 12px;
}

.chatoame-ink-stage-resizer--excalidraw {
  min-height: 360px;
  background: #fff;
}

.chatoame-ink-excalidraw-host,
.chatoame-ink-excalidraw-shell {
  width: 100%;
  height: 100%;
}

.chatoame-ink-excalidraw-host {
  min-height: inherit;
}

.chatoame-ink-excalidraw-host .excalidraw {
  height: 100% !important;
}

.chatoame-ink-excalidraw-loading {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 0.95rem;
}

.chatoame-ink-panel-actions--excalidraw {
  margin-top: 12px;
  gap: 12px;
  align-items: center;
}


.chatoame-ink-attachments.mwai-files {
  width: 100%;
  margin: 0 0 12px;
}
.chatoame-ink-attachments .mwai-file-preview {
  width: 100%;
}
.chatoame-ink-attachments .mwai-file-thumbnail {
  object-fit: cover;
}


.chatoame-ink-template-action-group {
  flex: 1 1 560px;
}

.chatoame-ink-template-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  font-size: 0.86rem;
}

.chatoame-ink-template-label--actions {
  flex: 1 1 260px;
  min-width: 220px;
}

.chatoame-ink-template-select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  padding: 8px 10px;
  box-sizing: border-box;
  background: #fff;
}

.chatoame-ink-template-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.55), rgba(254, 243, 199, 0.42));
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.35;
}

.chatoame-ink-template-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: #1e293b;
  font-weight: 700;
  font-size: 0.78rem;
}


.chatoame-ink-preview-remove {
  min-width: 32px;
  min-height: 32px;
}

.chatoame-ink-action,
.chatoame-ink-template-select,
.chatoame-ink-preview-remove {
  min-height: 40px;
}

.chatoame-ink-action:focus-visible,
.chatoame-ink-template-select:focus-visible,
.chatoame-ink-preview-remove:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .chatoame-ink-template-action-group,
  .chatoame-ink-template-label--actions,
  .chatoame-ink-send-group {
    width: 100%;
  }
}


/* chatOAME 0.5.6: match the native microphone's simple grey stroke style. */
.chatoame-ink-toggle,
button.chatoame-ink-toggle,
span.chatoame-ink-toggle {
  color: #6b7280 !important;
}

.chatoame-ink-toggle:hover,
.chatoame-ink-toggle:focus-visible,
button.chatoame-ink-toggle:hover,
button.chatoame-ink-toggle:focus-visible,
span.chatoame-ink-toggle:hover,
span.chatoame-ink-toggle:focus-visible {
  color: #4b5563 !important;
}

.chatoame-ink-toggle svg.chatoame-ink-icon {
  width: 25px !important;
  min-width: 25px !important;
  max-width: 25px !important;
  height: 25px !important;
  min-height: 25px !important;
  max-height: 25px !important;
  display: block !important;
  overflow: visible !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.35 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.chatoame-ink-toggle svg.chatoame-ink-icon * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.35 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  vector-effect: non-scaling-stroke !important;
}

.chatoame-ink-panel .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
