/* ===== WIZARD SYSTEM CSS ===== */

/* Progress Indicator */
.step-progress-container {
    margin: 20px 0;
    padding: 0 20px;
}

.step-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-dot span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-dot.active span {
    background: #4285f4;
    color: white;
}

.step-dot.completed span {
    background: #34a853;
    color: white;
}

.step-dot label {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 10px;
}

/* Step Title */
.step-title {
    text-align: center;
    color: #4285f4;
    margin: 30px 0;
    font-size: 24px;
    font-weight: bold;
}

/* Step Sections */
.step-section {
    display: none;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.step-section.active {
    display: block;
}

/* Content Styling */
.file-select-content,
.upload-content,
.processing-content,
.ready-content {
    width: 100%;
}

/* ===== STEP 1 BUTTONS ===== */
/* Step 1 Buttons - 3 botones en línea como el diseño original */
.step1-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    max-width: 100%;
}

/* Button styling unificado para Step 1 */
.step1-buttons .button {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s ease;
    
    /* Estilos unificados - default para todos los botones habilitados */
    padding: 10px 16px;
    background-color: #3367d6;
    color: white;
    border: 1px solid #3367d6;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
}

/* Hover unificado para Step 1 */
.step1-buttons .button:hover:not(:disabled) {
    background-color:#1E4DB3;
    border: 1px solid #1E4DB3;
}

/* Botones deshabilitados Step 1 */
.step1-buttons .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border: 1px solid var(--border-disabled);
    background-color: var(--url-background);
    color: var(--text-color);
}

/* ===== STEP 2 BUTTONS ===== */
/* Step 2 Buttons - 3 botones en línea (igual que Step 1) */
.step2-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    max-width: 100%;
}

/* Button styling unificado para Step 2 */
.step2-buttons .button {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s ease;
    
    /* Estilos unificados - default para todos los botones habilitados */
    padding: 10px 16px;
    background-color: #3367d6;
    color: white;
    border: 1px solid #3367d6;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
}

/* Hover unificado para Step 2 */
.step2-buttons .button:hover:not(:disabled) {
    background-color: #1E4DB3;
    border: 1px solid #1E4DB3;
}

/* Botones deshabilitados Step 2 */
.step2-buttons .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--url-background);
    border: 1px solid var(--border-disabled);
    color: var(--text-color);
}

/* ===== STEP 3 BUTTONS ===== */
/* Step 3 Buttons - 3 botones en línea (igual que Step 1 y Step 2) */
.step3-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    max-width: 100%;
}

/* Button styling unificado para Step 3 */
.step3-buttons .button {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s ease;
    
    /* Estilos unificados - default para todos los botones habilitados */
    padding: 10px 16px;
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
}

/* Hover unificado para Step 3 */
.step3-buttons .button:hover:not(:disabled) {
    background-color: #3367d6;
    border: 1px solid #3367d6;
}

/* Botones deshabilitados Step 3 */
.step3-buttons .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--url-background);
    border: 1px solid var(--border-disabled);
    color: var(--text-color);
}

/* ===== STEP 4: READY TO USE STYLES ===== */

/* Step 4 Buttons - 3 botones en línea como especificado */
.step4-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
    max-width: 100%;
}

/* Button styling unificado para Step 4 - todos azules */
.step4-buttons .button {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.3s ease;
    
    /* Estilos unificados - todos azules como especificado */
    padding: 10px 16px;
    background-color: #3367d6;
    color: white;
    border: 1px solid #3367d6;
    cursor: pointer;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background-color 0.2s;
}

/* Hover unificado para Step 4 */
.step4-buttons .button:hover:not(:disabled) {
    background-color: #1E4DB3;
    border: 1px solid #1E4DB3;
}

/* Botones deshabilitados Step 4 */
.step4-buttons .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--url-background);
    border: 1px solid var(--border-disabled);
    color: var(--text-color);
}

/* ===== STEP 4 PLAYER AREA (OCULTA POR DEFECTO) ===== */

