/**
 * Estilos para Botones Reutilizables - Sumar Inversión
 * 
 * Este archivo contiene todos los estilos CSS para los botones
 * personalizados utilizados en el sitio web.
 * 
 * @author Sumar Inversión
 * @version 1.0
 */

/* ============= ESTILOS BASE DE BOTONES ============= */

.btn-cod-custom {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    font-family: 'Helvetica Now Display', sans-serif;
    line-height: 1.2;
    min-height: 50px;
    justify-content: center;
    background: transparent;
    padding-left: 10px !important;
}

.btn-cod-custom:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-cod-custom:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.btn-cod-custom:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 104, 216, 0.3);
}

.btn-cod-custom:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============= CONTENEDOR DE FLECHA ============= */

.arrow-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #CCCBEB;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.arrow-btn-container img {
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

/* Variantes del contenedor de flecha */
.arrow-btn-container--white {
    background-color: rgba(255, 255, 255, 0.2);
    /* border: 1px solid rgba(255, 255, 255, 0.3); */
}

.arrow-btn-container--purple {
    background-color: rgba(85, 45, 154, 0.1);
    /* border: 1px solid rgba(85, 45, 154, 0.2); */
}

.arrow-btn-container--dark {
    background-color: rgba(0, 0, 0, 0.1);
    /* border: 1px solid rgba(0, 0, 0, 0.2); */
}

/* ============= TAMAÑOS DE BOTONES ============= */

.btn-cod-custom.btn-small {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
    border-radius: 10px;
}

.btn-cod-custom.btn-small .arrow-btn-container {
    width: 28px;
    height: 28px;
}

.btn-cod-custom.btn-small .arrow-btn-container img {
    width: 10px;
    height: 10px;
}

.btn-cod-custom.btn-large {
    padding: 20px 32px;
    font-size: 18px;
    min-height: 68px;
    border-radius: 16px;
}

.btn-cod-custom.btn-large .arrow-btn-container {
    width: 40px;
    height: 40px;
}

.btn-cod-custom.btn-large .arrow-btn-container img {
    width: 16px;
    height: 16px;
}

/* ============= EFECTOS ESPECIALES ============= */

