/* Photos of a business's work: the card, the cabinet and the editor's queue (business_gallery.py, 05.10.2026). */
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.gallery-grid a{display:block;aspect-ratio:1;overflow:hidden;border-radius:12px;background:var(--surface-2,#f1f3f5)}
.gallery-grid img{width:100%;height:100%;object-fit:cover;display:block}
.gallery-grid a:focus-visible{outline:2px solid var(--accent,#2f6fed);outline-offset:2px}
.gallery-rest{margin-top:8px}
.gallery-rest summary{cursor:pointer;padding:10px 0;font-weight:600;color:var(--accent,#2f6fed)}
.gallery-rest[open] summary{display:none}
.gallery-upload{display:grid;gap:14px;max-width:560px}
.gallery-upload label{display:grid;gap:6px;font-weight:600}
.gallery-upload label small{font-weight:400;color:var(--muted,#667085)}
.gallery-upload input[type=file],.gallery-upload input[type=text],.gallery-upload select{font:inherit;padding:10px 12px;border:1px solid var(--line,#d0d5dd);border-radius:10px;background:#fff;max-width:100%}
.gallery-upload .gallery-consent{display:flex;gap:10px;align-items:flex-start;font-weight:400}
.gallery-upload .gallery-consent input{margin-top:3px;flex:none;width:18px;height:18px;padding:0}
.gallery-upload .gallery-consent span{flex:1;min-width:0}
.gallery-manage{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.gallery-manage li{display:flex;gap:14px;align-items:flex-start}
.gallery-manage img{width:120px;height:120px;object-fit:cover;border-radius:10px;display:block;background:#f1f3f5}
.gallery-manage-text{display:grid;gap:6px;min-width:0;justify-items:start}
.gallery-manage-text form{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.eui-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 16px}
.eui-tabs a{padding:6px 12px;border:1px solid #d0d5dd;border-radius:999px;text-decoration:none}
.eui-tabs a[aria-current=page]{background:#101828;color:#fff;border-color:#101828}
@media (max-width:560px){.gallery-grid{grid-template-columns:repeat(3,1fr);gap:6px}.gallery-manage img{width:88px;height:88px}}
.gallery-gone{display:grid;place-items:center;min-height:120px;padding:12px;border-radius:12px;background:var(--c-surface-alt,#f2f4f7);color:var(--c-muted,#667085);font-size:.8125rem;text-align:center}
/* albums by service on the card and the viewer of static/gallery.js (owner 06.10.2026) */
/* an album is one folder tile: the cover with the number of photos, the service name, the description */
.gallery-folders{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 18px;align-items:start}
/* three folders first (two on a phone), the rest by rows with «Показати ще» (static/gallery.js) */
.gallery-wait{display:none}
.gallery-rows{margin:18px 0 0}
.gallery-rows[hidden],.gallery-rows-phone{display:none}
.gallery-album{min-width:0}
.gallery-cover{position:relative;display:block;aspect-ratio:4/3;border-radius:14px;overflow:hidden;background:var(--surface-2,#f1f3f5);cursor:zoom-in}
.gallery-cover img{width:100%;height:100%;object-fit:cover;display:block}
.gallery-cover:focus-visible{outline:2px solid var(--accent,#2f6fed);outline-offset:3px}
.gallery-cover-stack{margin:0 8px 8px 0;overflow:visible}
.gallery-cover-stack img{border-radius:14px;position:relative;z-index:1}
.gallery-cover-stack::before,.gallery-cover-stack::after{content:"";position:absolute;inset:0;border-radius:14px;background:var(--c-line,#d9dee5)}
.gallery-cover-stack::before{transform:translate(4px,4px);opacity:.9}
.gallery-cover-stack::after{transform:translate(8px,8px);opacity:.5}
.gallery-cover-count{position:absolute;z-index:2;right:8px;bottom:8px;padding:4px 10px;border-radius:999px;background:rgba(16,24,40,.78);color:#fff;font-size:.8125rem;font-weight:600;line-height:1.3}
.gallery-album h3{margin:10px 0 0;font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
.gallery-date{margin:2px 0 0;font-size:.8125rem;color:var(--c-muted,#667085)}
.gallery-about{margin:4px 0 0;font-size:.875rem;line-height:1.45;color:var(--c-ink-soft,#344054);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
@media (max-width:560px){.gallery-folders{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.gallery-wait-phone{display:none}.gallery-rows-phone:not([hidden]){display:block}}
.gallery-album-form{display:grid;gap:8px;max-width:560px;padding:12px 0;border-top:1px solid var(--line,#e4e7ec)}
.gallery-album-form label{display:grid;gap:6px;font-weight:600}
.gallery-album-form label small{font-weight:400;color:var(--muted,#667085)}
.gallery-album-form textarea{font:inherit;padding:10px 12px;border:1px solid var(--line,#d0d5dd);border-radius:10px;background:#fff;width:100%;box-sizing:border-box;resize:vertical}
.gallery-album-state{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.gallery-texts{list-style:none;margin:0;padding:0;display:grid;gap:16px}
.gallery-texts li{display:grid;gap:6px;padding-top:12px;border-top:1px solid #e4e7ec}
.gallery-texts p{margin:0;max-width:80ch;overflow-wrap:anywhere}
.gallery-texts form{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
html.gallery-open{overflow:hidden}
.gallery-box{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:rgba(10,14,20,.94);color:#fff;overflow:hidden}
.gallery-box:not([open]){display:none}
.gallery-box::backdrop{background:rgba(10,14,20,.94)}
.gallery-box figure{position:absolute;inset:56px 64px 64px;margin:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;justify-items:center;align-items:center;pointer-events:none}
.gallery-box figure img{max-width:100%;max-height:100%;min-height:0;object-fit:contain;border-radius:8px;pointer-events:auto;background:#1d2530}
.gallery-box figcaption{max-width:72ch;text-align:center;font-size:.9375rem;line-height:1.4;pointer-events:auto;overflow-wrap:anywhere}
.gallery-box-count{position:absolute;left:0;right:0;bottom:16px;margin:0;text-align:center;font-size:.8125rem;color:rgba(255,255,255,.75)}
.gallery-box button{position:absolute;z-index:1;width:48px;height:48px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font:inherit;font-size:1.75rem;line-height:1;cursor:pointer;display:grid;place-items:center}
.gallery-box button:hover{background:rgba(255,255,255,.26)}
.gallery-box button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.gallery-box-close{top:8px;right:8px}
.gallery-box-prev{left:8px;top:50%;transform:translateY(-50%)}
.gallery-box-next{right:8px;top:50%;transform:translateY(-50%)}
.gallery-box button[hidden]{display:none}
@media (max-width:560px){
 .gallery-box figure{inset:60px 8px 56px}
 .gallery-box-prev,.gallery-box-next{top:auto;bottom:6px;transform:none;width:44px;height:44px}
}
@media (prefers-reduced-motion:no-preference){.gallery-box[open]{animation:gallery-in .16s ease-out}}
@keyframes gallery-in{from{opacity:0}to{opacity:1}}
/* work photos of one service across the businesses of a town, on a list page (works_pages.py, owner 06.10.2026) */
.works-strip{box-sizing:border-box;margin:32px 28px 8px;padding:24px 28px;border:1px solid var(--line,#e1e7ee);border-radius:var(--r-lg,20px);max-width:780px;background:var(--c-surface,#fff)}
.works-strip h2{margin:0 0 6px}
.works-lead{margin:0 0 14px;font-size:.875rem;color:var(--c-muted,#667085)}
.works-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 12px}
.works-tile{display:grid;gap:4px;min-width:0;text-decoration:none;color:inherit}
.works-tile img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:12px;display:block;background:var(--surface-2,#f1f3f5)}
.works-name{font-size:.875rem;font-weight:600;line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.works-date{font-size:.75rem;color:var(--c-muted,#667085)}
.works-tile:hover .works-name{text-decoration:underline}
.works-tile:focus-visible{outline:2px solid var(--accent,#2f6fed);outline-offset:3px;border-radius:12px}
.directory-layout.map-visible~.works-strip{display:none}
@media(min-width:1700px){.works-strip{margin-left:40px;margin-right:40px}}
@media(max-width:1000px){.works-strip{margin-left:18px;margin-right:18px}}
@media(max-width:700px){.works-strip{margin:28px 16px 8px;padding:18px 16px}.works-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* the page of work photos of a list (templates/works.html) and the links to it */
.works-page{box-sizing:border-box;max-width:1180px;margin:0 auto;padding:0 28px 56px}
.works-page h1{margin:8px 0 6px}
.works-back{margin:0 0 20px;font-size:.9375rem}
.works-back a,.works-all a,.gallery-more a{color:var(--c-primary,#1a66c9);text-decoration:none;font-weight:600}
.works-back a:hover,.works-all a:hover,.gallery-more a:hover{text-decoration:underline}
.works-all{margin:16px 0 0}
.gallery-more{margin:6px 0 0;font-size:.875rem}
.works-grid-page{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px 16px}
.works-figure{margin:0;display:grid;gap:6px;min-width:0}
.works-figure img{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:14px;display:block;background:var(--surface-2,#f1f3f5)}
.works-figure figcaption{display:grid;gap:2px;min-width:0}
.works-figure .works-name{color:inherit;text-decoration:none}
.works-figure .works-name:hover{text-decoration:underline}
.works-caption{font-size:.8125rem;color:var(--c-ink-soft,#344054);overflow-wrap:anywhere}
.works-page .pagination{margin-top:28px}
@media(max-width:700px){.works-page{padding:0 16px 40px}.works-grid-page{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}}
