/* Small tab pills */
.tab-sm .nav-link {
  padding: 0.3rem 0.6rem;
  font-size: 1rem;
}

/* Optional: center helper used in template */
.centered-text {
  text-align: center;
}

/* Main BlueSky previews */
[id^="sat-image-"] {
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Modal sizing */
.bluesky-viewer-modal .modal-xl {
  max-width: 98vw;
}

.bluesky-modal-content {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #f4f5f7;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
}

.bluesky-modal-header {
  background: #f7f8fa;
  color: #343a40;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bluesky-modal-header .text-muted {
  color: #6c757d !important;
}

.bluesky-modal-body {
  background: #d9dde2;
  padding: 1rem;
}

/* Image stage */
.bluesky-modal-stage {
  position: relative;
}

.bluesky-modal-image-wrapper {
  width: 100%;
  height: min(72vh, 780px);
  overflow: auto;

  /* Important: do not use flex centering here */
  display: block;

  padding: 0.75rem; 
  padding-right: 6.25rem;

  background: #4a4f55;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 0.85rem;
  text-align: center;
}

.bluesky-modal-image {
  display: block;
  width: 100%;
  max-width: none !important;
  height: auto;

  /* Centers image when it fits, but still allows full left/right scrolling when zoomed */
  margin-left: auto;
  margin-right: auto;

  border-radius: 0.45rem;
  background: #ffffff;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.25);
}
/* Right-side controls */
.bluesky-side-controls {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);

  width: 74px;
  min-height: 360px;
  max-height: 88%;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;

  padding: 0.65rem 0.5rem;
  border-radius: 1rem;

  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.bluesky-round-btn,
.bluesky-play-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;
  color: #343a40;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 0.15rem 0.45rem rgba(0, 0, 0, 0.12);
}

.bluesky-round-btn:hover,
.bluesky-play-btn:hover {
  background: #f1f3f5;
}

.bluesky-play-btn {
  background: #0d6efd;
  color: #ffffff;
  border-color: #0d6efd;
  margin-top: 0.25rem;
}

.bluesky-play-btn:hover {
  background: #0b5ed7;
  color: #ffffff;
}

.bluesky-side-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #495057;

  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;

  padding: 0.18rem 0.45rem;
  text-align: center;
}

.bluesky-side-divider {
  width: 42px;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
  margin: 0.15rem 0;
}

.bluesky-frame-label {
  font-size: 0.68rem;
  color: #6c757d;
  text-align: center;
  line-height: 1.1;
  max-width: 64px;
}

.bluesky-vertical-slider {
  width: 145px;
  height: 26px;
  transform: rotate(-90deg);
  margin: 3.7rem 0;
  cursor: pointer;
}

/* Modal backdrop */
.modal-backdrop.show {
  opacity: 0.85;
  background-color: #2f3338;
}

/* Mobile layout */
@media (max-width: 768px) {
  .bluesky-modal-body {
    padding: 0.75rem;
  }

  .bluesky-modal-image-wrapper {
    height: 58vh;
    padding-right: 0.75rem;
  }

  .bluesky-side-controls {
    position: static;
    transform: none;

    width: 100%;
    min-height: auto;
    max-height: none;

    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;

    margin-top: 0.75rem;
  }

  .bluesky-vertical-slider {
    width: 160px;
    transform: none;
    margin: 0;
  }

  .bluesky-frame-label {
    max-width: none;
  }
}
