/**
 * Cube 3D Viewer - Estilos para WordPress
 */

.cube-instance {
    max-width: 400px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cube-instance canvas {
    width: 100%;
    aspect-ratio: 1;
    cursor: grab;
    border-radius: 8px;
    outline: none;
    display: block;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cube-instance canvas:active {
    cursor: grabbing;
}

.cube-instance canvas:focus {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Contenedor con controles opcionales */
.cube-instance.with-controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.cube-instance.with-controls canvas {
    border-radius: 8px 8px 0 0;
}

.cube-instance .cube-controls {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e9ecef;
    border-top: none;
    font-size: 12px;
    color: #495057;
    text-align: center;
}

.cube-instance .cube-controls strong {
    color: #212529;
}

/* ==================== Transform 2D Simulator ==================== */

.transform-instance {
    max-width: 400px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.transform-simulator {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.transform-canvas-wrapper {
    background: #f8f9fa;
    padding: 20px;
}

.transform-canvas {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.transform-controls {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #e9ecef;
}

.transform-btn {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: background 0.2s, opacity 0.2s;
    font-weight: 500;
}

.transform-prev {
    background: #6c757d;
    color: white;
}

.transform-prev:hover:not(:disabled) {
    background: #5a6268;
}

.transform-next {
    background: #01917c;
    color: white;
}

.transform-next:hover:not(:disabled) {
    background: #017a68;
}

.transform-btn:disabled {
    cursor: not-allowed;
}

.transform-step-info {
    text-align: center;
    flex: 1;
}

.transform-step-number {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.transform-step-symbol {
    font-size: 28px;
    margin: 5px 0;
    line-height: 1;
}

.transform-step-name {
    color: #6c757d;
    font-size: 12px;
}

.transform-progress {
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #e9ecef;
}

.transform-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
}

.transform-dot:hover {
    transform: scale(1.2);
}

.transform-dot.current {
    background: #01917c;
    transform: scale(1.3);
}

.transform-dot.completed {
    background: #01917c;
    opacity: 0.5;
}

/* ==================== Steps Viewer - Simulador (Rejilla 2D) ==================== */

.steps-instance {
    max-width: 450px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.steps-simulator {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.steps-canvas-wrapper {
    background: #f8f9fa;
    padding: 20px;
}

.steps-main-canvas {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

.steps-controls {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #e9ecef;
}

.steps-btn {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: background 0.2s, opacity 0.2s;
    font-weight: 500;
    background: #01917c;
    color: white;
}

.steps-btn:hover:not(:disabled) {
    background: #017a68;
}

.steps-btn:disabled {
    cursor: not-allowed;
}

.steps-prev {
    background: #6c757d;
}

.steps-prev:hover:not(:disabled) {
    background: #5a6268;
}

.steps-step-info {
    text-align: center;
    flex: 1;
}

.steps-step-number {
    font-weight: bold;
    color: #495057;
    font-size: 14px;
}

.steps-step-desc {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

.steps-progress {
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #e9ecef;
}

.steps-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
}

.steps-dot:hover {
    transform: scale(1.2);
}

.steps-dot.current {
    background: #01917c;
    transform: scale(1.3);
}

.steps-dot.completed {
    background: #01917c;
    opacity: 0.5;
}

.steps-legend {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.steps-legend-title {
    font-weight: bold;
    color: #495057;
    font-size: 13px;
    margin-bottom: 10px;
}

.steps-legend-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.steps-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
}

.steps-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
}

.steps-legend-text {
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 768px) {
    .steps-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .steps-step-number {
        font-size: 12px;
    }
    
    .steps-step-desc {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .cube-instance,
    .transform-instance,
    .steps-instance {
        max-width: 100%;
        margin: 10px;
    }
    
    .cube-instance canvas {
        border-radius: 4px;
    }
    
    .transform-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .transform-step-symbol {
        font-size: 22px;
    }
    
    .steps-canvas {
        width: 80px;
        height: 80px;
    }
    
    .steps-question-mark {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    .steps-option .steps-canvas {
        width: 70px;
        height: 70px;
    }
    
    .steps-viewer-container {
        padding: 10px;
    }
}
