/**
 * WC Cuotas por Categoría - Frontend Styles
 *
 * @package WC_Cuotas_Categoria
 */

/* Container principal */
.wccc-cuotas-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 15px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Cuota principal */
.wccc-cuota-principal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.wccc-cuota-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wccc-cuota-cantidad {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.wccc-sin-interes {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wccc-con-interes {
    background: #6c757d;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.wccc-cuota-valor {
    font-size: 14px;
    color: #495057;
}

.wccc-cuota-valor strong {
    font-size: 20px;
    color: #212529;
}

/* Tarjetas */
.wccc-tarjetas {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wccc-tarjeta-icon {
    width: 45px;
    height: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Botón ver cuotas */
.wccc-ver-cuotas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.wccc-ver-cuotas:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

.wccc-ver-cuotas-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.wccc-ver-cuotas:hover .wccc-ver-cuotas-icon {
    transform: translateX(4px);
}

/* Modal */
.wccc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wccc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.wccc-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: wccc-modal-in 0.3s ease;
}

@keyframes wccc-modal-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wccc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    aspect-ratio: 1 / 1;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    font-size: 24px;
    line-height: 36px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.wccc-modal-close span {
    display: block;
    line-height: 1;
    margin-top: -2px;
}

.wccc-modal-close:hover {
    background: #e9ecef;
    color: #212529;
}

.wccc-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e9ecef;
}

.wccc-modal-header h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #212529;
}

.wccc-modal-tarjetas {
    display: flex;
    gap: 10px;
}

.wccc-modal-tarjetas img {
    width: 50px;
    height: auto;
}

.wccc-modal-body {
    padding: 0;
}

/* Tabla de cuotas */
.wccc-cuotas-table {
    width: 100%;
    border-collapse: collapse;
}

.wccc-cuotas-table th {
    background: #f8f9fa;
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.wccc-cuotas-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
}

.wccc-cuotas-table tr:last-child td {
    border-bottom: none;
}

.wccc-cuotas-table tr.wccc-principal-row {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

.wccc-cuotas-table tr.wccc-principal-row td {
    font-weight: 600;
    color: #212529;
}

.wccc-cuota-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.wccc-cuota-badge.principal {
    background: #007bff;
    color: #fff;
}

.wccc-modal-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
}

.wccc-modal-disclaimer {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #495057;
    text-align: center;
    font-weight: 500;
}

.wccc-modal-disclaimer-secondary {
    margin: 0;
    font-size: 10px;
    color: #6c757d;
    text-align: center;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .wccc-cuota-principal {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wccc-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .wccc-cuotas-table th,
    .wccc-cuotas-table td {
        padding: 12px 10px;
        font-size: 13px;
    }
}
