/**
 * @file
 * Entity Builder UI YAML editor styles.
 */

/* Form wrapper */
.eb-ui-yaml-form {
  max-width: 1200px;
}

/* Toolbar */
.eb-yaml-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-top: 20px;
}

.eb-yaml-toolbar__group {
  display: flex;
  gap: 10px;
}

.eb-yaml-toolbar__btn {
  padding: 8px 16px;
  border: 1px solid #0073aa;
  background: #fff;
  color: #0073aa;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.eb-yaml-toolbar__btn:hover {
  background: #0073aa;
  color: #fff;
}

.eb-yaml-toolbar__btn:active {
  transform: translateY(1px);
}

/* Validation status */
.eb-validation-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.eb-validation-status__icon {
  font-size: 16px;
  font-weight: bold;
}

.eb-validation-status--success .eb-validation-status__icon {
  color: #46923c;
}

.eb-validation-status--error .eb-validation-status__icon {
  color: #dc3545;
}

.eb-validation-status--warning .eb-validation-status__icon {
  color: #856404;
}

.eb-validation-status--loading .eb-validation-status__icon {
  animation: eb-spin 1s linear infinite;
}

@keyframes eb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* YAML container */
.eb-yaml-container {
  border: 1px solid #ddd;
  border-top: none;
}

/* Plain textarea styling */
.eb-yaml-plain-editor {
  width: 100%;
  min-height: 500px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  padding: 15px;
  border: none;
  resize: vertical;
  tab-size: 2;
}

.eb-yaml-plain-editor:focus {
  outline: 2px solid #0073aa;
  outline-offset: -2px;
}

/* CodeMirror overrides */
.eb-yaml-container .CodeMirror {
  height: 500px;
  font-size: 14px;
  line-height: 1.5;
}

.eb-yaml-container .CodeMirror-gutters {
  background: #f5f5f5;
  border-right: 1px solid #ddd;
}

/* Preview container */
.eb-preview-container {
  margin-top: 20px;
  padding: 15px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.eb-preview-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.eb-preview-item {
  padding: 10px 15px;
  margin-bottom: 10px;
  background: #fff;
  border-left: 4px solid #0073aa;
  border-radius: 0 4px 4px 0;
}

.eb-preview-item--create {
  border-left-color: #46923c;
}

.eb-preview-item--update {
  border-left-color: #0073aa;
}

.eb-preview-item--delete {
  border-left-color: #dc3545;
}

.eb-preview-details {
  margin-top: 8px;
  padding-left: 20px;
  font-size: 13px;
  color: #666;
}

.eb-preview-details li {
  margin-bottom: 4px;
}

.eb-preview-details em {
  font-style: normal;
  font-weight: 500;
  color: #333;
}
