/* Match the neutral Studio menus without changing account actions. */
#profile-modal {
  padding: 16px;
}

#profile-modal .profile-modal-card {
  box-sizing: border-box;
  width: min(100%, 480px) !important;
  max-width: 480px !important;
  max-height: calc(100dvh - 32px);
  padding: clamp(16px, 4vw, 24px) !important;
  border: 1px solid #303035 !important;
  border-radius: 22px !important;
  background: #141416 !important;
  color: #f1f1f3;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

#profile-modal .profile-modal-header {
  padding: 0 0 14px !important;
  border-bottom: 1px solid #29292d;
}

#profile-modal .modal-header-title h3 {
  font: 650 20px/1.3 'Outfit', system-ui, sans-serif;
  letter-spacing: -.02em;
}

#profile-modal .profile-scroll-container {
  margin-top: 14px !important;
  gap: 14px !important;
  min-height: 0;
  overflow-y: auto;
}

#profile-modal :is(.profile-user-card, .account-connect-card, .more-settings-trigger, .settings-session-card, .settings-delete-card) {
  background: #1b1b1e !important;
  border: 1px solid #303035 !important;
  border-radius: 13px !important;
  box-shadow: none !important;
  color: #e7e7eb !important;
}

#profile-modal :is(.account-connect-card, .more-settings-trigger, .settings-session-card, .settings-delete-card) {
  box-sizing: border-box;
  min-height: 54px;
  padding: 9px 12px !important;
  gap: 10px;
}

#profile-modal .profile-user-info { min-width: 0; }
#profile-modal .username-row { flex-wrap: wrap; row-gap: 4px; }
#profile-modal #profileModalUsername { overflow-wrap: anywhere; }
#profile-modal #profilePlanPill#profilePlanPill {
  background: #28282c !important;
  border: 1px solid #414147 !important;
  color: #e2e2e7 !important;
  box-shadow: none !important;
  text-transform: uppercase;
}

#profile-modal .section-label {
  color: #a3a3ac !important;
  letter-spacing: .055em;
  font-size: 11px !important;
}

#profile-modal :is(.account-action button, #profileLogoutBtn, #profileDeleteAccountBtn, #closeProfileModalBtn) {
  min-height: 36px;
  padding-inline: 12px;
  border: 1px solid #3b3b41 !important;
  border-radius: 10px !important;
  background: #252529 !important;
  color: #efeff1 !important;
  font: 600 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif !important;
  box-shadow: none !important;
  white-space: nowrap;
}

#profile-modal #closeProfileModalBtn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
}

#profile-modal :is(.account-action button, #profileLogoutBtn, #profileDeleteAccountBtn, #closeProfileModalBtn, .more-settings-trigger):hover {
  background: #303035 !important;
}

#profile-modal #profileDeleteAccountBtn { color: #f3a7a7 !important; }

#profile-modal :is(button, input, [tabindex]):focus-visible {
  outline: 2px solid #dadade;
  outline-offset: 2px;
}

@media (max-width: 420px) {
  #profile-modal .profile-scroll-container { padding-right: 0 !important; }
  #profile-modal :is(.account-action button, #profileLogoutBtn, #profileDeleteAccountBtn) {
    min-height: 44px;
    padding-inline: 9px;
  }
  #profile-modal #closeProfileModalBtn { width: 44px; height: 44px; }
}

#profile-modal #profileUserIdSub { display: none !important; }

#profile-modal .profile-user-card {
  padding: 12px 14px !important;
  gap: 12px;
}

#profile-modal .profile-scroll-container { gap: 12px !important; }
#profile-modal .connected-accounts-section { margin: 0; }
#profile-modal .section-label { margin-bottom: 7px; }
#profile-modal .more-settings-content { margin-top: 6px; padding: 10px 12px; }

/* Keep destructive actions in the same dialog system as Account Settings. */
.delete-account-card.delete-account-confirmation {
  box-sizing: border-box;
  width: min(100% - 32px, 480px) !important;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: clamp(16px, 4vw, 24px) !important;
  background: #141416 !important;
  border: 1px solid #303035 !important;
  border-radius: 22px !important;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.delete-account-confirmation .delete-icon-wrapper {
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 12px;
}
.delete-account-confirmation .delete-warning-list > div,
.delete-account-confirmation .delete-risk-check {
  background: #1b1b1e;
  border: 1px solid #303035;
  border-radius: 12px;
  padding: 10px 12px;
}

.delete-account-confirmation .delete-risk-check {
  align-items: center;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
  color: #d4d4da;
}

.delete-account-confirmation #deleteRiskCheckbox {
  appearance: none;
  flex: 0 0 40px;
  width: 40px;
  height: 24px;
  margin: 0;
  border: 1px solid #515159;
  border-radius: 999px;
  background: #29292e;
  cursor: pointer;
  display: grid;
  align-items: center;
}

.delete-account-confirmation #deleteRiskCheckbox::before {
  content: '';
  width: 16px;
  height: 16px;
  margin-left: 3px;
  border-radius: 50%;
  background: #e5e5e9;
  transition: transform .16s ease;
}

.delete-account-confirmation #deleteRiskCheckbox:checked {
  background: #653638;
  border-color: #a05b5e;
}

.delete-account-confirmation #deleteRiskCheckbox:checked::before { transform: translateX(16px); }
.delete-account-confirmation :is(button, input):focus-visible {
  outline: 2px solid #e5e5e9;
  outline-offset: 2px;
}
.delete-account-confirmation .delete-modal-actions { display: flex; gap: 8px; }
.delete-account-confirmation .delete-modal-actions button {
  min-height: 40px;
  border-radius: 10px;
  font: 600 13px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
}
.delete-account-confirmation #confirmDeleteBtn:disabled {
  background: #27272b !important;
  border: 1px solid #37373d !important;
  color: #a5a5ad !important;
  opacity: 1;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .delete-account-confirmation #deleteRiskCheckbox::before { transition: none; }
}
