/* ============================================
   RICH-TEXT-EDITOR Premium-Styles
   ============================================ */

.rte-wrapper {
  background: var(--bg-deep, #0a0e1a);
  border: 1px solid var(--border, #2a3a5a);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.rte-wrapper:focus-within {
  border-color: var(--gold, #d4b876);
  box-shadow: 0 0 0 2px rgba(212, 184, 118, 0.15);
}

/* Paket-spezifische Akzente */
.rte-silber:focus-within {
  border-color: #c0c0c0;
  box-shadow: 0 0 0 2px rgba(192, 192, 192, 0.15);
}
.rte-business:focus-within {
  border-color: #9d4edd;
  box-shadow: 0 0 0 2px rgba(157, 78, 221, 0.15);
}

/* ===== TOOLBAR ===== */
.rte-toolbar {
  background: linear-gradient(180deg, var(--bg-elevated, #131929), var(--bg-deep, #0a0e1a));
  border-bottom: 1px solid var(--border, #2a3a5a);
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  position: relative;
}

.rte-toolbar::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold, #d4b876), transparent);
  opacity: 0.4;
}

.rte-silber .rte-toolbar::before {
  background: linear-gradient(90deg, transparent, #c0c0c0, transparent);
}

.rte-business .rte-toolbar::before {
  background: linear-gradient(90deg, transparent, #9d4edd, transparent);
}

.rte-toolbar-group {
  display: flex;
  gap: 0.15rem;
  padding: 0 0.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.rte-toolbar-group:last-child {
  border-right: none;
  margin-left: auto;
}

.rte-toolbar-info {
  padding-right: 0.5rem;
}

/* ===== BUTTONS ===== */
.rte-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary, #bbb);
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  position: relative;
}

.rte-btn:hover {
  background: rgba(212, 184, 118, 0.1);
  color: var(--gold, #d4b876);
  border-color: rgba(212, 184, 118, 0.3);
  transform: translateY(-1px);
}

.rte-silber .rte-btn:hover {
  background: rgba(192, 192, 192, 0.1);
  color: #d8d8d8;
  border-color: rgba(192, 192, 192, 0.3);
}

.rte-business .rte-btn:hover {
  background: rgba(157, 78, 221, 0.15);
  color: #c77dff;
  border-color: rgba(157, 78, 221, 0.4);
}

.rte-btn.active {
  background: linear-gradient(135deg, #ffe9a0, #d4b876);
  color: var(--bg-deep, #0a0e1a);
  border-color: var(--gold, #d4b876);
  box-shadow: 0 2px 8px rgba(212, 184, 118, 0.3);
}

.rte-silber .rte-btn.active {
  background: linear-gradient(135deg, #f5f5f5, #c0c0c0);
  color: #1a2138;
  border-color: #c0c0c0;
}

.rte-business .rte-btn.active {
  background: linear-gradient(135deg, #c77dff, #9d4edd);
  color: #fff;
  border-color: #9d4edd;
}

/* ===== BADGE ===== */
.rte-badge {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 3px;
  white-space: nowrap;
}

.rte-silber .rte-badge {
  background: linear-gradient(135deg, #f5f5f5, #c0c0c0);
  color: #1a2138;
  box-shadow: 0 2px 6px rgba(192, 192, 192, 0.3);
}

.rte-gold .rte-badge {
  background: linear-gradient(135deg, #ffe9a0, #d4b876);
  color: #1a2138;
  box-shadow: 0 2px 6px rgba(212, 184, 118, 0.3);
}

.rte-business .rte-badge {
  background: linear-gradient(135deg, #c77dff, #9d4edd);
  color: #fff;
  box-shadow: 0 2px 6px rgba(157, 78, 221, 0.3);
}

/* ===== EDITOR ===== */
.rte-editor {
  padding: 1.25rem 1.5rem;
  color: var(--text-primary, #eee);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  min-height: 150px;
  background: transparent;
}

.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted, #888);
  font-style: italic;
  opacity: 0.6;
  pointer-events: none;
}

/* Editor Content Styles */
.rte-editor p { margin: 0 0 0.75rem 0; }
.rte-editor p:last-child { margin-bottom: 0; }

.rte-editor h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--gold, #d4b876);
  margin: 1.25rem 0 0.5rem;
  font-weight: 500;
}
.rte-editor h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: var(--text-primary, #eee);
  margin: 1rem 0 0.5rem;
  font-weight: 500;
}
.rte-editor h4 {
  font-size: 1.05rem;
  color: var(--text-primary, #eee);
  margin: 0.85rem 0 0.4rem;
  font-weight: 600;
}

.rte-editor strong, .rte-editor b { color: var(--text-primary, #eee); font-weight: 700; }
.rte-editor em, .rte-editor i { color: var(--text-primary, #eee); }
.rte-editor u { text-decoration: underline; }

.rte-editor ul, .rte-editor ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.rte-editor li {
  margin: 0.25rem 0;
}

.rte-editor blockquote {
  border-left: 3px solid var(--gold, #d4b876);
  padding: 0.5rem 1rem;
  margin: 0.75rem 0;
  color: var(--text-secondary, #bbb);
  font-style: italic;
  background: rgba(212, 184, 118, 0.05);
  border-radius: 0 3px 3px 0;
}

.rte-editor a {
  color: var(--gold, #d4b876);
  text-decoration: underline;
}

.rte-editor mark {
  background: linear-gradient(120deg, rgba(212, 184, 118, 0.4), rgba(212, 184, 118, 0.2));
  color: var(--text-primary, #eee);
  padding: 0.1rem 0.2rem;
  border-radius: 2px;
}

/* ===== FOOTER ===== */
.rte-footer {
  background: var(--bg-elevated, #131929);
  border-top: 1px solid var(--border, #2a3a5a);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
}

.rte-hint {
  color: var(--text-muted, #888);
  font-style: italic;
}
.rte-hint strong {
  color: var(--gold, #d4b876);
  font-style: normal;
}

.rte-silber .rte-hint strong {
  color: #d8d8d8;
}
.rte-business .rte-hint strong {
  color: #c77dff;
}

/* ===== LINK MODAL ===== */
.rte-link-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.rte-link-modal.active { display: flex; }

.rte-link-modal-box {
  background: var(--bg-card, #1a2138);
  border: 1px solid var(--gold, #d4b876);
  border-radius: 6px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.rte-link-modal h3 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold, #d4b876);
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

.rte-link-modal input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-deep, #0a0e1a);
  border: 1px solid var(--border, #2a3a5a);
  border-radius: 3px;
  color: var(--text-primary, #eee);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}
.rte-link-modal input:focus {
  outline: none;
  border-color: var(--gold, #d4b876);
}

.rte-link-modal-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
.rte-link-modal-buttons button {
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.rte-btn-cancel {
  background: var(--bg-elevated, #131929);
  color: var(--text-secondary, #bbb);
  border: 1px solid var(--border, #2a3a5a);
}
.rte-btn-cancel:hover {
  border-color: var(--text-muted, #888);
}
.rte-btn-confirm {
  background: linear-gradient(135deg, #ffe9a0, #d4b876);
  color: var(--bg-deep, #0a0e1a);
  border: none;
}
.rte-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(212, 184, 118, 0.4);
}

/* Fallback Textarea (für Basis) */
.rte-fallback {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-deep, #0a0e1a);
  border: 1px solid var(--border, #2a3a5a);
  border-radius: 3px;
  color: var(--text-primary, #eee);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}
.rte-fallback:focus {
  outline: none;
  border-color: var(--gold, #d4b876);
  box-shadow: 0 0 0 2px rgba(212, 184, 118, 0.15);
}