/* css/profile.css — Profilseite & Einstellungs-Picker */

/* ─── PROFIL-HEADER ──────────────────────────────────────────────────────── */
.profile-header {
  background: rgba(20,20,32,0.68);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--glass-shadow);
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: #000;
  flex-shrink: 0;
}
.profile-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -.5px;
}
.profile-joined { font-size: 13px; color: var(--muted); margin-top: 4px; }
.profile-username { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile-empty-hint {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  padding: 4px 0;
}

/* ─── ERSCHEINUNGSBILD ACCORDION ─────────────────────────────────────────── */
.appear-section {
  background: rgba(20,20,32,0.68);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}
.appear-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 12px;
  text-align: left;
}
.appear-toggle:hover { background: rgba(255,255,255,.03); }
.appear-toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.appear-toggle-icon { font-size: 18px; flex-shrink: 0; }
.appear-toggle-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.appear-toggle-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.appear-toggle-arrow {
  font-size: 20px;
  color: var(--muted);
  transition: transform .25s ease;
  flex-shrink: 0;
  line-height: 1;
}
.appear-body {
  border-top: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.appear-group {}
.appear-group-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: .02em;
}

/* ─── WALLPAPER-PICKER ───────────────────────────────────────────────────── */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wallpaper-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-sm);
  border: 2px solid var(--border);
  background: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  padding: 0;
}
.wallpaper-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.wallpaper-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.35), 0 8px 24px rgba(0,0,0,0.3);
}

.wallpaper-thumb {
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallpaper-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(245,158,11,0.9);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.wallpaper-label {
  padding: 7px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallpaper-emoji { font-size: 12px; }

@media (max-width: 520px) {
  .wallpaper-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── SWATCH-ROWS (Hintergrund & Textfarbe) ──────────────────────────────── */
.swatch-group { margin-bottom: 12px; }
.swatch-group:last-child { margin-bottom: 0; }
.swatch-group-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.swatch-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 6px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  position: relative;
}
.swatch-btn:hover  { border-color: var(--muted); }
.swatch-btn.active { border-color: var(--accent); background: rgba(245,158,11,.06); }

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.1);
  background-size: cover;
}
.swatch-dot-text {
  /* Textfarben-Dot braucht dunklen Rand um helle Farben sichtbar zu machen */
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}
.swatch-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.swatch-check {
  font-size: 10px;
  color: var(--accent);
  font-weight: 800;
  margin-left: 2px;
}

/* ─── STANDORT-KARTE ─────────────────────────────────────────────────────── */
#profile-map-wrap {
  margin-top: 16px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
#profile-map {
  height: 220px;
  width: 100%;
}
.map-pin {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
  user-select: none;
}
/* Leaflet-Tiles im Dark Mode abdunkeln */
.leaflet-tile {
  filter: brightness(.82) saturate(.65);
}
/* Popup ans Theme anpassen */
.leaflet-popup-content-wrapper {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.4) !important;
  border-radius: var(--r-sm) !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
}
.leaflet-popup-tip         { background: var(--surface) !important; }
.leaflet-popup-close-button { color: var(--muted) !important; }
.leaflet-control-attribution { font-size: 10px !important; opacity: .6; }
/* Zoom-Buttons ans Theme anpassen */
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface2) !important; }

/* ─── PROFIL-DETAILS-FORMULAR ────────────────────────────────────────────── */
.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 16px;
}
.profile-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.profile-section-head h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 3px;
}
.profile-section-head p {
  font-size: 12px;
  color: var(--muted);
}
.btn-edit {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-edit:hover { border-color: var(--accent); color: var(--accent); }

/* Anzeigemodus */
.profile-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.profile-field-row:last-child { border-bottom: none; }
.profile-field-icon { font-size: 16px; width: 22px; flex-shrink: 0; }
.profile-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 80px;
}
.profile-field-value { color: var(--text); flex: 1; }
.profile-field-empty { color: var(--muted); font-style: italic; }

/* Bearbeitungsmodus */
.profile-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.profile-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Geo-Feld */
.geo-field {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.geo-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.geo-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.geo-sub { font-size: 13px; color: var(--text); }
.geo-actions { display: flex; gap: 6px; }
.btn-geo {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.btn-geo:hover       { border-color: var(--accent); color: var(--accent); }
.btn-geo-clear:hover { border-color: var(--danger); color: var(--danger); }
.geo-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.geo-toggle-wrap input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

/* Responsive: siehe css/mobile.css */

/* ─── ABMELDEN-BUTTON ────────────────────────────────────────────────────── */
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 20px;
  padding: 14px 20px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.btn-logout:hover {
  border-color: var(--muted);
  background: var(--surface2);
  color: var(--text);
}

/* ─── GEFAHRENZONE ───────────────────────────────────────────────────────── */
.danger-zone {
  background: rgba(239,68,68,.06);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--r);
  padding: 24px;
  margin-top: 24px;
}
.danger-zone h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fca5a5;
  margin-bottom: 6px;
}
.danger-zone p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(239,68,68,.5);
  background: transparent;
  color: #fca5a5;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.btn-danger-outline:hover {
  background: rgba(239,68,68,.12);
  border-color: var(--danger);
  color: #fff;
}

/* ─── DELETE MODAL ───────────────────────────────────────────────────────── */
.modal-danger {
  border-color: rgba(239,68,68,.3);
}
.modal-danger-icon {
  font-size: 36px;
  margin-bottom: 12px;
  text-align: center;
}
.modal-danger h3 { color: #fca5a5; }

.font-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.font-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border: 2px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: all .2s;
}
.font-option:hover          { border-color: var(--muted); }
.font-option.selected       { border-color: var(--accent); background: rgba(245,158,11,.07); }
.font-option-left           { display: flex; flex-direction: column; gap: 2px; }
.font-option-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.font-option.selected .font-option-name { color: var(--accent); }
.font-option-preview        { font-size: 17px; color: var(--text); }
.font-option-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  transition: all .2s;
}
.font-option.selected .font-option-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
