.magnetika-photo-preview-link {
  display: grid;
  min-width: 0;
  color: #7b1f35;
  text-align: center;
  text-decoration: none;
  cursor: zoom-in;
}

.magnetika-photo-preview-link__frame {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 9px;
  background: #f3ede7;
}

.magnetika-photo-preview-link__frame > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  object-position: center;
}

.magnetika-photo-preview-link__label {
  display: grid;
  place-items: center;
  min-height: 29px;
  color: #7b1f35;
  font-size: .72rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.magnetika-photo-preview-link:focus-visible,
.magnetika-preview-dialog button:focus-visible {
  outline: 2px solid #7b1f35;
  outline-offset: 2px;
}

.magnetika-photo-preview-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 8px 0 14px !important;
  padding: 10px 12px;
  border: 1px solid #dde6d8;
  border-radius: 11px;
  background: #f3f6ef;
  color: #354330;
  font-size: .8rem;
  line-height: 1.5;
}

.magnetika-photo-preview-note[hidden] {
  display: none;
}

.magnetika-photo-preview-note__icon {
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #e1ebdd;
  color: #365333;
  font-weight: 850;
}

.magnetika-cart-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
}

.magnetika-cart-photos > span {
  display: grid;
  width: 64px;
  gap: 3px;
  text-align: center;
}

.magnetika-cart-photos small {
  color: #7b1f35;
  font-size: .68rem;
  font-weight: 700;
}

.magnetika-preview-open {
  overflow: hidden !important;
}

.magnetika-preview-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(900px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid #ded3cb;
  border-radius: 18px;
  background: #fffdfa;
  color: #28201d;
  box-shadow: 0 22px 70px rgba(29, 20, 18, .3);
}

.magnetika-preview-dialog::backdrop {
  background: rgba(33, 25, 24, .76);
}

.magnetika-preview-dialog header,
.magnetika-preview-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
}

.magnetika-preview-dialog footer {
  justify-content: center;
}

.magnetika-preview-dialog h2 {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
}

.magnetika-preview-dialog button {
  display: grid !important;
  place-items: center;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 1px solid #e7d9d5 !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  background: #f7efed !important;
  color: #7b1f35 !important;
  font-size: 1.4rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.magnetika-preview-dialog__image {
  display: grid;
  place-items: center;
  margin-inline: 10px;
  padding: 6px;
  border-radius: 11px;
  background: #f3ede7;
}

.magnetika-preview-dialog__image img {
  display: block;
  width: 100%;
  height: min(68vh, 680px);
  height: min(68dvh, 680px);
  object-fit: contain;
}

.magnetika-preview-dialog__image p {
  padding: 10px;
  text-align: center;
}

.magnetika-preview-dialog [hidden] {
  display: none !important;
}

.magnetika-preview-dialog [data-preview-caption] {
  color: #655953;
  font-size: .82rem;
}
