/**
 * SCORM Player Frontend Styles
 */

/* SCORM Player Container */
.scorm-player-container {
    width: 100%;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* SCORM Player Header */
.scorm-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.scorm-player-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* SCORM Controls */
.scorm-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.scorm-fullscreen-btn {
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.scorm-fullscreen-btn:hover {
    background: #005a87;
}

/* SCORM Iframe */
.scorm-iframe {
    width: 100%;
    border: none;
    display: block;
    background: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .scorm-player-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .scorm-player-header h3 {
        font-size: 16px;
    }
    
    .scorm-fullscreen-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .scorm-iframe {
        min-height: 400px;
    }
}

/* Fullscreen Styles */
.scorm-player-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    margin: 0;
}

.scorm-player-container:-moz-full-screen {
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    margin: 0;
}

.scorm-player-container:fullscreen {
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    margin: 0;
}

.scorm-player-container:fullscreen .scorm-iframe {
    height: calc(100vh - 60px);
}

/* Loading State */
.scorm-player-loading {
    position: relative;
}

.scorm-player-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #0073aa;
    animation: scorm-spin 1s linear infinite;
    z-index: 10;
}

@keyframes scorm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.scorm-player-error {
    padding: 20px;
    text-align: center;
    color: #d63384;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

.scorm-player-error h4 {
    margin-top: 0;
    color: #721c24;
}

/* Progress Indicator */
.scorm-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #f0f0f0;
    z-index: 5;
}

.scorm-progress-bar {
    height: 100%;
    background: #28a745;
    width: 0%;
    transition: width 0.3s ease;
}

/* Accessibility */
.scorm-player-container:focus-within {
    box-shadow: 0 0 0 2px #0073aa;
    outline: none;
}

/* Print Styles */
@media print {
    .scorm-player-container {
        border: none;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .scorm-player-header {
        background: #fff !important;
        border-bottom: 1px solid #000;
    }
    
    .scorm-controls {
        display: none;
    }
}