/* The profile page: one column on a phone, You beside the two contact sections from a tablet up. */
/* The page stack already puts 12px above; 8px more sets the cards 20px under the heading, as drawn. */
#akashic-health-records-patient-portal-root .profile-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 8px;
}

#akashic-health-records-patient-portal-root .profile-sections__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

@media (min-width: 768px) {
  #akashic-health-records-patient-portal-root .profile-sections {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
  }
}

/* A profile section: heading with History and Edit, the values, and one Cancel/Save pair when editing. */
#akashic-health-records-patient-portal-root .profile-section {
  overflow: hidden;
}

#akashic-health-records-patient-portal-root .profile-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

#akashic-health-records-patient-portal-root h3.profile-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#akashic-health-records-patient-portal-root h3.profile-section__title svg {
  flex: none;
  width: 17px;
  height: 17px;
}

#akashic-health-records-patient-portal-root .profile-section__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* A changed field's name is a button; its 44px tap target is a transparent ::after that takes no layout space. */
#akashic-health-records-patient-portal-root button.profile-fields__k--changed::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}

#akashic-health-records-patient-portal-root .profile-section__body {
  padding: 2px 0 6px;
}

#akashic-health-records-patient-portal-root .profile-section__hint {
  margin: 10px 0;
}

#akashic-health-records-patient-portal-root .profile-section__form .profile-section__hint {
  margin: 0;
}

/* Rows of label and value; two short fields share a row, split by a hairline. */
#akashic-health-records-patient-portal-root .profile-fields__row {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

#akashic-health-records-patient-portal-root .profile-fields__row + .profile-fields__row .profile-fields__col {
  border-top: 1px solid var(--line-soft);
}

#akashic-health-records-patient-portal-root .profile-fields__col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px 0;
}

/* The panel pads the outer edges, so only the inner gutter is set here: the deck's 16px either side of
   the hairline between two fields, and 16px between the photo and the name. */
#akashic-health-records-patient-portal-root .profile-fields__row > .profile-fields__col:not(:last-child) {
  padding-right: 16px;
}

#akashic-health-records-patient-portal-root .profile-fields__row > .profile-fields__col + .profile-fields__col {
  padding-left: 16px;
  border-left: 1px solid var(--line-soft);
}

#akashic-health-records-patient-portal-root .profile-you__identity > .profile-fields__col {
  padding-left: 16px;
}

#akashic-health-records-patient-portal-root .profile-fields__k {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: var(--ak-label-weight);
  line-height: 1.55;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

#akashic-health-records-patient-portal-root .profile-fields button.profile-fields__k--changed.profile-fields__k--changed {
  position: relative;
  text-align: left;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

#akashic-health-records-patient-portal-root button.profile-fields__k--changed svg {
  width: 11px;
  height: 11px;
}

#akashic-health-records-patient-portal-root .profile-fields__v {
  font-size: 13px;
  font-weight: var(--ak-body-weight);
  line-height: 1.55;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

#akashic-health-records-patient-portal-root .profile-fields__v + .profile-fields__v {
  margin-top: 5px;
}

#akashic-health-records-patient-portal-root .profile-fields__v--dash {
  color: var(--faint);
}

#akashic-health-records-patient-portal-root .profile-fields__sub {
  margin-top: 5px;
  font-size: 11px;
  font-weight: var(--ak-body-weight);
  color: var(--ink-muted);
}

/* The drawing's --faint fails AA at these sizes, so the use and the sign-in hint read in --ink-muted. */
#akashic-health-records-patient-portal-root .profile-fields__use {
  margin-left: 4px;
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: lowercase;
}

#akashic-health-records-patient-portal-root .profile-fields__hint {
  color: var(--ink-muted);
}

#akashic-health-records-patient-portal-root .profile-section__login {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
}

/* The edit form: labelled controls two to a row, then Cancel and Save. */
#akashic-health-records-patient-portal-root .profile-section__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#akashic-health-records-patient-portal-root .profile-section__grid,
#akashic-health-records-patient-portal-root .profile-name {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#akashic-health-records-patient-portal-root .profile-name {
  grid-column: 1 / -1;
  gap: 10px;
}

#akashic-health-records-patient-portal-root .profile-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#akashic-health-records-patient-portal-root .profile-input--wide {
  grid-column: 1 / -1;
}

/* The fields keep the portal's 44px touch height; the deck's border, corner and type are drawn here. */
#akashic-health-records-patient-portal-root .profile-section .profile-input input,
#akashic-health-records-patient-portal-root .profile-section .profile-input [data-slot="select-trigger"] {
  width: 100%;
  min-width: 0;
}

/* A chosen language, race or tribe: a quiet chip whose remove keeps a 44px hit area without the size. */
#akashic-health-records-patient-portal-root .profile-input [data-slot="badge"] {
  max-width: 100%;
  padding: 2px 8px;
  border-color: var(--line);
  background: var(--sunken);
  box-shadow: none;
  font-size: 12px;
  font-weight: var(--ak-body-weight);
  white-space: normal;
  color: var(--ink);
}

#akashic-health-records-patient-portal-root .profile-section .profile-input [data-slot="badge"] button {
  position: relative;
  min-width: 0;
  min-height: 0;
}

#akashic-health-records-patient-portal-root .profile-input [data-slot="badge"] button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

#akashic-health-records-patient-portal-root .profile-section__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

#akashic-health-records-patient-portal-root .profile-section__row > .profile-section__grid {
  align-self: stretch;
}

#akashic-health-records-patient-portal-root .profile-section__save {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}

/* Cancel is drawn as red words with no outline beside the green Save. */

/* The photo sits with the name; the camera sits on the picture and opens where it is changed. */
#akashic-health-records-patient-portal-root .profile-you__identity {
  align-items: flex-start;
}

#akashic-health-records-patient-portal-root button.profile-photo-control {
  position: relative;
  flex-shrink: 0;
  min-height: 0;
  margin: 8px 0 0 2px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
}

#akashic-health-records-patient-portal-root .profile-you__identity > .profile-photo-control__avatar {
  margin: 8px 0 0 2px;
}

#akashic-health-records-patient-portal-root .profile-photo-control__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1;
}

#akashic-health-records-patient-portal-root .profile-photo-control__avatar--large {
  width: 96px;
  height: 96px;
  font-size: 30px;
}

#akashic-health-records-patient-portal-root .profile-photo-control__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The camera alone, no chip behind it, outside the circle's edge rather than on the face. */
#akashic-health-records-patient-portal-root .profile-photo-control__badge {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: grid;
  place-items: center;
  color: var(--primary);
}

#akashic-health-records-patient-portal-root .profile-photo-control__badge svg {
  width: 12px;
  height: 12px;
}

#akashic-health-records-patient-portal-root .profile-photo-control__preview {
  display: flex;
  justify-content: center;
}

#akashic-health-records-patient-portal-root .profile-photo-control__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

