/* Photo overlay — hide the empty annotate bar; keep our chrome. */

#previewimagewrapper .previewimagetools,
#previewimagewrapper .PreviewImageTools,
#previewimagewrapper .ImageTools,
#previewimagewrapper .ImageBar,
.previewimagetools,
#Modal .previewimagetools,
.ui-dialog .previewimagetools,
[class*="Modal"] .previewimagetools,
#previewimagetools,
#PreviewImageTools,
.flagship-photo-view .ImageBar,
.flagship-photo-view .ImageTools,
.flagship-photo-view #annotate,
.flagship-photo-view #annotate_bar,
.flagship-photo-view .annotate-toolbar,
.flagship-photo-view [id*="nnotat"],
.flagship-photo-view [class*="nnotat"],
.flagship-photo-view a[href*="annotate"],
.flagship-preview-stage > div:not(:has(img)):not(.flagship-preview-chrome),
.flagship-photo-view #previewimagewrapper > div:not(:has(img)) {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    border: 0 !important;
    pointer-events: none !important;
}

#previewimagewrapper {
    background: transparent !important;
    min-height: 0 !important;
    line-height: 0;
}

.flagship-preview-stage {
    position: relative;
    overflow: visible;
    max-height: none;
    background: #ece6db;
    margin: 0 0 8px;
    text-align: center;
    line-height: 0;
}

#previewimage,
.flagship-preview-stage #previewimage,
.flagship-preview-stage img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    background: #e7dfd2;
    cursor: zoom-in;
}

.flagship-preview-chrome {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 8px;
    padding: 8px 10px;
    background: #3d4a51;
    color: #f4efe4;
    font-family: var(--flagship-sans, "Source Sans 3", sans-serif);
    font-size: 13px;
    line-height: 1.3;
    overflow: hidden;
}

.flagship-preview-zoom {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
}

.flagship-preview-zoom button {
    min-width: 36px;
    height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 2px;
    background: #5a666c;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.flagship-preview-zoom button:hover,
.flagship-preview-zoom button:focus-visible {
    background: #c4a35a;
    color: #1b3a4b;
}

.flagship-preview-file {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flagship-preview-dl {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
}

.flagship-preview-dl a {
    color: #f4efe4 !important;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #c4a35a;
    padding-bottom: 1px;
    white-space: nowrap;
}

.flagship-preview-dl a:hover,
.flagship-preview-dl a:focus-visible {
    color: #c4a35a !important;
}

.flagship-glance {
    max-width: 42rem;
    margin: 10px 0 22px;
    padding: 0;
    color: var(--flagship-navy, #1B3A4B);
    font-family: var(--flagship-sans, "Source Sans 3", sans-serif);
    line-height: 1.45;
}

.flagship-glance h2 {
    margin: 0 0 6px;
    font-family: var(--flagship-serif, "Source Serif 4", Georgia, serif);
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--flagship-navy, #1B3A4B);
}

.flagship-glance-sub {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--flagship-navy, #1B3A4B);
}

.flagship-glance-caption {
    margin: 0 0 8px;
    max-width: 38rem;
    font-size: 15px;
    line-height: 1.5;
    color: #3d4a51;
}

.flagship-glance-caption.is-rights {
    color: #7a3b12;
    font-weight: 600;
}

.flagship-glance-meta {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--flagship-muted, #59666d);
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .flagship-glance h2 { font-size: 22px; }
    .flagship-preview-chrome {
        flex-wrap: wrap;
        font-size: 12px;
    }
}
