/* ══════════════════════════════════════════
   Portfolio PDF Popup – popup.css
   ══════════════════════════════════════════ */

/* ── Overlay – HIDDEN by default ─────────── */
#ppp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Only shows when JS adds .ppp-open */
#ppp-overlay.ppp-open {
    display: flex !important;
    animation: pppFadeIn 0.2s ease;
}

@keyframes pppFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal box ───────────────────────────── */
#ppp-modal {
    background: #eeeeee;
    border-radius: 6px;
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.55);
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pppSlideUp 0.25s ease;
}

@keyframes pppSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Header ──────────────────────────────── */
#ppp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #1a1a1a;
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
    border-bottom: 3px solid #f5c842;
}

#ppp-modal-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 55px);
}

#ppp-close {
    background: #f5c842;
    border: none;
    color: #1a1a1a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
#ppp-close:hover {
    background: #ffd84d;
    transform: rotate(90deg);
}

/* ── Body ────────────────────────────────── */
#ppp-modal-body {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #eeeeee;
}

/* ── Loading spinner ─────────────────────── */
#ppp-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #eeeeee;
}
#ppp-loading p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ppp-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #d0d0d0;
    border-top-color: #f5c842;
    border-radius: 50%;
    animation: pppSpin 0.7s linear infinite;
}
@keyframes pppSpin { to { transform: rotate(360deg); } }

/* ── iframe ──────────────────────────────── */
#ppp-iframe {
    width: 100%;
    height: 78vh;
    border: none;
    display: none;
    background: #eeeeee;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 600px) {
    #ppp-overlay { padding: 8px; }
    #ppp-modal   { border-radius: 10px; max-height: 96vh; }
    #ppp-iframe  { height: 72vh; }
    #ppp-modal-header { padding: 12px 16px; }
    #ppp-modal-title  { font-size: 14px; }
}
