/* Photo popups on product forms (companion to includes/class-tlb-bls-photo-gallery.php). */
.tlb-pg-btn{display:inline-flex;align-items:center;gap:5px;margin-left:10px;padding:2px 9px 3px;border:1px solid #333D84;border-radius:14px;background:#fff;color:#333D84;font-size:.78em;font-weight:600;line-height:1.5;cursor:pointer;vertical-align:middle;text-transform:none;letter-spacing:0}
.tlb-pg-btn:hover,.tlb-pg-btn:focus{background:#333D84;color:#fff;outline:none}
.tlb-pg-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
legend .tlb-pg-btn,label .tlb-pg-btn{margin-top:-2px}

.tlb-pg-overlay{position:fixed;inset:0;z-index:100000;overflow:hidden;box-sizing:border-box;background:rgba(20,22,30,.94);display:flex;flex-direction:column;color:#fff;font-family:inherit;-webkit-tap-highlight-color:transparent}
.tlb-pg-overlay[hidden]{display:none}
.tlb-pg-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px}
.tlb-pg-title{min-width:0;flex:1 1 auto;font-size:1.05em;font-weight:700;color:#fff;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tlb-pg-close{flex:none;display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border:2px solid #fff;border-radius:24px;background:#fff;color:#1a1d2b;font-size:1em;font-weight:700;cursor:pointer}
.tlb-pg-close:hover,.tlb-pg-close:focus{background:#ffd23f;border-color:#ffd23f;outline:none}
.tlb-pg-close svg{width:18px;height:18px;stroke:currentColor;stroke-width:3;fill:none;stroke-linecap:round}
.tlb-pg-stage{position:relative;flex:1;min-height:0;min-width:0;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0 56px}
.tlb-pg-stage img{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;background:transparent;box-shadow:none;border-radius:0}
.tlb-pg-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:64px;border:0;border-radius:8px;background:rgba(255,255,255,.14);color:#fff;font-size:34px;line-height:1;cursor:pointer}
.tlb-pg-nav:hover,.tlb-pg-nav:focus{background:rgba(255,255,255,.3);outline:none}
.tlb-pg-prev{left:8px}.tlb-pg-next{right:8px}
.tlb-pg-nav[disabled]{opacity:.25;cursor:default}
.tlb-pg-bottom{padding:10px 16px 14px;text-align:center}
.tlb-pg-caption{font-size:1em;margin:0 0 8px;color:#fff}
.tlb-pg-count{color:#aab;font-size:.85em;margin-left:8px}
.tlb-pg-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.tlb-pg-choose{padding:9px 18px;border:0;border-radius:22px;background:#2e9d5b;color:#fff;font-weight:700;font-size:.95em;cursor:pointer}
.tlb-pg-choose:hover,.tlb-pg-choose:focus{background:#25834b;outline:none}
.tlb-pg-back{padding:9px 18px;border:2px solid #fff;border-radius:22px;background:transparent;color:#fff;font-weight:700;font-size:.95em;cursor:pointer}
.tlb-pg-back:hover,.tlb-pg-back:focus{background:#fff;color:#1a1d2b;outline:none}
.tlb-pg-thumbs{display:flex;gap:6px;overflow-x:auto;padding:8px 16px 4px;justify-content:center;scrollbar-width:thin}
.tlb-pg-thumbs img{width:56px;height:56px;object-fit:cover;border-radius:4px;border:2px solid transparent;cursor:pointer;opacity:.75;flex:none}
.tlb-pg-thumbs img.on{border-color:#ffd23f;opacity:1}
.tlb-pg-loading{position:absolute;color:#ccd;font-size:.9em}
body.tlb-pg-open{overflow:hidden}
@media (max-width:640px){.tlb-pg-stage{padding:0 4px}.tlb-pg-nav{width:36px;height:56px;font-size:28px;background:rgba(0,0,0,.35)}.tlb-pg-close{padding:9px 14px}.tlb-pg-thumbs{justify-content:flex-start}}
