/* Profile Page */
/* Profile and edit-profile. */

.profile-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  background-color: var(--surface-panel);
  padding: 1.25rem;
}

.profile-card {
  width: 100%;
  min-height: 28rem;
}

.profile-card h1 {
  margin: 0 0 0.8rem;
  font-size: 2.5rem;
}

.profile-avatar {
  width: 9.2rem;
  height: 9.2rem;
  border-radius: 50%;
  background-color: var(--surface-muted);
  color: var(--olive-700);
  display: grid;
  place-items: center;
  margin: 2rem 0 2rem;
}

.profile-avatar svg {
  width: 4.1rem;
  height: 4.1rem;
}

.profile-card h2 {
  margin: 0 0 0.5rem;
  font-size: 2.2rem;
}

.profile-email {
  color: var(--text-heading);
  text-decoration: underline;
  font-size: 1.2rem;
}

.profile-name {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: bold;
}

.profile-actions-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 1.8rem;
  width: min(82%, 32rem);
  max-width: 100%;
  box-sizing: border-box;
}

.profile-delete-btn {
  background-color: var(--danger);
  color: #fff;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
}

.profile-delete-btn:active {
  background-color: var(--danger-hover);
}

.profile-delete-btn svg,
a.profile-edit-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.profile-actions-row .profile-delete-btn,
.profile-actions-row a.profile-edit-btn {
  flex: 1 1 14rem;
  margin-top: 0;
  width: auto;
  max-width: none;
  min-height: 3.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  box-sizing: border-box;
  font-size: 1rem;
  font-weight: bold;
  font-family: inherit;
}

.edit-profile-apply-btn,
a.profile-edit-btn {
  background-color: var(--btn-secondary);
  color: #ffffff;
  border: none;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

a.profile-edit-btn {
  text-decoration: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
}

.edit-profile-apply-btn:hover,
a.profile-edit-btn:hover {
  background-color: var(--btn-secondary-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.edit-profile-apply-btn:active,
a.profile-edit-btn:active {
  background-color: var(--btn-secondary-active);
}

/* Edit profile form */
.profile-page .edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  box-sizing: border-box;
}

.profile-page .edit-profile-form .input-group {
  max-width: none;
  width: 100%;
}

.profile-page .edit-profile-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border-warm);
  background-color: var(--surface-muted);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  max-width: none;
}

.profile-page .edit-profile-field input::placeholder {
  color: var(--text-muted);
}

.profile-page .edit-profile-field input:focus {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  background-color: var(--surface-muted);
}

.edit-profile-apply-btn {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  font-size: 1rem;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.edit-profile-apply-plus {
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 600;
}

.edit-profile-card {
  gap: 2rem;
  align-items: stretch;
}

.edit-profile-avatar {
  margin: 1.5rem 0;
}

.edit-profile-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 min(20rem, 100%);
  max-width: 20rem;
}

.edit-profile-kicker {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edit-profile-subtitle,
.edit-profile-subcopy {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.edit-profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
  text-decoration: none;
  box-sizing: border-box;
  transition:
    background-color 110ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 110ms cubic-bezier(0.2, 0.8, 0.2, 1),
    color 110ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.edit-profile-action-btn--primary {
  background: linear-gradient(135deg, rgba(51, 82, 68, 0.96), rgba(120, 158, 133, 0.9));
  color: #fff;
}

.edit-profile-action-btn--primary:hover,
.edit-profile-action-btn--primary:focus-visible {
  background: linear-gradient(135deg, rgba(41, 69, 57, 0.98), rgba(95, 134, 112, 0.92));
  color: #fff;
}

.edit-profile-action-btn--primary:active {
  background: linear-gradient(135deg, rgba(31, 53, 43, 1), rgba(72, 111, 90, 0.95));
}

.edit-profile-action-btn--secondary {
  background: rgba(247, 250, 244, 0.74);
  border-color: rgba(33, 57, 46, 0.18);
  color: var(--text-accent-deep);
}

.edit-profile-action-btn--secondary:hover,
.edit-profile-action-btn--secondary:focus-visible {
  background: rgba(247, 250, 244, 0.92);
  border-color: var(--border-focus);
  color: var(--text-accent-deep);
}

.edit-profile-action-btn--secondary:active {
  background: rgba(238, 244, 236, 0.92);
  border-color: var(--border-focus);
}

.edit-profile-form-shell,
.edit-profile-support-card {
  padding: 1.5rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(55, 90, 73, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(247, 250, 244, 0.88));
  box-shadow: 0 14px 28px rgba(31, 51, 42, 0.08);
}

.edit-profile-form-shell h2,
.edit-profile-support-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.edit-profile-form-shell > .edit-profile-subcopy {
  margin: 0 0 0.45rem;
  padding: 0.5rem 0rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.62);
}

.edit-profile-form-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}

.edit-profile-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  align-items: stretch;
}

.edit-profile-actions > * {
  flex: 1 1 0;
  width: 100%;
}

.edit-profile-secondary-link {
  max-width: none;
}

.edit-profile-support-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.profile-page .edit-profile-form-column .edit-profile-form-shell,
.profile-page .edit-profile-form-column .edit-profile-support-card,
.profile-page .edit-profile-form-column .edit-profile-form {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.edit-profile-security-btn {
  width: auto;
  max-width: none;
  min-width: 12rem;
  background-image: none;
}

@media (max-width: 820px) {
  .edit-profile-summary {
    max-width: none;
  }

  .edit-profile-actions,
  .edit-profile-support-card {
    flex-direction: column;
    align-items: stretch;
  }

  .edit-profile-actions > * {
    flex-basis: auto;
  }

  .edit-profile-security-btn {
    width: 100%;
    min-width: 0;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