/* Efecto Blur */
.btn-cod-custom.blur-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(126, 125, 156, 0.1) !important;
    border: 1px solid rgba(249, 249, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.btn-cod-custom.blur-effect:hover {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    background: rgba(126, 125, 156, 0.2) !important;
    border: 1px solid rgba(249, 249, 255, 0.3) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn-cod-custom.blur-effect .arrow-btn-container {
    background: rgba(204, 203, 235, 0.2) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cod-custom.blur-effect:hover .arrow-btn-container {
    background: rgba(204, 203, 235, 0.3) !important;
}

/* Efecto Gradient */
.btn-cod-custom.gradient-effect {
    background: linear-gradient(135deg, #4168D8 0%, #552D9A 100%);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-cod-custom.gradient-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-cod-custom.gradient-effect:hover::before {
    left: 100%;
}

/* Efecto Pulse */
.btn-cod-custom.pulse-effect {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(65, 104, 216, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(65, 104, 216, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(65, 104, 216, 0);
    }
}

/* ============= VARIANTES DE ESTADO ============= */

.btn-cod-custom.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.btn-cod-custom.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-cod-custom.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-cod-custom.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-cod-custom.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
}

.btn-cod-custom.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-cod-custom.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #ffffff;
}

.btn-cod-custom.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

/* ============= RESPONSIVE DESIGN ============= */

@media (max-width: 768px) {
    .btn-cod-custom {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 50px;
        border-radius: 10px;
    }
    
    .btn-cod-custom .arrow-btn-container {
        width: 28px;
        height: 28px;
    }
    
    .btn-cod-custom .arrow-btn-container img {
        width: 11px;
        height: 11px;
    }
    
    .btn-cod-custom.btn-large {
        padding: 16px 24px;
        font-size: 16px;
        min-height: 58px;
    }
    
    .btn-cod-custom.btn-large .arrow-btn-container {
        width: 36px;
        height: 36px;
    }
    
    .btn-cod-custom.btn-large .arrow-btn-container img {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    .btn-cod-custom {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 8px;
        gap: 8px;
    }
    
    .btn-cod-custom .arrow-btn-container {
        width: 24px;
        height: 24px;
    }
    
    .btn-cod-custom .arrow-btn-container img {
        width: 10px;
        height: 10px;
    }
    
    .btn-cod-custom.btn-large {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .btn-cod-custom.btn-large .arrow-btn-container {
        width: 32px;
        height: 32px;
    }
    
    .btn-cod-custom.btn-large .arrow-btn-container img {
        width: 12px;
        height: 12px;
    }
}

/* ============= UTILIDADES ============= */

.btn-cod-custom.btn-full-width {
    width: 100%;
    justify-content: center;
}

.btn-cod-custom.btn-center {
    margin: 0 auto;
    display: flex;
}

.btn-cod-custom.btn-left {
    justify-content: flex-start;
}

.btn-cod-custom.btn-right {
    justify-content: flex-end;
    margin-left: auto;
}

.btn-cod-custom.no-arrow .arrow-btn-container {
    display: none;
}

.btn-cod-custom.icon-only {
    padding: 16px;
    border-radius: 50%;
    min-height: 56px;
    width: 56px;
    justify-content: center;
}

.btn-cod-custom.icon-only .arrow-btn-container {
    display: none;
}

.btn-cod-custom.icon-only span {
    display: none;
}

/* ============= ANIMACIONES ============= */

@keyframes buttonSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-cod-custom.animate-in {
    animation: buttonSlideIn 0.5s ease-out;
}

@keyframes buttonBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.btn-cod-custom.animate-bounce {
    animation: buttonBounce 1s ease-in-out;
}

/* ============= ACCESIBILIDAD ============= */

@media (prefers-reduced-motion: reduce) {
    .btn-cod-custom,
    .btn-cod-custom:hover,
    .btn-cod-custom:active,
    .btn-cod-custom .arrow-btn-container,
    .btn-cod-custom .arrow-btn-container img {
        transition: none;
        animation: none;
    }
    
    .btn-cod-custom.pulse-effect {
        animation: none;
    }
    
    .btn-cod-custom.animate-in,
    .btn-cod-custom.animate-bounce {
        animation: none;
    }
}

/* Mejoras para lectores de pantalla */
.btn-cod-custom:focus-visible {
    outline: 2px solid #4168D8;
    outline-offset: 2px;
}

/* ============= COMPATIBILIDAD CON BOOTSTRAP ============= */

/* Asegurar que los botones personalizados no interfieran con Bootstrap */
.btn-cod-custom.btn {
    border-radius: 12px;
}

/* Resetear estilos de Bootstrap que puedan interferir */
.btn-cod-custom.btn-primary,
.btn-cod-custom.btn-secondary,
.btn-cod-custom.btn-success,
.btn-cod-custom.btn-warning,
.btn-cod-custom.btn-danger,
.btn-cod-custom.btn-info {
    background-color: transparent;
    border: 1px solid;
}

/* ============= ESTILOS ESPECÍFICOS PARA CONTEXTOS ============= */

/* Botones en hero sections */
.hero-section .btn-cod-custom {
    font-size: 18px;
    padding: 18px 28px;
    min-height: 60px;
}

/* Botones en cards */
.card .btn-cod-custom {
    width: 100%;
    justify-content: center;
}

/* Botones en modales */
.modal .btn-cod-custom {
    min-width: 140px;
}

/* Botones en formularios */
.form-section .btn-cod-custom {
    margin-top: 20px;
}

/* ============= TEMAS OSCUROS ============= */

@media (prefers-color-scheme: dark) {
    .btn-cod-custom {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .btn-cod-custom:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}

/* ============= IMPRESIÓN ============= */

@media print {
    .btn-cod-custom {
        background: #f8f9fa !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    
    .btn-cod-custom .arrow-btn-container {
        display: none;
    }
}
