/* ================================================
   SETTINGS - Avatar & Modal Styles
   ================================================ */

/* ========================
   HEADER AVATAR (chip-style)
   ======================== */
.avatar-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.avatar-btn:hover {
  transform: scale(1.05);
}

.avatar-btn:active {
  transform: scale(0.95);
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.avatar-btn:hover .avatar {
  border-color: var(--accent);
  background: rgba(111, 177, 255, 0.1);
}

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

/* ========================
   SETTINGS MODAL
   ======================== */
.settings-card {
  max-width: 480px;
}

.settings-section {
  margin-bottom: 24px;
}

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

.settings-section h3 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.profile-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-avatar-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--chip);
  border: 2px solid var(--border);
  color: var(--muted);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.profile-avatar-btn:hover .profile-avatar {
  border-color: var(--accent);
  background: rgba(111, 177, 255, 0.1);
}

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

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
}

.profile-avatar-btn:hover .profile-avatar-overlay {
  opacity: 1;
}

.remove-photo-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 4px 8px;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.remove-photo-btn:hover {
  opacity: 1;
}

.profile-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field-group input,
.settings-select {
  background: var(--row);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease;
}

.field-group input:focus,
.settings-select:focus {
  outline: none;
  border-color: var(--accent);
}

.field-group input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.settings-select {
  cursor: pointer;
}

/* ========================
   CLOCK TOGGLE IN SETTINGS
   ======================== */
.clock-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.clock-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}

.clock-label.active {
  color: var(--text);
  font-weight: 600;
}

.clock-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.clock-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: border-color 0.15s ease;
}

.clock-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.clock-toggle input:checked + .clock-slider:before {
  transform: translateX(20px);
}

.clock-toggle:hover .clock-slider {
  border-color: var(--accent);
}

/* ========================
   MOBILE
   ======================== */
@media (max-width: 740px) {
  .profile-row {
    flex-direction: column;
    align-items: center;
  }

  .profile-fields {
    width: 100%;
  }
}