/* Eigenschaften-Panel: gemeinsame Typografie- und Layout-Klassen */

/* Headerbereich oben im Panel */
.props-header {
  margin-bottom: var(--space-2);
}

/* Haupttitel innerhalb von Sektionen (z. B. H5) */
.props-title {
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

/* Untertitel/Untersektionen (z. B. H6) */
.props-subtitle {
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0;
}

/* Sektionstitelzeile mit Icon-Badge links */
.props-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Einheitliche Badge-Fläche für Sektion-Icons (Größe/Radius konsistent) */
.props-chip {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Kleinere Chip-Variante für Untersektionen */
.props-chip--sm {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

/* Einheitliche Feldbeschriftungen */
.props-field-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
  display: block;
  font-weight: 500;
}

/* Einheitliche Inputs */
.props-input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 0.75rem; /* Spezifisches Padding */
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

/* Einheiten-Anzeige (z. B. px) rechts im Inputfeld - wird unten überschrieben */

/* Standard-Containerabstände für Panelinhalte */
.props-container {
  padding: var(--space-4);
}

/* Standard-Sektionsabstand */
.props-section {
  margin-bottom: 1.5rem;
  position: relative;
}

/* Einheitlicher Toggle wie Einstellungsseite */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px !important;
  min-width: 50px !important;
  height: 28px !important;
  min-height: 28px !important;
  flex-shrink: 0 !important;
  cursor: pointer;
}

/* Spezifische Regel für Layout-Editor Toggle */
#autoResizeToggle {
  width: 50px !important;
}

#autoResizeToggle + .toggle-slider {
  width: 50px !important;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  border-radius: 14px;
  border: 2px solid rgba(234, 179, 8, 0.3);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: #eab308;
  transition: all 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(234, 179, 8, 0.6);
  border-color: rgba(234, 179, 8, 0.8);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background: #eab308;
}

.toggle-switch:hover .toggle-slider {
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.toggle-switch input:checked + .toggle-slider:hover {
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.5);
}

/* Markierung verknüpfter Eingaben bei aktiviertem Auto-Resize */
.linked-active {
  color: #eab308 !important; /* gleiche Gelb-Farbe wie Toggle */
  caret-color: #eab308;
}

.linked-active::placeholder {
  color: rgba(234, 179, 8, 0.8);
}

.linked-unit-active {
  color: rgba(234, 179, 8, 0.9) !important;
}

/* Zusätzlicher Platz rechts nur wenn px angezeigt wird – aktuell entfernt */
#widgetWidth, #widgetHeight, #widgetX, #widgetY, #labelFontSize, #contentFontSize, #widgetPadding {
  padding-right: 0.75rem !important; /* zurück auf Standard, da px entfernt */
  min-width: 0 !important; /* erlaubt kompakte Breiten (wird von .num-input-compact gesteuert) */
}

/* ===========================
   Layout-Editor: Einheits-Styles
   für die drei Haupt-Container:
   - Widget-Bibliothek (linke Spalte)
   - Editor (mittlere Spalte)
   - Eigenschaften (rechte Spalte)
   =========================== */

/* Einheitliches Innen-Padding wie im Editor-Statusblock: 0.5rem vertikal, 1rem horizontal */
.widget-library .modern-card,
.editor-canvas .modern-card,
.properties-panel .modern-card,
#propertiesPanel {
  padding: 0.5cm !important; /* einheitlich alle Seiten */
}

.widget-header {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 0 1rem;
}
.widget-header i {
    width: 24px;
    text-align: center;
}

/* Einheitliche Header-Typografie und Abstände */
.widget-library .modern-card .widget-header,
.editor-canvas .modern-card .widget-header,
.properties-panel .modern-card .widget-header {
  font-size: 1.25rem !important; /* konsistent */
  font-weight: 600 !important;
  margin: 0 0 1.5rem 0 !important; /* oben 0 (Container hat 0,5cm), unten 1.5rem */
  color: #ffffff !important;
}

/* Inhalte-Wrapper im Eigenschaften-Panel angleichen */
#propertiesPanel .props-container {
  padding: 0 !important; /* nutzt ausschließlich das Card-Padding (0.5cm) für Einheitlichkeit */
}

/* Elegante Trennlinie zwischen Eigenschaftssektionen */
.props-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 15%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.12) 85%,
    rgba(255, 255, 255, 0) 100%
  );
  margin: 1rem 0;
}

/* Einstellungen: Label-Text neben Buttons (z.B. Gebetszeiten-/Hijri-Anpassungen).
   Kürzt lange (übersetzte) Texte statt +/- Buttons zu verschieben. */
.settings-adjust-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
