/* Material directory and catalog photo UI. */
.material-form-card {
  width: min(920px, 100%);
  max-width: 920px;
}

.material-photo-field {
  margin-top: 18px;
}

.material-photo-editor {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(320px, 1.05fr);
  gap: 18px;
  padding: 14px;
  border: 1px solid #e5e5e9;
  border-radius: 17px;
  background: #fafafa;
}

.material-photo-current,
.material-photo-placeholder-large {
  min-height: 230px;
  border: 1px solid #e0e0e5;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.material-photo-current {
  position: relative;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.material-photo-current img {
  width: 100%;
  height: 230px;
  display: block;
  object-fit: contain;
  padding: 8px;
  transition: transform .16s ease;
}

.material-photo-current:hover img {
  transform: scale(1.025);
}

.material-photo-zoom-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(20,20,22,.78);
  color: #fff;
}

.material-photo-placeholder-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #a0a0a6;
}

.material-photo-placeholder-large i {
  font-size: 2rem;
}

.material-photo-upload-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.material-photo-upload-copy {
  margin-bottom: 12px;
}

.material-photo-upload-copy strong {
  display: block;
  color: #343438;
  font-size: .88rem;
}

.material-photo-upload-copy p {
  margin-top: 5px;
  color: #7a7a80;
  font-size: .76rem;
  line-height: 1.45;
}

.material-photo-upload-column .upload-zone {
  min-height: 142px;
}

.material-search-aliases-field {
  margin-top: 22px;
}

.material-alias-editor {
  padding: 12px;
  border: 1px solid #dedee4;
  border-radius: 14px;
  background: #fafafa;
}

.material-alias-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.material-alias-pills:has(.material-alias-pill) {
  margin-bottom: 10px;
}

.material-alias-pill {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  max-width: 100%;
  gap: 7px;
  padding: 4px 6px 4px 11px;
  border: 1px solid #d8d8de;
  border-radius: 999px;
  background: #fff;
  color: #343438;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.15;
}

.material-alias-pill > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.material-alias-remove {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 22px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #f1f1f3;
  color: #77777e;
  cursor: pointer;
}

.material-alias-remove:hover {
  background: #e7e7ea;
  color: #222226;
}

.material-alias-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.material-directory-name {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 310px;
}

.material-directory-photo-button,
.material-directory-photo-placeholder {
  width: 88px;
  height: 68px;
  flex: 0 0 88px;
  border: 1px solid #e1e1e5;
  border-radius: 12px;
  background: #f7f7f8;
}

.material-directory-photo-button {
  position: relative;
  padding: 4px;
  overflow: hidden;
  cursor: zoom-in;
}

.material-directory-photo-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform .16s ease;
}

.material-directory-photo-button:hover img {
  transform: scale(1.07);
}

.material-directory-photo-placeholder {
  display: grid;
  place-items: center;
  color: #aaaab0;
}

.material-directory-title-link {
  color: #252529;
  text-decoration: none;
}

.material-directory-title-link:hover {
  color: #3273dc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.material-category-link {
  color: #5f5f66;
  text-decoration: none;
}

.material-category-link:hover {
  color: #3273dc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.materials-table td {
  vertical-align: middle !important;
}

.zoom-plus {
  display: none !important;
}

.photo-modal-content.js-close-photo {
  cursor: zoom-out;
}

@media (max-width: 760px) {
  .material-photo-editor {
    grid-template-columns: 1fr;
  }

  .material-alias-entry {
    grid-template-columns: 1fr;
  }

  .material-directory-name {
    min-width: 250px;
  }

  .material-directory-photo-button,
  .material-directory-photo-placeholder {
    width: 76px;
    height: 60px;
    flex-basis: 76px;
  }
}
