/* Shared tour and editorial galleries: controls never cover the photo. */
.mtf-gallery-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:24px 0!important}
.mtf-gallery-enhanced .mtf-gallery-thumbnail{display:block;position:relative;width:100%;padding:0!important;border:0!important;border-radius:4px;background:transparent!important;overflow:hidden;cursor:zoom-in;box-shadow:none!important;line-height:0}
.mtf-gallery-enhanced .mtf-gallery-thumbnail img{display:block!important;width:100%!important;height:auto;aspect-ratio:3/2;object-fit:cover;margin:0!important;padding:0!important;border:0!important;border-radius:4px;box-shadow:none!important}
.mtf-gallery-enhanced .mtf-gallery-thumbnail:focus-visible{outline:3px solid #a94500;outline-offset:3px}
.mtf-gallery-enhanced .wp-lightbox-container button:not(.mtf-gallery-thumbnail){display:none!important}
dialog.mtf-gallery-dialog{position:fixed;inset:0;margin:auto!important;box-sizing:border-box;width:min(1000px,94vw)!important;max-width:94vw!important;max-height:92vh;max-height:92dvh;padding:0!important;border:0!important;border-radius:8px;background:#fff!important;color:#172019!important;overflow:auto;box-shadow:0 16px 70px #0006}
dialog.mtf-gallery-dialog::backdrop{background:rgba(0,0,0,.8)}
dialog.mtf-gallery-dialog .mtfb-lightbox-inner{display:flex;flex-direction:column;gap:0;padding:0!important;min-height:0}
dialog.mtf-gallery-dialog .mtfb-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;background:#101813;min-height:0}
dialog.mtf-gallery-dialog .mtfb-lightbox-stage img{display:block;width:100%;height:auto;max-height:calc(92vh - 180px);max-height:calc(92dvh - 180px);object-fit:contain;margin:0!important;border:0;border-radius:0;box-shadow:none}
dialog.mtf-gallery-dialog .mtf-gallery-details{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:16px 22px 0!important;color:#172019!important;font-size:16px;line-height:1.45}
dialog.mtf-gallery-dialog .mtf-gallery-details [role=status]{font-weight:700;color:#0c4634}
dialog.mtf-gallery-dialog [data-gallery-caption]{text-align:left!important;font-weight:400;white-space:normal}
dialog.mtf-gallery-dialog .mtf-gallery-controls{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;padding:16px 22px 20px}
dialog.mtf-gallery-dialog button.mtf-gallery-control{position:static!important;transform:none!important;inset:auto!important;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto!important;min-width:96px;height:auto!important;min-height:44px;padding:10px 18px!important;margin:0!important;border:0!important;border-radius:5px!important;background:#a94500!important;color:#fff!important;-webkit-text-fill-color:#fff!important;font:700 16px/1.3 inherit;line-height:1.3;font-size:16px;font-weight:700;cursor:pointer;box-shadow:none!important}
dialog.mtf-gallery-dialog button.mtf-gallery-control:hover{background:#873700!important}
dialog.mtf-gallery-dialog button.mtf-gallery-control:focus-visible{outline:3px solid #0c4634;outline-offset:3px}
@media(max-width:600px){.mtf-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}dialog.mtf-gallery-dialog .mtf-gallery-details{padding:12px 14px 0!important;font-size:14px}dialog.mtf-gallery-dialog .mtf-gallery-controls{padding:12px 14px 16px;gap:8px;justify-content:center}dialog.mtf-gallery-dialog button.mtf-gallery-control{min-width:0;flex:1;padding:10px 12px!important}dialog.mtf-gallery-dialog .mtfb-lightbox-stage img{max-height:calc(92dvh - 200px)}}

dialog.mtf-gallery-dialog .mtf-gallery-details span{color:#172019!important}dialog.mtf-gallery-dialog .mtf-gallery-details [role=status]{color:#0c4634!important}

/* Compact viewer footer: photo first, small controls and right-aligned caption. */
dialog.mtf-gallery-dialog .mtf-gallery-details{flex-direction:row;align-items:baseline;justify-content:space-between;gap:10px;padding:10px 16px 0!important;font-size:14px}
dialog.mtf-gallery-dialog .mtf-gallery-details [role=status]{flex:0 0 auto;font-size:13px}
dialog.mtf-gallery-dialog [data-gallery-caption]{text-align:right!important;font-size:14px;line-height:1.35;max-width:75%}
dialog.mtf-gallery-dialog .mtf-gallery-controls{justify-content:flex-end;gap:7px;padding:8px 16px 12px}
dialog.mtf-gallery-dialog button.mtf-gallery-control{flex:0 0 auto;min-width:0;min-height:32px;padding:6px 12px!important;font-size:13px;line-height:1.3;border-radius:4px!important}
dialog.mtf-gallery-dialog .mtfb-lightbox-stage img{max-height:calc(92dvh - 125px)}
@media(max-width:600px){dialog.mtf-gallery-dialog .mtf-gallery-details{padding:9px 12px 0!important;gap:8px}dialog.mtf-gallery-dialog .mtf-gallery-controls{padding:7px 12px 10px;gap:7px;justify-content:flex-end}dialog.mtf-gallery-dialog button.mtf-gallery-control{flex:0 0 auto;min-width:0;padding:6px 11px!important;min-height:32px;font-size:13px}dialog.mtf-gallery-dialog [data-gallery-caption]{max-width:72%;font-size:13px}dialog.mtf-gallery-dialog .mtfb-lightbox-stage img{max-height:calc(92dvh - 145px)}}

/* Reviewed footer: bold photo number and caption, centered controls beneath. */
dialog.mtf-gallery-dialog .mtf-gallery-details{display:block;text-align:center;padding:12px 16px 0!important;line-height:1.4}
dialog.mtf-gallery-dialog .mtf-gallery-details [role=status]{font-size:14px;font-weight:700;color:#172019!important}
dialog.mtf-gallery-dialog .mtf-gallery-details [role=status]:has(+ [data-gallery-caption]:not(:empty))::after{content:": ";white-space:pre}
dialog.mtf-gallery-dialog .mtf-gallery-details [data-gallery-caption]{display:inline;max-width:none;text-align:center!important;font-size:14px;line-height:1.4;font-weight:700;color:#172019!important}
dialog.mtf-gallery-dialog .mtf-gallery-controls{justify-content:center;padding:9px 16px 12px}
@media(max-width:600px){dialog.mtf-gallery-dialog .mtf-gallery-details{padding:10px 12px 0!important}dialog.mtf-gallery-dialog .mtf-gallery-details [role=status],dialog.mtf-gallery-dialog .mtf-gallery-details [data-gallery-caption]{font-size:13px}dialog.mtf-gallery-dialog .mtf-gallery-controls{justify-content:center;padding:8px 12px 11px}}

/* Final footer: centered caption, regular photo count left of centered controls. */
dialog.mtf-gallery-dialog .mtf-gallery-details{min-height:0;text-align:center}
dialog.mtf-gallery-dialog .mtf-gallery-details [data-gallery-caption]{display:block;text-align:center!important;font-weight:700}
dialog.mtf-gallery-dialog .mtf-gallery-controls{position:relative;align-items:center;justify-content:center;min-height:32px}
dialog.mtf-gallery-dialog .mtf-gallery-count{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:13px;line-height:1.3;font-weight:400;color:#172019!important;white-space:nowrap}
@media(max-width:600px){dialog.mtf-gallery-dialog .mtf-gallery-count{left:12px;font-size:12px}}
@media(max-width:400px){dialog.mtf-gallery-dialog .mtf-gallery-count{position:static;transform:none;margin-right:auto;font-size:11px}dialog.mtf-gallery-dialog .mtf-gallery-controls{gap:5px}dialog.mtf-gallery-dialog button.mtf-gallery-control{padding:6px 8px!important;font-size:12px}}
