/* Aircraft photo gallery — shared by the public proposal page and the case candidate list.
   Kept global rather than scoped because this app does not use Blazor scoped CSS. */

.aircraft-gallery {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aircraft-gallery-main {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
}

/* Attribution is a Planespotters licensing requirement, not decoration — it has to stay
   legible over any photo, hence the gradient rather than a flat tint. */
.aircraft-gallery-attribution {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 8px 4px;
    font-size: 0.68rem;
    line-height: 1.2;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    pointer-events: auto;
}

.aircraft-gallery-attribution a {
    color: #fff;
    text-decoration: underline;
}

.aircraft-gallery-count {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.68rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
}

/* Step arrows over the main image. The thumbnail strip's scrollbar is easy to miss, so
   these are the primary signal that more photos exist. */
.aircraft-gallery-step {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 120ms ease, background-color 120ms ease;
}

.aircraft-gallery-step:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.aircraft-gallery-step.prev { left: 8px; }
.aircraft-gallery-step.next { right: 8px; }

/* The fade hints that the strip continues past the visible thumbnails. */
.aircraft-gallery-strip-wrap {
    position: relative;
}

.aircraft-gallery-strip-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--mud-palette-surface, #fff));
}

.aircraft-gallery-strip {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-behavior: smooth;
}

.aircraft-gallery-thumb {
    width: 56px;
    height: 42px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 120ms ease, border-color 120ms ease;
}

.aircraft-gallery-thumb:hover {
    opacity: 0.9;
}

.aircraft-gallery-thumb.selected {
    opacity: 1;
    border-color: var(--mud-palette-primary, #594ae2);
}

.aircraft-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
}

.aircraft-gallery-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
}

.aircraft-gallery-nav {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    color: #fff !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

.aircraft-gallery-nav.left { left: 12px; }
.aircraft-gallery-nav.right { right: 12px; }

.aircraft-gallery-close {
    position: absolute !important;
    top: 12px;
    right: 12px;
    color: #fff !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

/* Placeholder for a masked candidate: photos are withheld until the case is revealed. */
.aircraft-gallery-masked {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--mud-palette-text-secondary, #757575);
    font-size: 0.75rem;
    text-align: center;
    padding: 12px;
}

@media (max-width: 600px) {
    .aircraft-gallery-thumb {
        width: 48px;
        height: 36px;
    }
}
