.ory-profile {
  --profile-ink: #102849;
  --profile-muted: #4f647d;
  --profile-line: #d8e3ef;
  --profile-paper: #fff;
  --profile-blue: #164481;
  --profile-focus: #007f93;
  max-width: 960px;
  margin-inline: auto;
  color: var(--profile-ink);
}

.ory-profile__header {
  margin-block-end: 24px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--profile-line);
  border-inline-start: 4px solid #d4a23d;
  border-radius: 10px;
  background: linear-gradient(110deg, #fff, #ecf4fb);
}

.ory-profile__header h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 44px);
  letter-spacing: -.04em;
  line-height: 1.12;
}

.ory-profile__header p {
  margin: 10px 0 0;
  color: var(--profile-muted);
  line-height: 1.55;
}

.ory-profile.joomla-page {
  padding: 0;
  border: 0;
  min-height: auto;
  background: transparent;
  box-shadow: none;
}

.ory-profile :is(.com-users-profile, .profile-edit) > .page-header {
  display: none;
}

.ory-profile .profile,
.ory-profile #member-profile {
  display: grid;
  gap: 18px;
}

.ory-profile .profile > fieldset,
.ory-profile #member-profile > fieldset {
  min-inline-size: 0;
  margin: 0;
  padding: 16px clamp(15px, 3vw, 26px) 24px;
  border: 1px solid var(--profile-line);
  border-radius: 10px;
  background: var(--profile-paper);
}

.ory-profile fieldset > legend {
  max-inline-size: 100%;
  padding: 0 8px;
  font-weight: 750;
  font-size: 17px;
  color: var(--profile-ink);
}

.ory-profile .profile fieldset > dl {
  display: grid;
  grid-template-columns: minmax(125px, 1fr) minmax(0, 2fr);
  align-items: baseline;
  margin: 0;
  border-block-start: 1px solid #eaf0f6;
}

.ory-profile .profile :is(dt, dd) {
  margin: 0;
  padding: 11px 6px;
  border-block-end: 1px solid #eaf0f6;
  overflow-wrap: anywhere;
}

.ory-profile .profile dt {
  color: var(--profile-muted);
  font-size: 14px;
}

.ory-profile .profile dd {
  font-weight: 600;
}

.ory-profile .profile > ul.com-users-profile__edit,
.ory-profile .profile > ul.com-users-profile__edit > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ory-profile .profile > ul.com-users-profile__edit {
  justify-self: end;
}

.ory-profile #member-profile > fieldset:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 3vw, 28px);
}

.ory-profile #member-profile > fieldset:first-of-type > p {
  grid-column: 1 / -1;
}

.ory-profile .control-group {
  min-inline-size: 0;
  margin-block: 0 14px;
}

.ory-profile .control-label {
  margin-block-end: 6px;
  font-weight: 700;
}

.ory-profile .control-group :is(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="button"], [type="submit"]), select, textarea) {
  width: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  border: 1px solid #bccce0;
  border-radius: 6px;
  color: var(--profile-ink);
  font: inherit;
}

.ory-profile .control-group input:read-only:not([type="checkbox"], [type="radio"], [type="hidden"]) {
  background: #f1f5f9;
}

.ory-profile :is(.form-text, small) {
  color: var(--profile-muted);
  line-height: 1.45;
}

.ory-profile :is(.password-group, .input-group):has(.input-password-toggle) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ory-profile :is(.password-group, .input-group):has(.input-password-toggle) > input {
  flex: 1 1 125px;
  width: auto;
}

.ory-profile :is(a.btn, button.btn) {
  display: inline-block;
  max-inline-size: 100%;
  padding: 10px 15px;
  border: 1px solid var(--profile-blue);
  border-radius: 6px;
  background: var(--profile-blue);
  color: white;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.ory-profile :is(a.btn, button.btn):hover {
  filter: brightness(.92);
}

.ory-profile :is(button.btn-danger, button.input-password-toggle, .choices__button) {
  border: 1px solid #bccce0;
  border-radius: 6px;
  background: #f4f8fc;
  color: var(--profile-blue);
}

.ory-profile .choices__button {
  padding: 5px 8px;
}

.ory-profile .com-users-profile__edit-submit > .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-block-start: 4px;
}

.ory-profile .com-users-profile__multifactor :is(h2, h3, h4) {
  margin: 8px 0;
  font-size: 17px;
}

.ory-profile .com-users-profile__multifactor [class*="mfa-method"]:has(> :is(h2, h3, h4, img)) {
  padding: 14px;
  border: 1px solid var(--profile-line);
  border-radius: 8px;
}

.ory-profile :focus-visible {
  outline: 2px solid var(--profile-focus);
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .ory-profile .profile fieldset > dl,
  .ory-profile #member-profile > fieldset:first-of-type {
    grid-template-columns: minmax(0, 1fr);
  }

  .ory-profile .profile dt {
    padding-block-end: 0;
    border-block-end: 0;
  }

  .ory-profile .profile dd {
    padding-block-start: 3px;
  }

  .ory-profile .profile > ul.com-users-profile__edit {
    justify-self: start;
  }
}

.ory-profile.ory-reset {
  max-width: 620px;
}

.ory-reset :is(.com-users-reset, .com-users-reset-confirm, .com-users-reset-complete) > .page-header {
  display: none;
}

.ory-reset form.form-validate {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--profile-line);
  border-radius: 10px;
  background: var(--profile-paper);
  box-shadow: 0 12px 30px rgb(16 40 73 / 7%);
}

.ory-reset form.form-validate > fieldset {
  min-inline-size: 0;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
}

.ory-reset fieldset > legend {
  padding: 0;
  margin-block-end: 18px;
  color: var(--profile-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.ory-reset form.form-validate > .control-group:last-of-type {
  margin-block-end: 0;
}

.ory-reset__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-block-start: 20px;
  font-size: 14px;
  font-weight: 700;
}

.ory-reset__message[role="alert"] {
  border-inline-start-color: #ad4545;
  background: #fff4f3;
  color: #742b2b;
}
