/* =============================================================================
   pms-scorm-modal.css — Custom SCORM content modal.
   Replaces jquery.fancybox.css.  No third-party dependencies.
   ============================================================================= */

/* ── Full-page overlay ─────────────────────────────────────────────────────── */

.pms-scorm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba( 0, 0, 0, 0.85 );
}
.pms-scorm-modal[hidden] {
    display: none;
}

/* Prevent page scroll while modal is open */
body.pms-modal-open {
    overflow: hidden;
}

/* ── Dialog window (90 vw × 90 vh) ────────────────────────────────────────── */

.pms-scorm-dialog {
    position: relative;
    width:  90vw;
    height: 90vh;
    background: #11111199;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba( 0, 0, 0, 0.6 );
}

/* ── Loading / spinner ─────────────────────────────────────────────────────── */

.pms-scorm-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #111;
    color: #ccc;
    font-size: 14px;
}
.pms-scorm-loading[hidden] {
    display: none;
}

.pms-scorm-spinner {
    width:  48px;
    height: 48px;
    border: 4px solid rgba( 255, 255, 255, 0.15 );
    border-top-color: #fff;
    border-radius: 50%;
    animation: pms-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes pms-spin {
    to { transform: rotate( 360deg ); }
}

/* ── Iframe ────────────────────────────────────────────────────────────────── */

.pms-scorm-iframe {
    position: absolute;
    inset: 0;
    width:  100%;
    height: 100%;
    border: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.pms-scorm-iframe.is-ready {
    opacity: 1;
}

/* ── Close button ──────────────────────────────────────────────────────────── */
/* Class .is-close is required: scorm_api.Terminate() clicks it programmatically. */

.pms-scorm-close.is-close {
    position: absolute;
    top:   10px;
    right: 10px;
    z-index: 10;
    width:  36px;
    height: 36px;
    padding: 0;
    background: rgba( 0, 0, 0, 0.55 );
    color: #fff;
    border: 1px solid rgba( 255, 255, 255, 0.35 );
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background 0.15s ease;
}
.pms-scorm-close.is-close:hover {
    background: rgba( 180, 0, 0, 0.80 );
    border-color: rgba( 255, 255, 255, 0.5 );
}
