/**
 * Estilos para Cuotas Mercado Pago - AtomTech
 * www.atomtech.com.ar
 */

/* Contenedor principal */
.mp-cuotas-container {
    background: linear-gradient(135deg, #009ee3 0%, #0084c9 100%);
    border-radius: 12px;
    padding: 24px;
    margin: 25px 0;
    box-shadow: 0 4px 20px rgba(0, 158, 227, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Título */
.mp-cuotas-title {
    color: #ffffff;
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 18px 0;
    text-align: left;
    letter-spacing: -0.3px;
}

/* Lista de cuotas */
.mp-cuotas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Item de cuota individual */
.mp-cuota-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
}

.mp-cuota-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #009ee3;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mp-cuota-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.mp-cuota-item:hover::before {
    transform: scaleY(1);
}

.mp-cuota-item:last-child {
    margin-bottom: 0;
}

/* Número de cuotas */
.mp-cuotas-numero {
    font-weight: 700;
    color: #009ee3;
    font-size: 16px;
    min-width: 90px;
    display: inline-block;
    pointer-events: none;
}

/* Texto "de" */
.mp-cuotas-separador {
    font-size: 14px;
    color: #666666;
    margin: 0 8px;
    pointer-events: none;
}

/* Valor de la cuota (destacado) */
.mp-cuotas-valor {
    font-size: 22px;
    font-weight: 700;
    color: #2d2d2d;
    flex: 1;
    text-align: center;
    letter-spacing: -0.5px;
    pointer-events: none;
}

/* Total entre paréntesis */
.mp-cuotas-total {
    font-size: 13px;
    color: #666666;
    font-weight: 400;
    white-space: nowrap;
    pointer-events: none;
}

/* Total entre paréntesis */
.mp-cuota-total {
    font-size: 13px;
    color: #888888;
    font-weight: 400;
}

/* Nota al pie */
.mp-cuotas-nota {
    color: #ffffff;
    font-size: 12px;
    margin: 18px 0 8px 0;
    opacity: 0.95;
    font-style: italic;
    line-height: 1.4;
}

/* Información adicional */
.mp-cuotas-info {
    color: #ffffff;
    font-size: 13px;
    margin: 8px 0 0 0;
    opacity: 0.95;
    line-height: 1.5;
}

/* Mensaje de error */
.mp-error {
    color: #ff4444;
    background: #fff5f5;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .mp-cuotas-container {
        padding: 20px 16px;
        margin: 20px 0;
    }
    
    .mp-cuotas-title {
        font-size: 17px;
        margin-bottom: 15px;
    }
    
    .mp-cuota-item {
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .mp-cuota-numero {
        min-width: auto;
        margin-bottom: 6px;
    }
    
    .mp-cuota-de {
        display: none;
    }
    
    .mp-cuota-valor {
        text-align: left;
        margin: 6px 0;
        font-size: 20px;
        flex: none;
        width: 100%;
    }
    
    .mp-cuota-total {
        font-size: 12px;
        display: block;
        margin-top: 4px;
    }
    
    .mp-cuota-item:hover {
        transform: translateX(4px);
    }
}

/* Responsive - Móviles */
@media (max-width: 480px) {
    .mp-cuotas-container {
        padding: 16px 12px;
        margin: 15px 0;
        border-radius: 10px;
    }
    
    .mp-cuotas-title {
        font-size: 16px;
    }
    
    .mp-cuota-item {
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    
    .mp-cuota-valor {
        font-size: 18px;
    }
    
    .mp-cuotas-nota,
    .mp-cuotas-info {
        font-size: 11px;
    }
}

/* Animación de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mp-cuotas-container {
    animation: fadeInUp 0.5s ease-out;
}

/* Animación de los items */
.mp-cuota-item {
    animation: fadeInUp 0.4s ease-out backwards;
}

.mp-cuota-item:nth-child(1) { animation-delay: 0.1s; }
.mp-cuota-item:nth-child(2) { animation-delay: 0.15s; }
.mp-cuota-item:nth-child(3) { animation-delay: 0.2s; }
.mp-cuota-item:nth-child(4) { animation-delay: 0.25s; }

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .mp-cuota-item {
        background: #f8f9fa;
    }
    
    .mp-cuota-valor {
        color: #1a1a1a;
    }
}

/* Accesibilidad */
.mp-cuota-item:focus {
    outline: 3px solid #009ee3;
    outline-offset: 2px;
}

/* Para impresión */
@media print {
    .mp-cuotas-container {
        background: white;
        border: 2px solid #009ee3;
        box-shadow: none;
    }
    
    .mp-cuotas-title,
    .mp-cuotas-nota,
    .mp-cuotas-info {
        color: #333333;
    }
}
