/* ============================================================
   PROFILE MODAL – Modern settings UI inspired by DeepSeek
   ============================================================ */

/* Fullscreen profile setting background overlay */
.modal.fullscreen-profile {
  padding: 0 !important;
  background: var(--modalbc-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.2s ease;
}

/* Inner dashboard viewport */
.profile-dashboard-content {
  background: var(--modal-bg) !important;
  border: 1px solid var(--input-border-color) !important;
  border-radius: var(--radius-md) !important;
  max-width: 620px !important;
  width: 92% !important;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px !important;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-dashboard-content::-webkit-scrollbar {
  width: 0px !important;
}

/* Header customization */
.settings-title-icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

/* Profile Hero Container */
.settings-profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--color1);
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border-color);
  margin-bottom: 20px;
}

.hero-avatar-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  padding: 2px;
  background: var(--bg-primary);
  flex-shrink: 0;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.hero-badge {
  font-size: 0.72rem;
  color: var(--secondary);
  background: rgba(52, 199, 89, 0.12);
  padding: 3px 10px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-weight: 600;
}

/* General settings cards layout */
.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  background: var(--bg-primary);
  border: 1px solid var(--input-border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.02);
  padding: 10px 16px;
  border-bottom: 1px solid var(--input-border-color);
  letter-spacing: 0.6px;
}

[data-theme="dark"] .card-header-label {
  background: rgba(255, 255, 255, 0.015);
}

/* Rows structure */
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--input-border-color);
  transition: background 0.15s ease;
}

.settings-row:last-child {
  border-bottom: none;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .clickable-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.row-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.row-label-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-sublabel {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  max-width: 320px;
  line-height: 1.3;
}

.row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-val {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.text-bound {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.val-code {
  font-family: monospace;
  font-size: 0.75rem;
  background: var(--input-bg1);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.chevron-icon {
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
}

.update-val-tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  font-size: 0.72rem;
  border-radius: 10px;
  font-weight: 700;
}

/* Danger actions layout */
.row-danger:hover {
  background: rgba(255, 59, 48, 0.06) !important;
}

.danger-icon {
  color: #ff3b30 !important;
}

.danger-text {
  color: #ff3b30 !important;
  font-weight: 600;
}

/* Custom switch toggle (DeepSeek / iOS style) */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--input-bg2);
  transition: 0.25s;
  border-radius: 24px;
  border: 1px solid var(--input-border-color);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .toggle-slider {
  background-color: var(--secondary);
  border-color: var(--secondary-dark);
}

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

/* DeepSeek Appearance Sub-Dialogue Popup Overlay */
.sub-dialog-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.sub-dialog-box {
  background: var(--modal-bg);
  border: 1px solid var(--input-border-color);
  border-radius: var(--radius-md);
  width: 88%;
  max-width: 320px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-dialog-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  cursor: pointer;
  border-bottom: 1px solid var(--input-border-color);
}

.radio-option:last-child {
  border-bottom: none;
}

.radio-option input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.radio-label {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.sub-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.dialog-cancel-btn {
  background: transparent;
  border: 1px solid var(--input-border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.2s;
}

.dialog-cancel-btn:hover {
  background: var(--input-bg1);
}

.dialog-confirm-btn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}

.dialog-confirm-btn:hover {
  background: var(--primary-dark);
}

/* Actions structure */
.settings-actions {
  margin-top: 16px;
}

.signout-action-btn {
  width: 100%;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: #ff3b30;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.signout-action-btn:hover {
  background: #ff3b30;
  color: white;
}

/* Responsive Stack Adjustments */
@media (max-width: 580px) {
  .profile-dashboard-content {
    width: 95% !important;
    padding: 18px !important;
  }
  .settings-profile-hero {
    padding: 12px;
    gap: 12px;
  }
  .hero-avatar-wrapper {
    width: 48px;
    height: 48px;
  }
  .hero-name {
    font-size: 1rem;
  }
  .settings-row {
    padding: 12px;
  }
  .row-label {
    font-size: 0.85rem;
  }
  .row-sublabel {
    font-size: 0.7rem;
    max-width: 200px;
  }
  .row-val {
    font-size: 0.8rem;
  }
}