.coolvideo-gallery-item {
  display: inline-flex;
  list-style: none;
}

.coolvideo-gallery-button,
.coolvideo-listing-button {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  background: #111;
  cursor: pointer;
}

.coolvideo-gallery-button {
  width: 100px;
  aspect-ratio: 1 / 1;
}

.coolvideo-listing-button {
  position: absolute;
  z-index: 2;
  right: .5rem;
  bottom: .5rem;
  width: 72px;
  aspect-ratio: 16 / 9;
}

.coolvideo-listing-target {
  position: relative;
}

.coolvideo-gallery-button:hover,
.coolvideo-gallery-button:focus-visible,
.coolvideo-listing-button:hover,
.coolvideo-listing-button:focus-visible {
  border-color: #24b9d7;
  outline: 2px solid #fff;
  outline-offset: -4px;
}

.coolvideo-gallery-button img,
.coolvideo-listing-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.coolvideo-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgb(0 0 0 / 78%);
  color: #fff;
  font-size: 1rem;
  place-items: center;
  transform: translate(-50%, -50%);
}

.coolvideo-modal[hidden] {
  display: none !important;
}

.coolvideo-modal {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  padding: 1rem;
  background: rgb(0 0 0 / 86%);
  place-items: center;
}

.coolvideo-modal-panel {
  position: relative;
  width: min(960px, 96vw);
}

.coolvideo-modal-close {
  position: absolute;
  z-index: 1;
  top: -2.75rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.coolvideo-modal-frame,
.coolvideo-responsive-video {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: #000;
}

.coolvideo-modal-frame iframe,
.coolvideo-responsive-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.coolvideo-modal-open {
  overflow: hidden;
}

.coolvideo-extra-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
}

.coolvideo-extra-video-title {
  margin-top: .75rem;
  font-size: 1rem;
}
