/* FEAST satellite gallery: Bootstrap 5 handles layout and card spacing. */
.sat-gallery { color: #263140; }
.sat-gallery__intro { color: #65758a; font-size: .95rem; }
.sat-gallery__sidebar { background: #f8f9fa !important; }
.sat-gallery__sidebar .form-label { font-weight: 500; }
.sat-gallery__sidebar .btn-primary { background-color: #0d6efd; border-color: #0d6efd; }
.sat-gallery__summary li { margin-bottom: .3rem; }
.sat-gallery__results-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}
/* Do not use display:grid on .sat-gallery__grid: it is a Bootstrap .row. */
.sat-gallery__grid > [class*="col-"] { min-width: 0; }
.sat-gallery__card { min-width: 0; overflow: hidden; }
.sat-gallery__card .card-title { color: #293748; font-size: 1rem; font-weight: 500; line-height: 1.35; }
.sat-gallery__image-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #e9eef4;
    cursor: zoom-in;
    overflow: hidden;
}
.sat-gallery__image-button img.card-img-top {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #e9eef4;
}
.sat-gallery__enlarge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: .4rem;
    color: #fff;
    background: rgba(19,36,57,.78);
    font-size: .78rem;
    text-align: center;
    opacity: 0;
    transition: opacity .15s;
}
.sat-gallery__image-button:hover .sat-gallery__enlarge,
.sat-gallery__image-button:focus-visible .sat-gallery__enlarge { opacity: 1; }
.sat-gallery__image-button:focus-visible { outline: 3px solid #0d6efd; outline-offset: -3px; }
.sat-gallery__card .card-footer a { color: #1765aa; }
@media (max-width: 575px) {
    .sat-gallery__image-button img.card-img-top { height: 235px; }
}

/* Full-screen image viewer */
.sat-viewer[hidden] {
    display: none !important;
}

.sat-viewer {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    background: rgba(10, 19, 30, .97);
    color: #fff;
}

.sat-viewer__topbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #344051;
}

.sat-viewer__heading {
    display: flex;
    flex-direction: column;
    font-size: 1rem;
}

.sat-viewer__heading span {
    color: #bccbdb;
    font-size: .8rem;
}

.sat-viewer__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.sat-viewer__controls button {
    padding: 5px 10px;
    background: #24344b;
    border: 1px solid #53627a;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
}

.sat-viewer__controls button:hover,
.sat-viewer__controls button[aria-pressed="true"] {
    background: #0d6efd;
    border-color: #0d6efd;
}

.sat-viewer__controls button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.sat-viewer__variants {
    display: flex;
    gap: 5px;
    margin-right: 8px;
}

.sat-viewer__close {
    font-size: 1.3rem;
    line-height: 1;
}

.sat-viewer__stage {
    display: block;
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px;
    text-align: center;
}

.sat-viewer__stage img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
}

.sat-viewer__footer {
    flex-shrink: 0;
    padding: 8px;
    color: #c4d0df;
    font-size: .8rem;
    text-align: center;
}

@media (max-width: 720px) {
    .sat-viewer__topbar {
        padding: 8px;
    }

    .sat-viewer__controls button {
        padding: 5px 8px;
    }

    .sat-viewer__stage {
        padding: 8px;
    }
}
