/**
 * Estilos para los botones en el frontend
 * 
 * @package Cebitepal_Cursos_Haif
 * @version 1.0.1
 */

/* Variables CSS */
:root {
    --cebitepal-primary: #3b44ac;
    --cebitepal-primary-hover: #101010;
    --cebitepal-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Estilos base de los botones - TODOS IGUALES */
.cebitepal-btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--cebitepal-font);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
    line-height: 1.5;
    box-sizing: border-box;
    background: var(--cebitepal-primary);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 68, 172, 0.2);
}

/* Hover - TODOS IGUALES */
.cebitepal-btn:hover {
    background: var(--cebitepal-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 16, 16, 0.3);
}

.cebitepal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 68, 172, 0.2);
}

/* Botón deshabilitado (preinscripción) */
.cebitepal-btn.cebitepal-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.cebitepal-btn.cebitepal-btn-disabled:hover {
    background: var(--cebitepal-primary);
    box-shadow: 0 2px 8px rgba(59, 68, 172, 0.2);
    transform: none;
}

/* Clases específicas (para mantener compatibilidad, pero con los mismos estilos) */
.cebitepal-btn-primary,
.cebitepal-btn-becas,
.cebitepal-btn-financiacion {
    background: var(--cebitepal-primary);
    color: #ffffff !important;
}

.cebitepal-btn-primary:hover,
.cebitepal-btn-becas:hover,
.cebitepal-btn-financiacion:hover {
    background: var(--cebitepal-primary-hover);
}

/* Contenedor de botones - Layout Vertical */
.cebitepal-botones-wrapper.vertical {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 400px;
}

.cebitepal-botones-wrapper.vertical .cebitepal-btn {
    width: 100%;
}

/* Contenedor de botones - Layout Horizontal */
.cebitepal-botones-wrapper.horizontal {
    display: flex;
    flex-direction: row;
    gap: 14px;
    flex-wrap: wrap;
}

.cebitepal-botones-wrapper.horizontal .cebitepal-btn {
    flex: 1 1 auto;
    min-width: 180px;
}

/* Contenedor de botones - Layout Compact */
.cebitepal-botones-wrapper.compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}

.cebitepal-botones-wrapper.compact .cebitepal-btn {
    padding: 10px 20px;
    font-size: 14px;
    width: 100%;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .cebitepal-botones-wrapper.horizontal {
        flex-direction: column;
    }
    
    .cebitepal-botones-wrapper.horizontal .cebitepal-btn {
        width: 100%;
        min-width: auto;
    }
    
    .cebitepal-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .cebitepal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .cebitepal-botones-wrapper.vertical,
    .cebitepal-botones-wrapper.compact {
        max-width: 100%;
    }
}

/* Animación de carga */
.cebitepal-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.cebitepal-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Accesibilidad */
.cebitepal-btn:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.cebitepal-btn:focus:not(:focus-visible) {
    outline: none;
}