.cotinder-gallery {
  padding: 4px 0 16px;
}

.cotinder-gallery h3,
.cotinder-gallery h4 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.cotinder-gallery p,
.cotinder-gallery li {
  margin: 0 0 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cotinder-gallery__card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
  background: #fffaf6;
}

.cotinder-gallery__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.cotinder-gallery__chip {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e4d5cb;
  border-radius: 999px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.cotinder-gallery__chip.is-on {
  border-color: #fd7728;
  background: #fff3ea;
}

.cotinder-gallery__form {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
}

.cotinder-gallery__form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.cotinder-gallery__form input[type="text"],
.cotinder-gallery__form input[type="file"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.cotinder-gallery .btn {
  margin: 0 8px 8px 0;
}

.cotinder-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cotinder-gallery__cell {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f3ebe4;
}

.cotinder-gallery__cell img,
.cotinder-gallery__cell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.cotinder-gallery__mark,
.cotinder-gallery__del {
  position: absolute;
  z-index: 1;
}

.cotinder-gallery__mark {
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
}

.cotinder-gallery__del {
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.cotinder-gallery__error {
  color: #b42318;
}

.cotinder-gallery__ok {
  color: #1f7a3a;
}

.cotinder-gallery__dlg {
  width: min(92vw, 720px);
  max-width: 100%;
  padding: 16px;
  border: 1px solid #eadfd6;
  border-radius: 14px;
}

.cotinder-gallery__dlg img,
.cotinder-gallery__dlg video {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.cotinder-gallery__dlg-x {
  margin-bottom: 8px;
}

@media (max-width: 767.98px) {
  .cotinder-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pet-detail-page.tabs__content_right--entity-page .index__tabs_tabs {
    flex-wrap: wrap;
  }

  .pet-detail-page.tabs__content_right--entity-page .index__tabs_tabs > div {
    flex: 1 1 45%;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .cotinder-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pet-detail-page.tabs__content_right--entity-page .index__tabs_tabs {
    flex-wrap: wrap;
  }

  .pet-detail-page.tabs__content_right--entity-page .index__tabs_tabs > div {
    flex: 1 1 25%;
    max-width: 25%;
  }
}
