:root {
  --baghwa-chocolate: #4b2e1f;
  --baghwa-chocolate-dark: #3a2216;
  --baghwa-chocolate-soft: #8a654d;
  --baghwa-panel-outline: #c9b3a3;
}

.baghwa-ai-trigger,
.baghwa-floating-trigger,
.baghwa-actions .button {
  font-size: 12px;
  line-height: 1.4;
  border-radius: 4px;
}

.baghwa-ai-trigger {
  margin-left: 6px;
  vertical-align: middle;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--baghwa-chocolate);
  background: var(--baghwa-chocolate);
  color: #fff;
  cursor: pointer;
}

.baghwa-floating-trigger {
  position: fixed;
  z-index: 100060;
  min-height: 30px;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border: 1px solid var(--baghwa-chocolate);
  background: var(--baghwa-chocolate);
  color: #fff;
  cursor: pointer;
}

.baghwa-ai-trigger .dashicons {
  font-size: 15px;
  line-height: 19px;
  width: 15px;
  height: 15px;
  display: none;
}

.baghwa-floating-trigger .dashicons {
  font-size: 15px;
  line-height: 19px;
  width: 15px;
  height: 15px;
  display: none;
}

.baghwa-trigger-label {
  margin-left: 4px;
}

.baghwa-trigger-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  border-radius: 2px;
}

.baghwa-ai-trigger:hover,
.baghwa-floating-trigger:hover {
  background: var(--baghwa-chocolate-dark);
}

.baghwa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.baghwa-modal {
  width: min(760px, 95vw);
  background: #fff;
  border: 2px solid var(--baghwa-panel-outline);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.baghwa-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.baghwa-settings-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.baghwa-title-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex: 0 0 auto;
}

.baghwa-label {
  display: block;
  font-weight: 600;
  margin: 12px 0 6px;
}

.baghwa-textarea,
.baghwa-input {
  width: 100%;
  border: 1px solid var(--baghwa-panel-outline);
  border-radius: 6px;
  padding: 8px 10px;
}

.baghwa-textarea:focus,
.baghwa-input:focus {
  outline: 1px solid var(--baghwa-chocolate-soft);
  border-color: var(--baghwa-chocolate);
  box-shadow: 0 0 0 1px var(--baghwa-chocolate-soft);
}

.baghwa-options-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.baghwa-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.baghwa-actions .button {
  min-height: 32px;
  border: 1px solid var(--baghwa-chocolate-soft);
  background: #f6f7f7;
  color: var(--baghwa-chocolate-dark);
  padding: 5px 12px;
  cursor: pointer;
}

.baghwa-actions .button.button-primary {
  border-color: var(--baghwa-chocolate);
  background: var(--baghwa-chocolate);
  color: #fff;
}

.baghwa-actions .button.button-primary:hover {
  background: var(--baghwa-chocolate-dark);
}

.baghwa-status {
  min-height: 20px;
  margin: 10px 0;
}

.baghwa-status.is-error {
  color: #b32d2e;
}

.baghwa-status.is-success {
  color: #007017;
}

.baghwa-model-status {
  margin-left: 8px;
  font-size: 12px;
}

.baghwa-model-search {
  margin-bottom: 6px;
}

.baghwa-model-status.is-error {
  color: #b32d2e;
}

.baghwa-model-status.is-success {
  color: #007017;
}

@media (max-width: 782px) {
  .baghwa-options-row {
    grid-template-columns: 1fr;
  }
}
