/**
 * LearnDash user profile / account page (LD30 [ld_profile]) — Prozess surfaces + typography.
 * Scoped with body.is-learndash-profile (see inc/learndash.php).
 */

body.is-learndash-profile {
  background: var(--surface);
}

/* Match main site reading width — default page template uses narrow container */
body.is-learndash-profile .pz-page__body.pz-container--narrow {
  width: min(100% - 2.5rem, 72rem);
}

body.is-learndash-profile .learndash-wrapper.ld-profile {
  --ld-color-system-body-text: var(--text);
  --ld-color-system-subtle-text: var(--muted);
  --ld-color-field-bg: var(--surface);
  --ld-color-field-border: var(--line-strong);
  --ld-color-system-middle-gray-light: var(--surface-muted);
  --ld-color-system-light-2: var(--surface-muted);
  --ld-color-primitives-grey-100: var(--surface-muted);
  --ld-color-primitives-grey-150: var(--line);
  --ld-color-primitives-blue-500: var(--amber);
  --ld-typography-font-family: var(--sans);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 768px) {
  body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: start;
  }

  body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-card {
    flex-direction: row;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
    margin: 0;
    width: 100%;
  }

  body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-stats {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
  }
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-card .ld-profile-avatar {
  border: 2px solid var(--line-accent);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-card .ld-profile-heading {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-card a.ld-profile-edit-link {
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-card a.ld-profile-edit-link:hover {
  color: var(--amber2);
  text-decoration: underline;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-stats .ld-profile-stat {
  border-color: var(--line);
  padding: 0.75rem 1rem;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-stats .ld-profile-stat strong {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--amber);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-profile-summary .ld-profile-stats .ld-profile-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading h3 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile button.ld-icon-search.ld-icon {
  color: var(--amber);
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile button.ld-icon-search.ld-icon:hover {
  color: var(--amber2);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-item-list.ld-course-list {
  margin-top: 0.5rem;
  background: var(--surface) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.5rem);
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button {
  background: var(--amber) !important;
  background-color: var(--amber) !important;
  border-color: transparent !important;
  color: var(--white) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button:hover,
body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button:focus {
  background: var(--amber2) !important;
  background-color: var(--amber2) !important;
  color: var(--white) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button:hover .ld-text,
body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button:hover .ld-icon {
  color: var(--white) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button .ld-text,
body.is-learndash-profile .learndash-wrapper.ld-profile #ld-profile .ld-section-heading .ld-expand-button .ld-icon {
  color: var(--white) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-item-list-item {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.65rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-item-list-item:hover {
  border-color: var(--line-accent);
  box-shadow: var(--shadow-soft);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-item-title,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-course-title {
  font-family: var(--serif);
  color: var(--text-heading);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-table-list-header,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-table-list-items {
  border-color: var(--line);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-primary-background,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-button-primary,
body.is-learndash-profile .learndash-wrapper.ld-profile a.ld-button,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-primary-background,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-primary-background .ld-text,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-primary-background .ld-icon {
  background: var(--amber) !important;
  color: var(--white) !important;
  border-color: transparent !important;
  border-radius: var(--radius);
  font-weight: 500;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-primary-background:hover,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-button-primary:hover,
body.is-learndash-profile .learndash-wrapper.ld-profile a.ld-button:hover,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-primary-background:hover,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-primary-background:hover .ld-text,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-primary-background:hover .ld-icon {
  background: var(--amber2) !important;
  color: var(--white) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-button-alternate,
body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-button-alternate .ld-text {
  background: transparent !important;
  color: var(--amber) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-expand-button.ld-button-alternate .ld-icon {
  background: var(--amber) !important;
  color: var(--white) !important;
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-status-complete {
  color: var(--amber);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-progress .ld-progress-bar {
  background: var(--surface-subtle);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-progress .ld-progress-bar-percentage {
  background: var(--amber);
}

body.is-learndash-profile .learndash-wrapper.ld-profile .ld-alert-success {
  background: var(--surface-muted) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
