/* ===========================================================================
   OHUB PDF Viewer — Lightbox Modal wrapping Adobe PDF Embed
   =========================================================================== */

.ohub-pdf-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2vh 2vw;
    backdrop-filter: blur(6px);
    animation: ohub-pdf-fade 0.15s ease;
}
.ohub-pdf-lightbox[hidden] { display: none !important; }

@keyframes ohub-pdf-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ohub-pdf-box {
    background: #fff;
    width: min(96vw, 1400px);
    height: 96vh;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ohub-pdf-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary-color, #194D85) 0%, #0F172A 100%);
    color: #fff;
    flex-shrink: 0;
}

.ohub-pdf-title {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ohub-pdf-icon { font-size: 1.2rem; line-height: 1; }

.ohub-pdf-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.ohub-pdf-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.1s;
}
.ohub-pdf-btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.ohub-pdf-btn.close { background: transparent; font-size: 1.3rem; padding: 0.2rem 0.55rem; line-height: 1; }

.ohub-pdf-body {
    flex: 1;
    background: #444;
    position: relative;
    overflow: hidden;
}

.ohub-pdf-viewer,
.ohub-pdf-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ohub-pdf-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #e2e8f0;
    background: #444;
    z-index: 2;
}
.ohub-pdf-loading .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ohub-pdf-spin 0.9s linear infinite;
}
@keyframes ohub-pdf-spin { to { transform: rotate(360deg); } }

.ohub-pdf-error {
    color: #fecaca;
    text-align: center;
    padding: 1rem;
}

/* Trigger badge used on PDF links/buttons */
.ohub-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

/* Mobile */
@media (max-width: 640px) {
    .ohub-pdf-lightbox { padding: 0; }
    .ohub-pdf-box { width: 100vw; height: 100vh; border-radius: 0; }
    .ohub-pdf-title { font-size: 0.85rem; }
    .ohub-pdf-btn { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
    .ohub-pdf-btn .label { display: none; }
}
