/* The native dialog stays above page headers and keeps the reading page inert. */
.bh-image-viewer {
    box-sizing: border-box;
    width: min(1100px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid #dce7e4;
    border-radius: 16px;
    background: #fff;
    color: #293b45;
    box-shadow: 0 16px 70px rgb(0 0 0 / 30%);
    overflow: hidden;
}
.bh-image-viewer[open] { display: flex; flex-direction: column; }
.bh-image-viewer::backdrop { background: rgb(13 29 35 / 78%); }
.bh-image-viewer-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid #e1e9e6; }
.bh-image-viewer-header h2 { margin: 0; color: #176b55; font-size: 1.1rem; line-height: 1.5; }
.bh-image-viewer-close { flex: 0 0 auto; min-width: 100px; min-height: 44px; padding: 9px 16px; border: 1px solid #176b55; border-radius: 9px; background: #176b55; color: #fff; font: inherit; font-weight: 700; line-height: 1.4; cursor: pointer; touch-action: manipulation; }
.bh-image-viewer-close:hover { background: #10543f; }
.bh-image-viewer-close:focus-visible { outline: 3px solid #2c8cb8; outline-offset: 3px; }
.bh-image-viewer-body { display: flex; flex: 1 1 auto; min-height: 0; justify-content: center; align-items: center; padding: 12px; overflow: auto; overscroll-behavior: contain; }
.bh-image-viewer-body img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); object-fit: contain; }
.bh-image-viewer-body img[hidden], .bh-image-viewer [hidden] { display: none; }
.bh-image-viewer-caption { flex: 0 1 auto; max-height: 110px; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 12px 16px; border-top: 1px solid #e1e9e6; color: #344c55; font-size: .95rem; line-height: 1.6; }
.bh-image-viewer-error { padding: 30px 12px; margin: 0; }
.konu-icerik .bh-lesson-figure a[aria-haspopup="dialog"] { cursor: zoom-in; }
.bh-question-image-trigger { display: block; max-width: 100%; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: inherit; cursor: zoom-in; }
.bh-question-image-trigger img { display: block; max-width: 100%; height: auto; }
.bh-question-image-trigger:focus-visible, .bh-question-option-zoom:focus-visible { outline: 3px solid #287497; outline-offset: 4px; }
.bh-question-zoomable { cursor: zoom-in; }
.bh-question-option-with-zoom { min-width: 0; }
.bh-question-option-with-zoom > .konu-question-option { width: 100%; }
.bh-question-option-zoom { display: block; margin: 2px 0 8px auto; padding: 6px 8px; min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: #176b55; font: inherit; font-size: .85rem; text-decoration: underline; cursor: zoom-in; }
@media (max-width: 600px) {
    .bh-image-viewer { width: calc(100% - 20px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
    .bh-image-viewer-header { padding: 8px 12px; }
    .bh-image-viewer-body { padding: 8px; }
    .bh-image-viewer-caption { padding: 10px 12px; font-size: .9rem; }
}
@media print { .bh-image-viewer, .bh-image-viewer::backdrop { display: none !important; } }
