/* Peptira Product Controller — Lightbox v1.2.7 */

#pps-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

#pps-lightbox.pps-lb-open {
    display: block;
}

#pps-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#pps-lb-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 860px);
    height: min(90vh, 1100px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0,0,0,0.45);
    animation: ppsPopIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ppsPopIn {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.94); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Header bar */
#pps-lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    gap: 12px;
}

#pps-lb-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

#pps-lb-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#pps-lb-download {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

#pps-lb-download:hover { background: #e5e7eb; }

#pps-lb-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #072ed2;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

#pps-lb-close:hover { background: #051fa8; transform: scale(1.08); }

/* PDF embed area */
#pps-lb-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#pps-lb-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading spinner */
#pps-lb-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 14px;
}

.pps-lb-spin {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #072ed2;
    border-radius: 50%;
    animation: ppsSpin 0.7s linear infinite;
}

@keyframes ppsSpin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 600px) {
    #pps-lb-popup {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
        animation: ppsSlideUp 0.25s ease;
    }
    @keyframes ppsSlideUp {
        from { opacity: 0; transform: translateY(30px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    #pps-lb-download span { display: none; }
}
