/* Planespotters + shared aircraft photo attribution */
.sfc-thumb,
.js-ac-thumb,
.indexed-thumb {
    position: relative;
}

.ac-photo-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.ac-photo-link:hover {
    text-decoration: none;
}

.ac-photo-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ac-photo-credit {
    position: absolute;
    bottom: 2px;
    right: 3px;
    left: 3px;
    font-size: 8px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.55);
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.gallery-item .ac-photo-link {
    position: absolute;
    inset: 0;
}

.gallery-item .ac-photo-credit {
    bottom: 5px;
    right: 8px;
    left: auto;
    font-size: 10px;
    padding: 2px 6px;
}

.ac-detail-photo {
    position: relative;
    width: 100%;
}

.ac-detail-photo img {
    width: 100%;
    display: block;
    object-fit: cover;
}

#k-aircraft-photo-wrap .k-photo {
    width: 100%;
    border-radius: 8px;
}

.ac-detail-photo .ac-photo-credit {
    bottom: 4px;
    right: 4px;
    left: auto;
    font-size: 9px;
}

.ac-photo-zoomable {
    cursor: zoom-in;
}

/* Full-screen photo lightbox */
.ac-photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ac-photo-lightbox[hidden] {
    display: none !important;
}

.ac-photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 24, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ac-photo-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: min(920px, 96vw);
    background: var(--white, #ffffff);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

html[data-theme="dark"] .ac-photo-lightbox-dialog {
    background: var(--white, #1a2030);
}

.ac-photo-lightbox-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 2;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ac-photo-lightbox-frame {
    display: block;
    line-height: 0;
    background: var(--stripe, #eef1f5);
}

html[data-theme="dark"] .ac-photo-lightbox-frame {
    background: #12161e;
}

.ac-photo-lightbox-img {
    display: block;
    max-width: min(920px, 96vw);
    max-height: min(78vh, 720px);
    width: auto;
    height: auto;
}

.ac-photo-lightbox-meta {
    padding: 14px 18px 18px;
    text-align: center;
}

.ac-photo-lightbox-credit {
    font-size: 13px;
    color: var(--text, #2c3340);
    margin-bottom: 8px;
}

.ac-photo-lightbox-ps-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--link, #2a6db5);
    text-decoration: none;
}

.ac-photo-lightbox-ps-link:hover {
    text-decoration: underline;
}

.ac-photo-lightbox-ps-link[hidden] {
    display: none !important;
}

body.ac-photo-lightbox-open {
    overflow: hidden;
}

a.indexed-card {
    text-decoration: none;
    color: inherit;
}

a.indexed-card:hover {
    text-decoration: none;
    color: inherit;
}
