.scorm-player-container {
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    min-height: 700px;
    position: relative;
}

.scorm-player-outer-container {
    width: 100%;
}

/* Default container for SCORM content */
.scorm-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 700px;
    border: 0;
}

/* Fix for some mobile layouts */
@media (max-width: 768px) {
    .scorm-player-container {
        min-height: 500px;
    }
    
    .scorm-player-container iframe {
        min-height: 500px;
    }
}

/* Completion overlay shown when a package reports a terminal status. */
.scorm-completion-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: scorm-co-fade 0.2s ease-out;
}

.scorm-completion-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: scorm-co-pop 0.25s ease-out;
}

.scorm-completion-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}

.scorm-completion-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.scorm-completion-desc {
    margin: 0 0 24px;
    font-size: 15px;
    color: #475569;
    line-height: 1.5;
}

.scorm-completion-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.scorm-completion-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    line-height: 1.2;
}

.scorm-completion-btn-primary {
    background: #2563eb;
    color: #fff;
}

.scorm-completion-btn-primary:hover {
    background: #1d4ed8;
}

.scorm-completion-btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
}

.scorm-completion-btn-secondary:hover {
    background: #cbd5e1;
}

@keyframes scorm-co-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scorm-co-pop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Dark Theming profiles (TSK-20552) ──
 * `body.mklms-dark-profile` is added by mklms_add_theme_body_classes() when the
 * resolved --scorm-background-color is dark. Light profiles keep the literal
 * colors above untouched. `:where()` keeps specificity equal to the base rule. */
:where(body.mklms-dark-profile) .scorm-completion-modal { background: var(--scorm-surface-color, #fff); }
:where(body.mklms-dark-profile) .scorm-completion-title { color: var(--scorm-heading-color, #0f172a); }
:where(body.mklms-dark-profile) .scorm-completion-desc { color: var(--scorm-muted-text-color, #475569); }
:where(body.mklms-dark-profile) .scorm-completion-btn-secondary {
    background: var(--scorm-surface-muted-color, #e2e8f0);
    color: var(--scorm-heading-color, #1e293b);
}
:where(body.mklms-dark-profile) .scorm-completion-btn-secondary:hover {
    background: color-mix(in srgb, var(--scorm-muted-text-color, #64748b) 18%, var(--scorm-surface-color, #fff));
}
