/**
 * Simple Rich Text Editor CSS - SPS CMS Console
 * Self-contained visual WYSIWYG & HTML editor toolbar
 */

.simple-editor-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--line, #e2ece8);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 4px;
}

.simple-editor-container:focus-within {
  border-color: var(--green, #205c4b);
  box-shadow: 0 0 0 3px rgba(32, 92, 75, 0.12);
}

.simple-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px;
  background: #f7faf9;
  border-bottom: 1px solid var(--line, #e2ece8);
  user-select: none;
}

.simple-editor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #3b5055;
  background: #ffffff;
  border: 1px solid #d3dfdc;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.simple-editor-btn:hover {
  background: #eef5f2;
  color: #173d32;
  border-color: #b5ccc5;
}

.simple-editor-btn:active {
  transform: translateY(1px);
}

.simple-editor-btn.btn-gold {
  color: #8c6f34;
  background: #fdfaf3;
  border-color: #e8d7b3;
  font-weight: 700;
}

.simple-editor-btn.btn-gold:hover {
  background: #f8eed6;
  border-color: #b99a5d;
  color: #684f1e;
}

.simple-editor-btn.btn-toggle-mode {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted, #7c8a8f);
  background: transparent;
  border-color: transparent;
}

.simple-editor-btn.btn-toggle-mode:hover {
  background: #e8f0ed;
  color: var(--ink, #171916);
  border-color: #c9dad4;
}

.simple-editor-body {
  position: relative;
  width: 100%;
}

.simple-editor-visual {
  min-height: 72px;
  padding: 10px 12px;
  font-family: var(--sans, 'DM Sans', -apple-system, sans-serif);
  font-size: 13px;
  line-height: 1.6;
  color: #1a2c30;
  outline: none;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.simple-editor-visual:empty:before {
  content: attr(data-placeholder);
  color: #9ab0b5;
  pointer-events: none;
}

/* Gold accent styling inside editor */
.simple-editor-visual .gold,
.simple-editor-visual span[style*="gold"],
.simple-editor-visual span.gold {
  color: #b99a5d !important;
  font-weight: 600;
  text-shadow: 0 0 1px rgba(185, 154, 93, 0.2);
}

.simple-editor-visual strong,
.simple-editor-visual b {
  font-weight: 700;
  color: #0d1e21;
}

.simple-editor-visual em,
.simple-editor-visual i {
  font-style: italic;
}

.simple-editor-raw {
  display: none;
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #274046;
  background: #fafcfb;
  border: 0;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
}

.simple-editor-raw.active {
  display: block;
}

.simple-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: #fafcfb;
  border-top: 1px solid #edf3f1;
  font-size: 10px;
  color: #8c9fa4;
}

.simple-editor-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  color: var(--green, #205c4b);
}
