/* © MK_Kasi · Vaultly · Benutzer-Einstellungen */

/* ============================================================
   OVERLAY
   ============================================================ */

.be-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.be-overlay.versteckt { display: none; }

/* ============================================================
   PANEL
   ============================================================ */

.be-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  animation: bePanelEin 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes bePanelEin {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   HEADER
   ============================================================ */

.be-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.be-titel {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.be-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  -webkit-appearance: none;
}

.be-close:hover { background: var(--surface-2); color: var(--text); }

/* ============================================================
   TABS
   ============================================================ */

.be-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.be-tabs::-webkit-scrollbar { display: none; }

.be-tab {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
  min-height: 40px;
  -webkit-appearance: none;
}

.be-tab:hover { color: var(--text-dim); }

.be-tab.aktiv {
  color: var(--c-net);
  border-bottom-color: var(--c-net);
}

/* ============================================================
   INHALT
   ============================================================ */

.be-inhalt {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Abschnitt innerhalb des Inhalts */
.be-section {
  margin-bottom: 22px;
}

.be-section:last-child { margin-bottom: 0; }

/* ============================================================
   AKTIONEN-ZEILE
   ============================================================ */

.be-aktionen {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.be-gespeichert-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--c-allg);
  letter-spacing: 0.06em;
  animation: beHintEin 0.2s ease;
}

@keyframes beHintEin {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   DEMNÄCHST-TAG
   ============================================================ */

.be-demnächst {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(255,255,255,0.25);
  text-transform: none;
  letter-spacing: 0.04em;
  font-weight: 400;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin-left: 6px;
  vertical-align: middle;
}

/* ============================================================
   DISABLED (noch nicht implementiert)
   ============================================================ */

.be-disabled {
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
  cursor: not-allowed;
}

/* ============================================================
   THEME-VORSCHAU
   ============================================================ */

.be-theme-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.be-theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
  letter-spacing: 0.06em;
}

.be-theme-option.aktiv {
  border-color: var(--c-knx);
  color: var(--c-knx);
}

.be-theme-vorschau {
  width: 88px;
  height: 52px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.be-theme-dark {
  background: linear-gradient(135deg, #0b0c0f 0%, #1a1d26 60%, #0f1118 100%);
}

.be-theme-light {
  background: linear-gradient(135deg, #f2f3f5 0%, #e4e6eb 60%, #d8dbe2 100%);
}

/* ============================================================
   LOGO-UPLOAD
   ============================================================ */

.be-logo-vorschau {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.be-logo-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Label als Button stylen */
.be-logo-upload label.btn {
  cursor: pointer;
}

/* ============================================================
   SPRACHE-GRID
   ============================================================ */

.be-sprache-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.be-sprache-option {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}

.be-sprache-option.aktiv {
  border-color: var(--c-knx);
  background: rgba(245,180,0,0.06);
  color: var(--c-knx);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
  .be-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .be-panel {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
  }

  .be-theme-grid { flex-direction: column; }
  .be-sprache-grid { grid-template-columns: 1fr; }
}
