/* Photo Lightbox global — clicar numa foto abre-a ampliada com zoom/pan.
   Partilhado por todos os módulos (incluído via TEMPLATE_CSS nos head.php).
   Adicionado 2026-07-03. Sem dependências além de jQuery (já carregado). */

.plb-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    background: rgba(0, 0, 0, 0.9);
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    touch-action: none;
}
.plb-overlay.plb-open { display: block; }

.plb-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
}
.plb-stage.plb-dragging { cursor: grabbing; }

.plb-img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: none;
    transform-origin: 0 0;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Botões */
.plb-btn {
    position: absolute;
    z-index: 2;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s ease;
}
.plb-btn:hover { background: rgba(0, 0, 0, 0.75); }

.plb-close {
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 26px;
}
.plb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 72px;
    font-size: 40px;
    border-radius: 6px;
}
.plb-prev { left: 16px; }
.plb-next { right: 16px; }

.plb-zoom {
    bottom: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 24px;
}
.plb-zoom-out { left: 50%; margin-left: -54px; }
.plb-zoom-in  { left: 50%; margin-left: 8px; }

.plb-counter {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 20px;
    color: #fff;
    font: 14px/1.4 "Source Sans Pro", Arial, sans-serif;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 12px;
    border-radius: 4px;
}

/* Esconder setas/contador quando há uma só foto */
.plb-single .plb-nav,
.plb-single .plb-counter { display: none; }

/* Telemóvel: botões um pouco menores */
@media (max-width: 600px) {
    .plb-nav { width: 40px; height: 60px; font-size: 30px; }
    .plb-close { width: 38px; height: 38px; font-size: 22px; }
}
