/* ============================================================
   SOEP CV — PDF Popup Viewer
   ============================================================ */

/* ── Trigger button style ── */
.soep-cv__ref-link.soep-pdf-trigger {
    display:         inline-flex;
    align-items:     center;
    gap:             5px;
    background:      none;
    border:          none;
    padding:         0;
    cursor:          pointer;
    color:           var(--cv-text, #C8C8C8);
    font:            inherit;
    font-size:       inherit;
    text-align:      left;
    border-bottom:   1px dashed var(--cv-accent, #DC2626);
    transition:      color 0.2s, border-color 0.2s;
    line-height:     inherit;
}

.soep-cv__ref-link.soep-pdf-trigger:hover {
    color:           var(--cv-accent, #DC2626);
    border-bottom-color: transparent;
}

.soep-cv__ref-link.soep-pdf-trigger svg {
    opacity:         0.5;
    flex-shrink:     0;
    transition:      opacity 0.2s;
}

.soep-cv__ref-link.soep-pdf-trigger:hover svg {
    opacity:         1;
}

/* ── Modal overlay + container ── */
.soep-pdf-modal {
    position:        fixed;
    inset:           0;
    z-index:         999999;
    display:         none;
    align-items:     center;
    justify-content: center;
    padding:         16px;
}

.soep-pdf-modal__overlay {
    position:        absolute;
    inset:           0;
    background:      rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity:         0;
    transition:      opacity 0.28s ease;
}

.soep-pdf-modal--open .soep-pdf-modal__overlay {
    opacity:         1;
}

.soep-pdf-modal__container {
    position:        relative;
    z-index:         1;
    display:         flex;
    flex-direction:  column;
    width:           100%;
    max-width:       960px;
    height:          90vh;
    background:      #111111;
    border:          1px solid rgba(255,255,255,0.1);
    border-radius:   12px;
    overflow:        hidden;
    box-shadow:      0 24px 80px rgba(0,0,0,0.8);
    transform:       translateY(24px) scale(0.98);
    opacity:         0;
    transition:      transform 0.28s cubic-bezier(0.16,1,0.3,1),
                     opacity   0.28s ease;
}

.soep-pdf-modal--open .soep-pdf-modal__container {
    transform:       translateY(0) scale(1);
    opacity:         1;
}

/* ── Header bar ── */
.soep-pdf-modal__header {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             16px;
    padding:         14px 20px;
    background:      #1A1A1A;
    border-bottom:   1px solid rgba(255,255,255,0.08);
    flex-shrink:     0;
}

.soep-pdf-modal__title {
    font-family:     var(--font-heading, 'Syne', sans-serif);
    font-size:       0.9rem;
    font-weight:     700;
    color:           #ffffff;
    letter-spacing:  0.02em;
    white-space:     nowrap;
    overflow:        hidden;
    text-overflow:   ellipsis;
    flex:            1;
}

.soep-pdf-modal__actions {
    display:         flex;
    align-items:     center;
    gap:             8px;
    flex-shrink:     0;
}

.soep-pdf-modal__btn {
    display:         inline-flex;
    align-items:     center;
    gap:             6px;
    font-family:     var(--font-body, 'Plus Jakarta Sans', sans-serif);
    font-size:       0.8rem;
    font-weight:     600;
    padding:         7px 14px;
    border-radius:   6px;
    cursor:          pointer;
    transition:      all 0.2s ease;
    text-decoration: none;
    border:          none;
    white-space:     nowrap;
}

.soep-pdf-modal__btn--download {
    background:      #DC2626;
    color:           #ffffff !important;
}

.soep-pdf-modal__btn--download:hover {
    background:      #EF4444;
    transform:       translateY(-1px);
    color:           #ffffff !important;
}

.soep-pdf-modal__btn--close {
    background:      rgba(255,255,255,0.08);
    color:           #C8C8C8;
}

.soep-pdf-modal__btn--close:hover {
    background:      rgba(255,255,255,0.15);
    color:           #ffffff;
}

/* ── iframe body ── */
.soep-pdf-modal__body {
    flex:            1;
    overflow:        hidden;
    background:      #1A1A1A;
    position:        relative;
}

.soep-pdf-modal__body::before {
    content:         'Memuat dokumen...';
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    color:           #666;
    font-size:       0.85rem;
    font-family:     var(--font-body, sans-serif);
    z-index:         0;
}

#soep-pdf-iframe {
    width:           100%;
    height:          100%;
    border:          none;
    position:        relative;
    z-index:         1;
    background:      transparent;
}

/* ── Responsive mobile ── */
@media (max-width: 600px) {
    .soep-pdf-modal {
        padding:     8px;
    }
    .soep-pdf-modal__container {
        height:      95vh;
        border-radius: 8px;
    }
    .soep-pdf-modal__header {
        padding:     10px 14px;
    }
    .soep-pdf-modal__title {
        font-size:   0.8rem;
    }
    .soep-pdf-modal__btn span,
    .soep-pdf-modal__btn--download span {
        display:     none;
    }
    .soep-pdf-modal__btn {
        padding:     7px 10px;
    }
}

/* ── Print: sembunyikan modal ── */
@media print {
    .soep-pdf-modal { display: none !important; }
}