.step4-player-area {
    background: rgba(66, 133, 244, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

/* Header del Player Area */
.player-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Live Indicator Container (izquierda) */
.live-indicator-container {
    display: flex;
    align-items: center;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: rgba(234, 67, 53, 0.1);
    border: 1px solid rgba(234, 67, 53, 0.3);
    border-radius: 25px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: #ea4335;
    border-radius: 50%;
    animation: pulse-live-dot 1.5s infinite;
}

@keyframes pulse-live-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.live-text {
    color: #ea4335;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Player Controls Header (derecha) */
.player-controls-header {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.player-control-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    min-width: fit-content;
    min-height: 32px;
}

.btn-icon {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Player button variants - usando colores del styles.css original */
.btn-preview {
    background-color: #007bff;
}

.btn-preview:hover {
    opacity: 0.8;
}

.btn-start-live {
    background-color: #dc3545;
}

.btn-start-live:hover {
    opacity: 0.8;
}

.btn-stop {
    background-color: #dc3545;
}

.btn-stop:hover {
    opacity: 0.8;
}

/* Video Container */
.step4-video-container {
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #000;
}

.step4-video-player {
    width: 100%;
    height: auto;
    min-height: 300px;
    max-height: 500px;
    display: block;
    object-fit: contain;
}

/* Player Area Footer */
.player-area-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* Session Stats para Step 4 */
.session-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.session-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-color);
}

.stat-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}



/* ===== STEP 3 PROCESSING PROGRESS ===== */
.processing-progress-container {
    background: rgba(52, 168, 83, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.processing-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.processing-progress-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-color);
}

.processing-progress-percentage {
    font-weight: bold;
    font-size: 16px;
    color: #34a853;
}

.processing-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.processing-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #34a853, #4285f4);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.processing-progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

/* ===== STEP 2 UPLOAD PROGRESS ===== */
.upload-progress-container {
    background: rgba(66, 133, 244, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.upload-progress-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-color);
}

.upload-progress-percentage {
    font-weight: bold;
    font-size: 16px;
    color: #4285f4;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4285f4, #34a853);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

/* Reutilizar estilos existentes de styles.css para consistencia */
.wizard-container .info-container,
.wizard-container .file-info,
.wizard-container .file-info-header,
.wizard-container .file-info-content,
.wizard-container .file-info-details,
.wizard-container .status-text,
.wizard-container .status-header,
.wizard-container .drop-area,
.wizard-container .separator {
    /* Heredar estilos del CSS original */
}

/* Asegurar que el drop area original funcione */
.wizard-container .drop-area {
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .step-progress {
        flex-direction: column;
        gap: 20px;
    }
    
    .step-line {
        width: 2px;
        height: 30px;
        margin: 0;
    }
    
    .step1-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .step2-buttons,
    .step3-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .step4-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Step 4 Player Area responsive */
    .player-area-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .live-indicator-container {
        justify-content: center;
    }
    
    .player-controls-header {
        justify-content: center;
        width: 100%;
    }
    
    .step4-video-player {
        min-height: 200px;
    }
    
    .step1-buttons .button,
    .step2-buttons .button,
    .step3-buttons .button,
    .step4-buttons .button {
        min-height: 50px;
        font-size: 13px;
    }
    
    .player-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-controls-inline {
        width: 100%;
        justify-content: center;
    }
    
    .session-info-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .session-stats {
        gap: 15px;
    }
    
    .hls-video {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .player-controls-inline {
        flex-direction: column;
        width: 100%;
    }
    
    .player-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Step 4 Player Area para móviles */
    .player-controls-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .player-control-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
    }
    
    .live-indicator {
        justify-content: center;
        width: 100%;
    }
    
    .session-stats {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Animation for step transitions */
.step-section {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.step-section.active {
    opacity: 1;
    transform: translateX(0);
}

/* Wizard Container */
.wizard-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Hide legacy UI when wizard is active */
.legacy-ui {
    display: none !important;
}
