/* SCORM Package Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0F172A;
    color: #E2E8F0;
    min-height: 100vh;
    overflow-x: hidden;
}

.slide-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    padding-top: 40px;
}

.slide-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.audio-controls {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 600px;
}

audio {
    width: 100%;
    margin-bottom: 10px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0px);
    left: 0;
    right: 0;
    z-index: 50;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.nav-button {
    padding: 12px 24px;
    background: #06B6D4;
    color: #0F172A;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.nav-button:hover:not(:disabled) {
    background: #0891B2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.nav-button:disabled {
    background: #334155;
    color: #64748B;
    cursor: not-allowed;
}

.nav-button.disabled,
.nav-button[aria-disabled="true"] {
    background: #334155;
    color: #64748B;
    cursor: not-allowed;
    pointer-events: none;
}

.slide-info {
    color: #94A3B8;
    font-size: 14px;
    font-weight: 500;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #06B6D4, #0891B2);
    transition: width 0.3s ease;
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(6, 182, 212, 0.2);
    border-top-color: #06B6D4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.slide-number-badge {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #E2E8F0;
}

.transcript-card {
    margin: 30px auto 100px;
    max-width: 1000px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Autoplay toggle */
.autoplay-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: #94A3B8;
}

.autoplay-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #06B6D4;
    cursor: pointer;
}

.autoplay-toggle label {
    cursor: pointer;
}

.transcript-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    cursor: pointer;
}

.transcript-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
    color: #06B6D4;
    margin-bottom: 6px;
}

.transcript-title {
    font-size: 22px;
    margin: 0;
    color: #E2E8F0;
}

.transcript-subtitle {
    margin: 6px 0 0 0;
    color: #94A3B8;
    font-size: 15px;
}

.transcript-details {
    border: none;
}

.transcript-details summary {
    list-style: none;
}

.transcript-details summary::-webkit-details-marker {
    display: none;
}

.transcript-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #06B6D4;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.transcript-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.transcript-details[open] .transcript-toggle-icon {
    transform: rotate(90deg);
}

.transcript-body {
    line-height: 1.6;
    color: #CBD5E1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.transcript-details[open] .transcript-toggle {
    color: #38BDF8;
}

.transcript-body p {
    margin: 0;
}

.transcript-missing {
    color: #94A3B8;
    font-style: italic;
}

/* Commands panel styles */
.commands-card {
    margin: 20px auto 30px;
    max-width: 1000px;
    padding: 24px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.commands-details {
    border: none;
}

.commands-details summary {
    list-style: none;
}

.commands-details summary::-webkit-details-marker {
    display: none;
}

.commands-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    cursor: pointer;
}

.commands-title {
    font-size: 22px;
    margin: 0;
    color: #10B981;
}

.commands-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #10B981;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.commands-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.commands-details[open] .commands-toggle-icon {
    transform: rotate(90deg);
}

.commands-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.command-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 16px;
}

.command-description {
    font-size: 14px;
    color: #94A3B8;
    margin-bottom: 8px;
}

.command-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.command-text {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 14px;
    color: #E2E8F0;
    overflow-x: auto;
    white-space: nowrap;
}

.copy-button {
    padding: 10px 16px;
    background: #10B981;
    color: #0F172A;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-button:hover {
    background: #059669;
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #06B6D4;
}

.floating-mobile-nav {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slide-container {
        padding: 10px;
    }

    .slide-image {
        max-height: calc(100vh - 180px);
    }

    .navigation {
        padding: 15px;
    }

    .nav-button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .audio-controls {
        padding: 15px;
    }

    .transcript-card {
        margin: 20px 12px 0;
        padding: 18px;
    }

    .navigation {
        gap: 10px;
        flex-wrap: wrap;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .floating-mobile-nav {
        display: flex;
        position: fixed;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        justify-content: space-between;
        padding: 0 16px;
        pointer-events: none;
        z-index: 60;
    }

    .floating-mobile-nav .nav-button {
        pointer-events: auto;
        min-width: 48px;
        height: 48px;
        border-radius: 999px;
        padding: 0 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
}

/* Print styles */
@media print {
    .navigation,
    .audio-controls,
    .progress-bar,
    .slide-number-badge {
        display: none;
    }

    body {
        background: white;
    }

    .slide-image {
        max-height: none;
    }
}
