.chatoame-toolbar,
.chatoame-toolbar *,
.chatoame-camera-dialog,
.chatoame-camera-dialog *,
.chatoame-editor-dialog,
.chatoame-editor-dialog * {
  color: #000;
}

.chatoame-camera-modal[hidden],
.chatoame-editor-modal[hidden] {
  display: none !important;
}

.chatoame-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.94);
}

.chatoame-toolbar .chatoame-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  flex: 1 1 180px;
}

.chatoame-toolbar label {
  font-size: 0.85rem;
  font-weight: 600;
}

.chatoame-field-inline {
  flex: 2 1 320px;
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
}

.chatoame-inline-label {
  white-space: nowrap;
  margin: 0;
}

.chatoame-field-inline .chatoame-select {
  flex: 1 1 auto;
}

.chatoame-field-checkbox {
  flex: 0 1 auto !important;
  min-width: auto !important;
  justify-content: end;
}

.chatoame-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 8px;
  white-space: nowrap;
}

.chatoame-select,
.chatoame-multiselect-button,
.chatoame-expectation-search {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  padding: 8px 10px;
  box-sizing: border-box;
  background: #fff;
}

.chatoame-field-expectations {
  position: relative;
}

.chatoame-multiselect-button {
  text-align: left;
  cursor: pointer;
}

.chatoame-multiselect-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  padding: 10px;
}

.chatoame-expectation-list {
  max-height: 280px;
  overflow: auto;
  margin-top: 8px;
}

.chatoame-expectation-group {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 10px 0 6px;
  opacity: 0.7;
}

.chatoame-expectation-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 2px;
}

.chatoame-expectation-option input {
  margin-top: 4px;
}

.chatoame-empty {
  padding: 8px;
  opacity: 0.7;
}

.chatoame-expectation-notes {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.82rem;
  opacity: 0.82;
}

.chatoame-camera-wrap {
  display: flex;
  align-items: end;
  gap: 8px;
  flex: 0 0 auto !important;
  min-width: auto !important;
}

.chatoame-camera-button {
  min-width: 46px;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.chatoame-camera-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}


.chatoame-screenshot-button {
  gap: 6px;
  padding: 0 10px;
  min-width: auto;
}

.chatoame-button-text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.chatoame-camera-modal,
.chatoame-editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.chatoame-camera-dialog,
.chatoame-editor-dialog {
  width: min(1100px, 96vw);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-sizing: border-box;
}

.chatoame-camera-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.chatoame-camera-permission {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.04);
}

.chatoame-camera-permission.is-info {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.chatoame-camera-permission.is-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.chatoame-camera-permission.is-error {
  background: #fef2f2;
  border-color: #fecaca;
}

.chatoame-camera-status {
  margin: 0;
  font-size: 0.95rem;
}

.chatoame-camera-preview-wrap {
  position: relative;
  width: 100%;
  min-height: 240px;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatoame-camera-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
}

.chatoame-camera-video,
.chatoame-camera-canvas,
.chatoame-editor-canvas {
  width: 100%;
  height: 100%;
  max-height: min(58vh, 640px);
  display: block;
  object-fit: contain;
}


.chatoame-camera-actions,
.chatoame-editor-toolbar,
.chatoame-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.chatoame-camera-actions,
.chatoame-editor-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.chatoame-camera-cancel,
.chatoame-camera-request,
.chatoame-camera-fallback,
.chatoame-camera-shot,
.chatoame-editor-mode,
.chatoame-editor-reset,
.chatoame-editor-undo,
.chatoame-editor-cancel,
.chatoame-editor-insert {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #fff;
  cursor: pointer;
}

.chatoame-editor-toolbar {
  margin-bottom: 12px;
}

.chatoame-editor-mode.is-active {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 1px #1d4ed8 inset;
}

.chatoame-editor-slider-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.chatoame-editor-stage-wrap {
  width: 100%;
  min-height: 240px;
  margin: 12px 0;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 860px) {
  .chatoame-toolbar {
    align-items: stretch;
  }

  .chatoame-field-inline {
    flex-direction: column !important;
    align-items: stretch;
  }

  .chatoame-inline-label {
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .chatoame-camera-wrap {
    align-items: stretch;
  }

  .chatoame-camera-button {
    width: 100%;
  }
}

.chatoame-camera-dialog .button.button-primary,
.chatoame-editor-dialog .button.button-primary {
  color: #000;
}

.chatoame-expectation-meta {
  font-size: 0.85em;
}

.chatoame-camera-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #f3f4f6;
}

.chatoame-camera-preview-wrap {
  position: relative;
}

.chatoame-camera-canvas {
  display: none;
}
