/* User profile panel (replaces the old AI/voice settings panel).
   Lives inside .modal-content, which modal.css already positions and themes. */

.profile-h {
  margin: 0 0 14px;
  font-family: 'Patrick Hand', cursive;
  font-size: 26px;
  color: #fff;
  text-align: center;
}

/* Big round avatar: shows the chosen emoji, or the uploaded picture */
.profile-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #212121;
  border: 2px solid blue;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  line-height: 1;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-label {
  display: block;
  width: 250px;
  margin: 0 auto 6px;
  font-family: 'Patrick Hand', cursive;
  font-size: 15px;
  color: #bbb;
  text-align: center;
}

/* Nothing inside the settings panel may be wider than the panel itself: on a 320px
   phone its content box is only ~224px, and every fixed 250px piece (grid, drop zone,
   notes, save button, voice select) stuck out and let the panel be dragged sideways. */
.modal-content .emoji-picker,
.modal-content .profile-dropzone,
.modal-content .profile-save,
.modal-content .profile-avatar,
.modal-content .voice-select,
.modal-content .profile-photo,
.modal-content .clone-controls,
.modal-content .voice-search {
  max-width: 100%;
  box-sizing: border-box;
}

/* Belt and braces: no direct child of the settings panel may be wider than the panel,
   whatever width it was given. */
.modal-content > * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Emoji grid.
   repeat(6, 1fr) means minmax(auto, 1fr), so each column took its button's minimum
   width — and .modal-content button adds 20px of side padding, making every emoji 66px.
   Six of those are 396px inside a 250px box, which is what made the whole settings
   modal scroll sideways. minmax(0, 1fr) lets the columns shrink instead. */
.emoji-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  width: 250px;
  max-width: 100%;
  margin: 0 auto 16px;
  /* A whole number of rows (4 rows of 38px + 3 gaps) so no emoji is ever shown
     sliced in half at the bottom edge. */
  max-height: 176px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Higher specificity than `.modal-content button` (which is what forced 20px of side
   padding on these square emoji buttons). */
.emoji-picker .emoji-option {
  min-width: 0;
  width: 100%;
  padding: 6px 0;
}

.emoji-option {
  font-size: 24px;
  line-height: 1;
  padding: 6px 0;
  background: #212121;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.emoji-option:hover {
  background: #333;
}

.emoji-option.selected {
  border-color: blue;
  background: #1b1b3a;
}

/* The e-mail box.
   Every existing rule for these boxes targets input[type="text"], and this one is
   type="email" — so it got no styling at all and showed up as the browser default
   (white, small, system font). Styled explicitly instead of by type. */
#profile-email {
  display: block;
  /* 80vw was wider than the panel's content box on a phone, so the field stuck out
     and the whole panel could be dragged sideways. Off the panel now. */
  width: 100%;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 10px;
  border: 2px solid blue;
  border-radius: 4px;
  background-color: #212121;
  color: #fff;
  font-family: 'Patrick Hand', cursive;
  font-size: 15px;
  text-align: center;
  box-sizing: border-box;
}

#profile-email::placeholder {
  color: #777;
}

/* Drop zone for your own picture. */
.profile-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 250px;
  min-height: 48px;
  margin: 0 auto 10px;
  padding: 8px 12px;
  border: 2px dashed rgba(60, 90, 255, 0.7);
  border-radius: 10px;
  background: #16161d;
  color: #bbb;
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.profile-dropzone i {
  font-size: 16px;
  opacity: 0.85;
}

.profile-dropzone.dragover,
.profile-dropzone:focus-visible {
  border-color: #4da3ff;
  background: #1b1b3a;
  color: #fff;
  outline: none;
}

.profile-dropzone.has-photo {
  border-style: solid;
  border-color: blue;
  color: #fff;
}

/* Own-image upload.
   The raw file input is NOT the UI any more — the drop zone above is. It has to be
   display:none rather than the `hidden` attribute, because this very rule used to
   set display:block and overrode `hidden`, which kept the ugly "Datei auswählen"
   strip visible inside the drop zone. */
.profile-photo,
.profile-photo[hidden] {
  display: none;
  width: 250px;
  margin: 0 auto 10px;
  color: #bbb;
  font-family: 'Patrick Hand', cursive;
  font-size: 13px;
}

.profile-notes {
  display: block;
  width: 250px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto 6px;
  padding: 8px 10px;
  font-family: 'Patrick Hand', cursive;
  font-size: 15px;
  color: #eee;
  background: #111;
  border: 1px solid #444;
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
}

.profile-notes::placeholder { color: #666; }

.profile-save {
  display: block;
  width: 250px;
  margin: 6px auto 8px;
  padding: 10px;
  font-size: 16px;
  font-family: 'Patrick Hand', cursive;
  color: #fff;
  background: black;
  border: 2px solid blue;
  border-radius: 5px;
  cursor: pointer;
}

.profile-save:hover {
  background: #1b1b3a;
}

.profile-quiet {
  display: block;
  width: 250px;
  margin: 0 auto 10px;
  padding: 6px;
  font-size: 13px;
  font-family: 'Patrick Hand', cursive;
  color: #999;
  background: transparent;
  border: 1px solid #444;
  border-radius: 5px;
  cursor: pointer;
}

.profile-quiet:hover {
  color: #fff;
  border-color: #777;
}

.profile-status {
  min-height: 18px;
  margin-top: 6px;
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  color: #6f6;
  text-align: center;
}

/* ── Voice pickers ──────────────────────────────────────────────────────
   Two selects exist but only one is ever visible: the model select branches
   to the OpenAI voices or the clone voices. */
.voice-select {
  display: block;
  width: 250px;
  margin: 0 auto 8px;
  padding: 7px;
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  color: #fff;
  background: #212121;
  border: 2px solid blue;
  border-radius: 5px;
  cursor: pointer;
}

.voice-search {
  display: block;
  width: 250px;
  margin: 0 auto 8px;
  padding: 6px;
  font-family: 'Patrick Hand', cursive;
  font-size: 13px;
  color: #fff;
  background: #212121;
  border: 1px solid #444;
  border-radius: 5px;
}

.clone-controls {
  width: 250px;
  margin: 0 auto;
}

/* Preview button sits beside the clone select rather than under it */
.clone-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.clone-row .voice-select {
  flex: 1 1 auto;
  width: auto;
  margin: 0;
}

.clone-row .profile-quiet {
  width: 40px;
  flex: 0 0 40px;
  margin: 0;
  padding: 7px 0;
}

/* A clone voice that the guide cannot actually speak yet is flagged, not
   silently offered — the label carries the warning. */
#clone-note.warn {
  color: #f0ad4e;
}

/* ── Interessen: one normal select adds, the picks live as tags ─────────────
   The select itself never keeps a selection — each pick becomes a chip here,
   and the chip's × removes it again. */
.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 2px 0;
}

.interest-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 4px 4px 4px 10px;
  background: #212121;
  border: 2px solid blue;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.25;
  color: #fff;
}

.interest-chip-label {
  overflow-wrap: anywhere;
}

/* Higher specificity than `.modal-content button` (blue background, 20px of
   side padding) so the × is just a small cross. */
.interest-chips .interest-chip-x {
  border: 0;
  background: transparent;
  color: #bbb;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
}

.interest-chips .interest-chip-x:hover {
  color: #fff;
}

