/* ============================================================
   Profile Settings Dialog
   ============================================================ */

.dialog-settings-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.dialog-settings-overlay.active {
  display: flex;
}

.dialog-settings {
  display: flex;
  flex-direction: column;
  background-color: #343137;
  padding: 30px;
  border-radius: 10px;
  font-weight: bold;
  max-width: 460px;
  width: 90%;
}

.dialog-settings span,
.dialog-settings p,
.dialog-settings label {
  color: #f0f0f0b7;
}

.dialog-settings .dialog-header {
  font-size: 1.4rem;
  align-self: center;
  margin-bottom: 10px;
}

.dialog-settings .dialog-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- Picture upload ---- */

.settings-picture-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.settings-picture-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #25232a;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: opacity 0.15s;
}

.settings-picture-preview:hover {
  opacity: 0.8;
}

.settings-picture-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 50%;
}

.settings-picture-preview:hover::after {
  opacity: 1;
}

.settings-picture-placeholder {
  color: #f0f0f040;
  font-size: 0.75rem;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.settings-picture-preview.has-image .settings-picture-placeholder {
  display: none;
}

.settings-picture-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.settings-picture-btn {
  background: none;
  border: none;
  color: #f0f0f060;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #f0f0f030;
  font-weight: bold;
  padding: 2px 4px;
}

.settings-picture-btn:hover {
  color: #f0f0f0a0;
}

.settings-picture-btn.remove {
  color: #b05050;
}

.settings-picture-btn.remove:hover {
  color: #d06060;
}

#settings-picture-input {
  display: none;
}

/* ---- Form fields ---- */

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-field label {
  font-size: 0.85rem;
}

.settings-field input,
.settings-field textarea {
  background-color: #25232a;
  border: 1px solid #3a383f;
  border-radius: 5px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: #f0f0f0;
  font-family: 'Roboto', sans-serif;
  font-weight: normal;
  outline: none;
  transition: border-color 0.15s;
}

.settings-field input:focus,
.settings-field textarea:focus {
  border-color: #4f7b46;
}

.settings-field input::placeholder,
.settings-field textarea::placeholder {
  color: #f0f0f030;
}

.settings-field textarea {
  resize: vertical;
  min-height: 80px;
}

/* ---- Status message ---- */

.settings-status {
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
}

.settings-status.error {
  color: #d06060 !important;
}

.settings-status.success {
  color: #4f7b46 !important;
}

/* ---- Buttons (reuses dialog-btn / btn-cancel / btn-confirm) ---- */

.dialog-settings .dialog-row {
  display: flex;
  gap: 20px;
}

.dialog-settings .dialog-btn {
  display: flex;
  flex: 1;
  color: #f0f0f0;
  border: none;
  border-radius: 5px;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: bold;
  justify-content: center;
  cursor: pointer;
}

.dialog-settings .btn-cancel {
  background-color: #7b4646;
}

.dialog-settings .btn-settings-save {
  background-color: #4f7b46;
}

.dialog-settings .btn-settings-save:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---- Sidebar edit button ---- */

#btn-edit-profile {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid #f0f0f020;
  border-radius: 5px;
  color: #f0f0f060;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 6px 14px;
  margin-top: 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  width: 100%;
}

#btn-edit-profile:hover {
  border-color: #f0f0f040;
  color: #f0f0f0a0;
}

body.owner-view #btn-edit-profile {
  display: flex;
}