/* v1-12-6: Public Trips photo-credit register. */
.ms-photo-credits-template {
  background: #fff;
}

.ms-photo-credits-container {
  width: min(100% - 2rem, 1080px);
}

.ms-photo-credits-intro {
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.ms-photo-credits-kicker {
  margin: 0 0 .55rem;
  color: var(--ms-color-accent, #e85d16);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.ms-photo-credits-title {
  margin: 0;
  color: var(--ms-color-supporting, #263f4b);
}

.ms-photo-credits-lead {
  max-width: 760px;
  margin: .8rem 0 0;
  color: rgba(31, 31, 31, .72);
}

.ms-photo-credit-group {
  scroll-margin-top: 6rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.ms-photo-credit-group + .ms-photo-credit-group {
  border-top: 1px solid rgba(38, 63, 75, .12);
}

.ms-photo-credit-group-head {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.ms-photo-credit-group-head h2 {
  margin: 0;
  color: var(--ms-color-supporting, #263f4b);
}

.ms-photo-credit-group-note {
  margin: .35rem 0 0;
  color: rgba(31, 31, 31, .64);
}

.ms-photo-credit-trip-link,
.ms-photo-credit-source,
.ms-photo-credit-licence {
  color: var(--ms-color-accent, #e85d16);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ms-photo-credit-trip-link {
  flex: 0 0 auto;
  font-size: .88rem;
  font-weight: 700;
}

.ms-photo-credit-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(38, 63, 75, .14);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 42, 52, .06);
}

.ms-photo-credit-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ms-photo-credit-table th,
.ms-photo-credit-table td {
  padding: .9rem 1rem;
  border-bottom: 1px solid rgba(38, 63, 75, .11);
  text-align: left;
  vertical-align: middle;
}

.ms-photo-credit-table th {
  background: var(--ms-color-supporting, #263f4b);
  color: #fff;
  font-size: .78rem;
  letter-spacing: .02em;
}

.ms-photo-credit-table th:first-child,
.ms-photo-credit-table td:first-child {
  width: 150px;
}

.ms-photo-credit-table th:nth-child(2),
.ms-photo-credit-table td:nth-child(2) {
  width: 28%;
}

.ms-photo-credit-table th:nth-child(4),
.ms-photo-credit-table td:nth-child(4) {
  width: 20%;
}

.ms-photo-credit-table tbody tr:last-child td {
  border-bottom: 0;
}

.ms-photo-credit-thumb {
  position: relative;
  width: 120px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #eef1f3;
}

.ms-photo-credit-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.ms-photo-credit-name,
.ms-photo-credit-licence,
.ms-photo-credit-source-note {
  display: block;
}

.ms-photo-credit-name {
  color: #1f1f1f;
  font-weight: 650;
}

.ms-photo-credit-licence,
.ms-photo-credit-source,
.ms-photo-credit-source-note {
  margin-top: .25rem;
  font-size: .82rem;
  line-height: 1.45;
}

.ms-photo-credit-source-note {
  color: rgba(31, 31, 31, .62);
}

@media (max-width: 720px) {
  .ms-photo-credits-intro {
    padding-top: 2.7rem;
  }

  .ms-photo-credit-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ms-photo-credit-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .ms-photo-credit-table,
  .ms-photo-credit-table tbody,
  .ms-photo-credit-table tr,
  .ms-photo-credit-table td {
    display: block;
    width: 100%;
  }

  .ms-photo-credit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .ms-photo-credit-table tr {
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(38, 63, 75, .14);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(23, 42, 52, .05);
  }

  .ms-photo-credit-table td,
  .ms-photo-credit-table th:first-child,
  .ms-photo-credit-table td:first-child,
  .ms-photo-credit-table th:nth-child(2),
  .ms-photo-credit-table td:nth-child(2),
  .ms-photo-credit-table th:nth-child(4),
  .ms-photo-credit-table td:nth-child(4) {
    width: 100%;
  }

  .ms-photo-credit-table td {
    position: relative;
    padding: .75rem 1rem .75rem 8.4rem;
    min-height: 3.3rem;
  }

  .ms-photo-credit-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: .82rem;
    width: 6.7rem;
    color: var(--ms-color-supporting, #263f4b);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
  }

  .ms-photo-credit-table td[data-label="Thumbnail"] {
    padding: 1rem;
  }

  .ms-photo-credit-table td[data-label="Thumbnail"]::before {
    display: none;
  }

  .ms-photo-credit-thumb {
    width: 100%;
  }
}
