.itk-gallery-controls {
  display: none;
}

@media (min-width: 768px) {
  .itk-gallery-with-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
  }
  .itk-gallery-with-link > :not(.itk-gallery-heading, .itk-service-gallery-link) {
    grid-column: 1 / -1;
  }
  .itk-gallery-with-link > .itk-service-gallery-link {
    grid-column: 2;
    justify-self: end;
  }
  .itk-sink-gallery.itk-gallery-with-link > .itk-service-gallery-link {
    grid-row: 1;
    align-self: center;
    margin-bottom: 14px;
  }
  .itk-media-demo.itk-gallery-with-link > .itk-service-gallery-link {
    grid-row: 2;
    align-self: start;
  }
}

@media (max-width: 767px) {
  .itk-gallery-with-link > .itk-field-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .itk-gallery-with-link > .itk-field-gallery > button {
    flex: 0 0 84%;
    scroll-snap-align: start;
  }
  .itk-gallery-with-link > .itk-service-gallery-link {
    margin-top: 12px !important;
    text-align: center;
  }
  .itk-gallery-controls:not([hidden]) {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    direction: rtl;
  }
  .itk-gallery-controls button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #062b50;
    border-radius: 50%;
    background: #062b50;
    color: #fff;
    cursor: pointer;
  }
  .itk-gallery-controls button:disabled {
    background: #e8f0f5;
    color: #44617a;
    border-color: #ccdce6;
    cursor: default;
  }
  .itk-gallery-controls button:focus-visible {
    outline: 3px solid #009aac;
    outline-offset: 3px;
  }
}
