/**
 * ELM New Tab Styles
 * Provides new tab functionality for Storyline 360 content
 */

.elm-launch-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: none;
    letter-spacing: 0.5px;
}

.elm-launch-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.elm-launch-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* New Tab Page Styles (for when content opens in new tab) */
.elm-newtab-page {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.elm-newtab-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    position: relative;
}

.elm-newtab-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.elm-newtab-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.elm-newtab-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.elm-newtab-content {
    width: 100%;
    height: calc(100vh - 60px); /* Account for header */
    position: relative;
    background: white;
}

.elm-newtab-iframe {
    border: none;
    width: 100%;
    height: 100%;
    display: block;
}

/* Loading State */
.elm-newtab-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10001;
}

.elm-newtab-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: elm-spin 1s linear infinite;
    margin: 0 auto 15px;
}

.elm-newtab-loading-text {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

@keyframes elm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Launch Button */
@media (max-width: 480px) {
    .elm-launch-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Fullscreen Mode Styles */
.elm-newtab-fullscreen .elm-newtab-header {
    display: none;
}

.elm-newtab-fullscreen .elm-newtab-content {
    height: 100vh;
}

/* Print Styles */
@media print {
    .elm-newtab-header,
    .elm-newtab-close {
        display: none;
    }
    
    .elm-newtab-content {
        height: 100vh;
    }
}
