@font-face {
  font-family: "Gothic A1";
  src: url("/assets/GothicA1-Regular-a3f3c24a.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Gothic A1";
  src: url("/assets/GothicA1-Bold-221fd17c.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

.customer-profile {
  --customer-ink: #18302a;
  --customer-muted: #52675e;
  --customer-green: #1c6247;
  --customer-border: #dce6e0;
  --customer-tint: #eff6f1;
  --customer-gutter: 1.375rem;

  container: customer-profile / inline-size;
  margin: 0 auto 2rem;
  color: var(--customer-ink);
  font-family: "Gothic A1", sans-serif;
  line-height: 1.5;
}

.customer-profile__back,
.customer-profile__edit,
.customer-profile__file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: .375rem;
  font-weight: 700;
  text-decoration: none;
}

.customer-profile__back {
  min-height: 2.75rem;
  margin-top: 1.125rem;
  padding: .5rem .625rem;
  color: var(--customer-green);
  font-size: .875rem;
}

.customer-profile__back:hover,
.customer-profile__file-link:hover {
  background: #deeee3;
  color: #134831;
}

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

.customer-profile__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 9.5rem;
  padding: 1.625rem;
  color: #fff;
}

.customer-profile__identity {
  display: flex;
  flex: 1 1 24rem;
  align-items: center;
  gap: 1.125rem;
  min-width: 0;
}

.customer-profile__identity > div {
  min-width: 0;
}

.customer-profile__identity-icon {
  display: grid;
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border: 1px solid #caefda40;
  border-radius: .75rem;
  background: #e1ffea12;
  color: #c0e9cf;
  font-size: 1.5rem;
}

.customer-profile__reference {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .375rem;
  color: #c7e9d5;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.customer-profile__reference span {
  padding: .15rem .45rem;
  border: 1px solid #caefda40;
  border-radius: .25rem;
  letter-spacing: .035em;
  font-variant-numeric: tabular-nums;
}

.customer-profile__header h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(1.5rem, 4.1cqi, 2.5rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.customer-profile__edit {
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 1px solid #d3ebdb;
  background: #eaf7ee;
  color: #153e2d;
  font-size: .875rem;
}

.customer-profile__edit:hover {
  background: #fff;
  color: #153e2d;
}

.customer-profile .customer-profile__edit:focus-visible {
  outline-color: #fff;
}

.customer-profile__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.125rem;
  margin-top: 1.125rem;
}

.customer-profile__panel {
  min-width: 0;
  padding: var(--customer-gutter);
  border: 1px solid var(--customer-border);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 2px 4px #102f2608;
}

.customer-profile__panel .customer-profile__section-title {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 0 0 1rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--customer-border);
  color: var(--customer-ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.customer-profile__section-title i {
  color: var(--customer-green);
  font-size: 1rem;
}

.customer-profile__details,
.customer-profile__contact-details {
  display: grid;
  gap: .8rem;
  margin: 0;
}

.customer-profile__details dt,
.customer-profile__contact-details dt {
  margin-bottom: .125rem;
  color: var(--customer-muted);
  font-size: .75rem;
  font-weight: 700;
}

.customer-profile__details dd,
.customer-profile__contact-details dd {
  margin: 0;
  font-size: .875rem;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.customer-profile__field dt {
  color: var(--customer-ink);
  font-size: .875rem;
  line-height: 1.3;
}

.customer-profile__empty {
  color: var(--customer-muted);
  font-size: .8125rem;
}

.customer-profile__contact-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
}

.customer-profile__contact-group {
  min-width: 0;
  padding: .875rem .75rem;
  border: 1px solid var(--customer-border);
  border-radius: .5rem;
  background: #f7faf8;
}

.customer-profile__contact-group h3,
.customer-profile__note h3,
.customer-profile__observation-list h3 {
  margin: 0 0 .625rem;
  color: var(--customer-ink);
  font-size: .875rem;
  font-weight: 700;
}

.customer-profile__contact-group h3 {
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--customer-border);
  color: var(--customer-green);
}

.customer-profile__portal {
  color: var(--customer-green);
  text-decoration: underline;
  text-underline-offset: .15em;
}

.customer-profile__portal:hover {
  color: #134831;
}

.customer-profile__files {
  margin: .875rem 0 0;
  padding: 0;
  list-style: none;
}

.customer-profile__files li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .375rem .75rem;
  min-height: 2.625rem;
  padding: .25rem 0;
  border-top: 1px solid var(--customer-border);
  font-size: .875rem;
  line-height: 1.4;
}

.customer-profile__file-label {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
}

.customer-profile__file-label i {
  color: var(--customer-green);
}

.customer-profile__file-link {
  min-height: 2rem;
  padding: .375rem .625rem;
  background: var(--customer-tint);
  color: var(--customer-green);
  font-size: .8125rem;
}

.customer-profile__file-link i {
  font-size: .7rem;
}

.customer-profile__note {
  padding: .875rem 1rem;
  border-left: 3px solid #6ba287;
  border-radius: 0 .375rem .375rem 0;
  background: var(--customer-tint);
}

.customer-profile__note p {
  margin: 0;
  font-size: .875rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.customer-profile__observation-list {
  margin-top: 1.25rem;
}

.customer-profile__observation-list > p {
  margin: 0;
}

.customer-profile__observations {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .875rem;
}

.customer-profile__observations thead {
  background: #f7faf8;
  color: var(--customer-muted);
  font-size: .75rem;
}

.customer-profile__observations th,
.customer-profile__observations td {
  padding: .625rem .75rem;
  border-bottom: 1px solid var(--customer-border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.customer-profile__observations th:first-child {
  width: 4.5rem;
  font-variant-numeric: tabular-nums;
}

.customer-profile__observations td {
  white-space: pre-wrap;
}

@container customer-profile (min-width: 34rem) {
  .customer-profile__contact-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container customer-profile (min-width: 49rem) {
  .customer-profile__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

@container customer-profile (max-width: 30rem) {
  .customer-profile__header,
  .customer-profile__panel {
    padding: 1rem;
  }

  .customer-profile__identity {
    flex-basis: 100%;
    align-items: flex-start;
    gap: .75rem;
  }

  .customer-profile__identity-icon {
    flex-basis: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }
}
