/* Gallery styles supplement the existing Boreal theme. */
.gallery-page { color: #ddd; }
.gallery-page *, .gallery-page *::before, .gallery-page *::after { box-sizing: border-box; }
.gallery-page [hidden] { display: none !important; }
.gallery-page #wrapper { max-width: 1200px; padding: 0 36px; }
.gallery-page header.theme { position: relative; min-height: 170px; padding: 35px 0 30px 194px; }
.gallery-page header .site-logo { position: absolute; left: 0; top: 26px; width: 170px; }
.gallery-page header .site-logo img { display: block; width: 170px; height: auto; }
.gallery-page header .site-title { float: none; margin: 0; }
.gallery-page header .site-title h1 { font-size: clamp(32px, 4.7vw, 60px); line-height: 1.08; margin: 0 0 8px; }
.pg-site-tagline { margin: 0; color: #aaa; font-size: 15px; font-style: italic; line-height: 1.5; }
.gallery-page #wrapperOuter { overflow: visible; }
.gallery-page #containerWrap, .gallery-page #container { padding: 0; margin: 0; }
.gallery-page #content { top: 0; margin: 0; width: auto; padding: 34px; min-height: 0; }
.pg { font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.6; }
.pg h1, .pg h2 { font-weight: normal; color: #fff; }
.pg h1 { font-size: clamp(29px, 3.7vw, 43px); line-height: 1.15; margin: 0 0 16px; }
.pg h2 { line-height: 1.2; font-size: 27px; margin: 0 0 10px; }
.pg p { margin: 0 0 16px; }
.pg a, .pg-site-footer a { color: #b9d594; }
@media (hover: hover) and (pointer: fine) { .pg a:hover, .pg-site-footer a:hover { color: #e0f1ca; } }
.gallery-page :focus-visible { outline: 3px solid #d8ebbb; outline-offset: 4px; }
.pg-skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 12px 18px; background: #d8ebbb; color: #111; }
.pg-skip-link:focus { top: 12px; }
.pg-site-nav { display: grid; grid-template-columns: repeat(6, 1fr); background: linear-gradient(#292929, #171717); border-top: 2px solid #416263; border-bottom: 1px solid #111; }
.pg-site-nav-item { min-width: 0; position: relative; text-align: center; border-right: 1px solid #333; color: #eee; }
.pg-site-nav-item:last-child { border-right: 0; }
.pg-site-nav-item > summary, a.pg-site-nav-item { font-size: 15px; line-height: 24px; display: block; padding: 18px 8px; color: #eee; cursor: pointer; }
.pg-site-nav-item > summary { list-style: none; }
.pg-site-nav-item > summary::-webkit-details-marker { display: none; }
.pg-site-nav-item > summary::after { content: ' ▾'; font-size: 11px; color: #aaa; }
.pg-site-nav-item[open] > summary, .pg-site-nav-item > summary:hover, a.pg-site-nav-item:hover { background: #333; color: #fff; }
.pg-site-nav .pg-current { background: linear-gradient(#839b65, #657c4a); color: #fff; }
.pg-site-nav-item ul { position: absolute; top: 100%; left: 0; min-width: 210px; margin: 0; padding: 6px 0; list-style: none; text-align: left; z-index: 10; background: #222; border: 1px solid #444; box-shadow: 0 10px 25px #0008; }
.pg-site-nav-item ul a { display: block; padding: 8px 16px; color: #ddd; line-height: 1.5; }
.pg-site-nav-item ul a:hover { background: #333; }
.pg-menu-toggle { width: 100%; background: #222; color: #fff; border: 0; border-top: 2px solid #416263; font: inherit; padding: 14px 20px; text-align: left; }
.pg-menu-toggle span { float: right; }
.pg-eyebrow { font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1.5px; color: #b4ca9a; margin-bottom: 9px !important; }
.pg-intro { max-width: 790px; margin-bottom: 28px; }
.pg-title-mobile { display: none; }
.pg-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.pg-intro > p:last-child { color: #bdbdbd; }
.pg form label { display: block; font-size: 13px; font-weight: bold; margin: 0 0 17px; color: #d7d7d7; }
.pg input:not([type=checkbox]):not([type=hidden]), .pg select { display: block; width: 100%; min-height: 46px; border: 1px solid #606060; border-radius: 4px; background: #262626; color: #fff; padding: 10px 12px; font: 15px Arial, sans-serif; margin: 6px 0 0; color-scheme: dark; }
.pg input::placeholder { color: #aaa; }
.pg input[type=checkbox] { width: 18px; height: 18px; vertical-align: middle; accent-color: #8fa66d; margin-right: 6px; }
.pg .pg-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding: 20px; background: #292929; border: 1px solid #464646; border-radius: 5px; }
.pg .pg-filters label { margin: 0; }
.pg .pg-filters .pg-search-field input { margin-top: 0; }
.pg button, .pg-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid #8fa86d; border-radius: 4px; padding: 10px 18px; font: bold 14px/1.4 Arial, sans-serif; color: #fff !important; background: #657d47; text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pg button:hover, .pg-button:hover { background: #7b945a; } }
.pg .pg-button-secondary { background: #292929; border-color: #666; }
@media (hover: hover) and (pointer: fine) { .pg .pg-button-secondary:hover { background: #404040; } }
.pg button:disabled { opacity: .55; cursor: wait; }
.pg .pg-button-small { min-height: 38px; padding: 7px 13px; }
.pg-results-heading { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; color: #aaa; font-size: 13px; }
.pg-results-heading p { margin: 0; }
.pg-results-heading strong { color: #eee; }
.pg-event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pg-event-card { background: #292929; border: 1px solid #4b4b4b; border-radius: 5px; overflow: hidden; }
.pg-event-card:hover { border-color: #a9bf87; }
.pg-event-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: #ddd !important; }
.pg-event-cover { position: relative; aspect-ratio: 4 / 3; background: #1c1c1c; overflow: hidden; }
.pg-event-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pg-cover-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; font-size: 23px; color: #9aac80; }
.pg-event-text { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.pg-event-date { font-size: 11px; color: #aaa; margin: 0 0 18px !important; }
.pg-event-text h2 { font-size: 25px; line-height: 1.15; margin: 0 0 10px; }
.pg-event-venue { font-size: 12px; line-height: 1.6; color: #b8b8b8; margin-bottom: 7px !important; }
.pg-event-cta { font-size: 12px; font-weight: bold; color: #b9d594; margin-top: auto; }
.pg-event-cta span { float: right; }
.pg-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 30px 0 0; color: #aaa; font-size: 13px; }
.pg-back { display: inline-block; font-size: 13px; margin: 0; white-space: nowrap; }
.pg-album-heading { margin-bottom: 10px; }
.pg .pg-album-heading h1 { margin-bottom: 6px; padding: 0; }
.pg .pg-album-meta { color: #bcbcbc; font-size: 13px; margin: 0; line-height: 1.35; }
.pg-album-meta time, .pg-album-location { display: block; }
.pg-album-meta time { margin-bottom: 2px; }
.pg-album-tools { display: flex; justify-content: space-between; align-items: center; gap: 15px; border-top: 1px solid #555; padding: 12px 0; }
.pg-album-tools p { font-size: 13px; margin: 0; }
.pg-muted, .pg .muted { color: #aaa; font-size: 13px; }
.pg-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pg-photo { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #1a1a1a; border: 1px solid #4b4b4b; border-radius: 3px; overflow: hidden; }
.pg-photo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
@media (hover: hover) and (pointer: fine) { .pg-photo:hover { border-color: #b9d594; } }
.pg-photo-number { position: absolute; top: 5px; left: 5px; background: #000b; padding: 1px 6px; font-size: 10px; line-height: 1.7; color: #ddd; border-radius: 2px; }
.pg-load-wrap { text-align: center; margin-top: 28px; }
.pg-load-wrap p { margin-top: 8px; }
.pg-archive { display: grid; grid-template-columns: minmax(140px, 260px) 1fr; gap: 28px; padding: 25px; background: #292929; border: 1px solid #555; border-radius: 5px; align-items: center; }
.pg-archive img { max-width: 100%; height: auto; margin: auto; }
.pg-archive p { color: #bbb; }
.pg-empty { padding: 25px 0; color: #bbb; grid-column: 1 / -1; }
.pg-site-footer { margin-top: 38px; padding-top: 22px; border-top: 1px solid #555; font: 12px/1.7 Arial, sans-serif; color: #999; }
.pg-site-footer p { margin-bottom: 10px; }
.pg-site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pg-admin-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.pg-admin-bar form { margin: 0; }
.pg-status, .pg-errors { padding: 15px 20px; border: 1px solid #8ba568; border-radius: 4px; background: #26301d; }
.pg-errors { background: #402b27; border-color: #bd8171; }
.pg .scroll-table { overflow: auto; margin: 24px 0; }
.pg table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pg th, .pg td { padding: 13px 12px; text-align: left; border-bottom: 1px solid #555; vertical-align: top; }
.pg th { color: #ddd; background: #262626; }
.pg td form { margin-top: 8px; }
.pg td button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.pg .pg-admin-form { max-width: 800px; padding: 24px; background: #292929; border: 1px solid #555; border-radius: 5px; }
.pg .pg-login-form { max-width: 420px; }
.pg-viewer { position: fixed; inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #101010; color: #eee; font: 14px/1.5 Arial, sans-serif; overflow: hidden; }
.pg-viewer[open] { display: flex; flex-direction: column; }
.pg-viewer::backdrop { background: #000e; }
.pg-viewer-shell { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; background: #101010; }
.pg-viewer-shell:fullscreen { width: 100vw; height: 100dvh; }
.pg-photo, .pg-viewer button { -webkit-tap-highlight-color: transparent; }
.pg-photo:active { border-color: #b9d594; }
.pg-viewer button:active { background: #444; }
.gallery-page.pg-touch-input .pg-photo:focus-visible, .gallery-page.pg-touch-input .pg-viewer button:focus-visible { outline: none; }
.pg-viewer button { font: bold 13px/1.4 Arial, sans-serif; min-height: 46px; border: 1px solid #555; border-radius: 4px; padding: 10px 16px; color: #fff; background: #292929; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .pg-viewer button:hover { background: #444; } }
.pg-viewer button:disabled { opacity: .4; cursor: default; }
.pg-viewer-toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 15px 24px; background: #202020; flex: 0 0 auto; }
.pg-viewer-toolbar h2 { font: bold 15px/1.4 Arial, sans-serif; margin: 0; color: #ddd; }
.pg-viewer-toolbar p { font-size: 12px; margin: 3px 0 0; color: #aaa; }
.pg-viewer-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; touch-action: pan-y pinch-zoom; user-select: none; }
.pg-viewer-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pg-viewer-stage p { position: absolute; bottom: 18px; left: 20px; right: 20px; text-align: center; background: #111b; color: #ddd; pointer-events: none; }
.pg-viewer-stage p:empty { display: none; }
.pg-viewer-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: #202020; }
.pg-viewer-controls p { margin: 0; color: #aaa; font-size: 12px; }
@media (max-width: 900px) {
    .gallery-page #wrapper { padding: 0 24px; }
    .gallery-page #content { padding: 26px; }
    .pg-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pg-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pg .pg-filters { grid-template-columns: 1fr; }
    .pg .pg-search-field { grid-column: 1 / -1; }
    .pg .pg-filters > button { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .gallery-page #wrapper { padding: 0 12px; }
    .gallery-page header.theme { min-height: 135px; padding: 27px 0 23px 110px; }
    .gallery-page header .site-logo { top: 25px; width: 96px; }
    .gallery-page header .site-logo img { width: 96px; }
    .gallery-page header .site-title h1 { font-size: 32px; }
    .pg-site-tagline { font-size: 11px; max-width: 245px; }
    .gallery-page #content { padding: 23px 16px; }
    .pg-site-nav { grid-template-columns: 1fr 1fr; }
    .pg-site-nav-item { border-bottom: 1px solid #444; }
    .pg-site-nav-item > summary, a.pg-site-nav-item { padding: 13px 8px; font-size: 14px; }
    .pg-site-nav-item ul { position: static; min-width: 0; box-shadow: none; font-size: 12px; }
    .pg-site-nav-item[open] { grid-column: 1 / -1; }
    .gallery-page.pg-js .pg-menu-toggle { display: block; }
    .gallery-page.pg-js .pg-site-nav:not(.pg-menu-open) { display: none; }
    .pg h1 { font-size: 31px; }
    .pg-intro { margin-bottom: 22px; }
    .pg-title-desktop { display: none; }
    .pg-title-mobile { display: inline; }
    .pg-intro p { font-size: 13px; }
    .pg .pg-filters { padding: 15px; gap: 12px; }
    .pg-event-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .pg-event-text { padding: 13px 11px; line-height: 1.3; }
    .pg-event-text h2 { font-size: 22px; line-height: 1.1; margin-bottom: 6px; padding: 0; }
    .pg-event-date { font-size: 10px; margin-bottom: 8px !important; }
    .pg-event-venue { font-size: 11px; line-height: 1.3; margin-bottom: 4px !important; }
    .pg-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .pg-archive { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    .pg-archive img { max-width: 220px; }
    .pg .pg-admin-form { padding: 18px; }
    .pg-viewer-toolbar { padding: 12px; }
    .pg-viewer-toolbar h2 { font-size: 13px; }
    .pg-viewer-toolbar button { padding: 10px 12px; flex-shrink: 0; }
    .pg-viewer-controls { padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
    .pg-viewer-controls p { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
    .pg-event-card, .pg-photo { transition: border-color .15s; }
}
/* Neutralize the old theme's global navigation positioning. */
.gallery-page nav { position: relative; inset: auto; width: auto; height: auto; min-height: 0; margin-left: 0; margin-right: 0; box-shadow: none; }
.gallery-page .pg-site-nav { z-index: 60; }
.gallery-page .pg-site-nav li { display: block; float: none; width: auto; height: auto; text-transform: none; box-shadow: none; text-align: left; }
.gallery-page .pg-pagination, .gallery-page .pg-site-footer nav { background: none; border: 0; }
.gallery-page .pg-menu-toggle { display: none; }
.gallery-page header .site-title { position: static; padding: 0; }
.gallery-page #containerWrap { z-index: 1; }
@media (max-width: 600px) { .gallery-page.pg-js .pg-menu-toggle { display: block; } }
@media (max-width: 600px) {
    .gallery-page header.theme { padding: 25px 0 23px 110px !important; }
    .gallery-page header .site-title h1 { font-size: 30px !important; white-space: normal; line-height: 1.05; }
}
.pg fieldset { min-width: 0; border: 0; padding: 0; }
.pg fieldset:disabled { opacity: .6; }
#upload-progress { margin: 24px 0; max-width: 800px; }
#upload-meter { width: 100%; height: 24px; accent-color: #8fa66d; }
#upload-failures { padding-left: 22px; color: #edb9aa; overflow-wrap: anywhere; }

/* Mobile viewer controls overlay the image instead of taking away image space. */
@media (max-width: 600px), (max-height: 600px) and (pointer: coarse) {
    .pg-viewer-stage { position: absolute; inset: 0; padding: 0; }
    .pg-viewer-stage img { width: 100%; height: 100%; object-fit: contain; }
    .pg-viewer-toolbar, .pg-viewer-controls { position: absolute; left: 0; right: 0; z-index: 2; background: transparent; pointer-events: none; }
    .pg-viewer-toolbar { top: 0; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); }
    .pg-viewer-toolbar h2 { display: none; }
    .pg-viewer-toolbar p { margin: 0; padding: 4px 8px; color: #fff; background: #111a; border-radius: 4px; }
    .pg-viewer-controls { bottom: 0; padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
    .pg-viewer-controls p, .pg-viewer-label { display: none; }
    .pg-viewer button { pointer-events: auto; width: 44px; min-height: 44px; padding: 0; background: #111a; border-color: #ffffff55; border-radius: 50%; font-size: 24px; }
    .pg-viewer-stage p { bottom: max(64px, calc(env(safe-area-inset-bottom) + 54px)); }
}
