/* Contenedor principal que envuelve el botón y el recuadro */
.mp-installments-wrapper {
    margin: 10px 0;
    width: 75%;
}

/* Botón/link para mostrar/ocultar */
.mp-toggle-installments {
    font-size: 0.9em;
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: inline-block;
    margin-bottom: 5px;
}

.mp-toggle-installments:hover {
    text-decoration: underline;
    color: #2980b9;
}

/* Contenedor principal del recuadro de cuotas */
.mp-installments-box {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.4s ease-in-out;
    max-height: 1000px;
    opacity: 1;
    overflow: hidden;
}

/* Estado oculto del recuadro */
.mp-installments-box.mp-hidden {
    max-height: 0;
    opacity: 0;
    border: none;
    margin-top: 0;
}

/* Encabezado del recuadro */
.mp-box-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.mp-box-header .mp-logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.mp-box-header span {
    font-weight: 600;
    font-size: 1.1em;
    color: #333;
}

/* Cuerpo del recuadro con las opciones */
.mp-box-body {
    padding: 5px 15px;
}

/* Contenedor para la opción de una tarjeta */
.mp-card-option {
    display: flex;
    align-items: center;
}
.mp-card-option:not(:last-child) {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

/* Logo de la tarjeta */
.mp-card-brand {
    flex-shrink: 0;
    margin-right: 15px;
    width: 50px;
    display: grid;
    place-items: center;
    height: 32px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fff;
}

.mp-card-brand img {
    max-height: 25px;
    max-width: 40px;
}

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

.mp-card-installments li {
    font-size: 0.95em;
    color: #555;
    line-height: 1.5;
}

/* Skeleton loader */
.mp-loading-skeleton .skeleton-line {
    width: 80%;
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 4px;
    animation: pulse 1.5s infinite ease-in-out;
    margin: 10px 0;
}

@keyframes pulse {
    0% { background-color: #e0e0e0; }
    50% { background-color: #f0f0f0; }
    100% { background-color: #e0e0e0; }
}

/* --- Estilos del Modal --- */
.mp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
    visibility: hidden;
}

.mp-modal-overlay.mp-visible {
    opacity: 1;
    visibility: visible;
}

.mp-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.mp-visible .mp-modal-content {
    transform: scale(1);
}

.mp-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.mp-modal-close:hover {
    color: #000;
}

.mp-modal-body .mp-installments-box {
    margin-top: 0;
    border: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .mp-installments-wrapper {
        width: 100%;
    }
}