/* Account-page overrides only: UserPro remains responsible for fields and AJAX. */
.page-w.photorecept-profile-page {
  padding: 24px;
}

.page-w.photorecept-profile-page .page-content {
  width: 100%;
  padding: 0;
}

.photorecept-profile-page .page-title {
  margin: 0 0 20px;
}

/* Override the plugin's inline width, including after switching view/edit. */
div.all-wrapper .photorecept-profile-page div.userpro:is([data-template="view"], [data-template="edit"]) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1040px !important;
  margin: 0 auto 24px !important;
  padding: 24px !important;
}

div.all-wrapper .photorecept-profile-page div.userpro-centered {
  box-sizing: border-box;
  padding: 40px 16px 20px;
  min-width: 0;
}

.photorecept-profile-page div.userpro-profile-img img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.photorecept-profile-page div.userpro-profile-name {
  overflow-wrap: anywhere;
}

div.all-wrapper .photorecept-profile-page div.userpro-body {
  min-width: 0;
  padding: 0;
}

div.all-wrapper .photorecept-profile-page div.userpro-section {
  margin: 0 0 12px;
  padding: 12px 16px !important;
  font-size: 16px !important;
  line-height: 1.4;
}

div.all-wrapper .photorecept-profile-page .userpro-field {
  margin: 12px 0;
}

div.all-wrapper .photorecept-profile-page div.userpro-label label {
  text-transform: none;
  font-size: 15px !important;
}

.photorecept-profile-page .userpro-input {
  min-width: 0;
  overflow-wrap: anywhere;
}

div.all-wrapper .photorecept-profile-page a.userpro-button.secondary,
div.all-wrapper .photorecept-profile-page input.userpro-button,
div.all-wrapper .photorecept-profile-page div.userpro-submit input.userpro-button {
  box-sizing: border-box;
  max-width: 100%;
  height: auto !important;
  min-height: 40px;
  padding: 8px 12px !important;
  font-size: 15px !important;
  line-height: 22px !important;
  white-space: normal;
}

div.all-wrapper .photorecept-profile-page div.userpro-submit input.userpro-button {
  margin-bottom: 8px !important;
}

/* Keep the note and its save button separate, including with Russian labels. */
.photorecept-profile-page div.userpro-alert {
  min-width: 0;
  margin: 20px 0 0;
}

.photorecept-profile-page div.userpro-alert .userpro-alert-input .userpro-input {
  display: flex;
  align-items: center;
  gap: 8px;
  float: none;
}

div.all-wrapper .photorecept-profile-page div.userpro-alert .userpro-alert-input .userpro-input input[type="text"] {
  flex: 1 1 0;
  min-width: 0;
  width: 100% !important;
  height: 42px !important;
  padding: 10px !important;
  font-size: 16px !important;
}

.photorecept-profile-page div.userpro-alert .userpro-alert-input .userpro-input input[type="button"] {
  position: static;
  flex: 0 0 auto;
  margin: 0 !important;
}

@media (min-width: 900px) {
  div.all-wrapper .photorecept-profile-page div.userpro:is([data-template="view"], [data-template="edit"]) {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px 28px;
    align-items: start;
  }

  .photorecept-profile-page div.userpro > .userpro-centered {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .photorecept-profile-page div.userpro > .userpro-alert,
  .photorecept-profile-page div.userpro > .userpro-body {
    grid-column: 2;
  }
}

@media (max-width: 899px) {
  .page-w.photorecept-profile-page {
    padding: 16px;
  }

  div.all-wrapper .photorecept-profile-page div.userpro:is([data-template="view"], [data-template="edit"]) {
    padding: 16px !important;
  }

  .photorecept-profile-page div.userpro > .userpro-body {
    margin-top: 20px;
  }
}

@media (max-width: 479px) {
  div.all-wrapper .photorecept-profile-page div.userpro-float div.userpro-label,
  div.all-wrapper .photorecept-profile-page div.userpro-float div.userpro-input {
    float: none;
    width: 100%;
    margin: 0 0 8px;
  }

  .photorecept-profile-page div.userpro-alert .userpro-alert-input .userpro-input {
    flex-wrap: wrap;
  }

  div.all-wrapper .photorecept-profile-page div.userpro-alert .userpro-alert-input .userpro-input input[type="text"] {
    flex-basis: 100%;
  }
}
