/**
 * Estilos para la página de métodos de pago
 * Mebac Cuotas Plugin - Premium UI/UX Design
 *
 * @package    Wayra_Installments
 * @since      3.4.0
 */

/* ══════════════════════════════════════════════════════════════
   VARIABLES & RESET (matching loc-container style)
   ══════════════════════════════════════════════════════════════ */
.mebac-po {
    /* Color Palette - exactamente igual al bloque original */
    --mebac-primary: rgb(28, 97, 231);
    --mebac-primary-rgb: 28, 97, 231;
    --mebac-primary-light: rgba(28, 97, 231, 0.10);
    --mebac-primary-glow: rgba(28, 97, 231, 0.25);

    --mebac-bg: #f5f5f7;
    --mebac-card: #ffffff;
    --mebac-border: #e5e7eb;
    --mebac-muted: #6b7280;
    --mebac-text: #1d1d1f;

    --mebac-success: #22c55e;
    --mebac-success-rgb: 34, 197, 94;
    --mebac-warning: #f59e0b;
    --mebac-warning-rgb: 245, 158, 11;
    --mebac-error: #ef4444;

    /* Typography */
    --mebac-font-title: "Lexend Deca", Arial, Helvetica, sans-serif;
    --mebac-font-text: "Open Sans", Arial, Helvetica, sans-serif;

    /* Radii */
    --mebac-radius: 10px;
    --mebac-radius-sm: 5px;
    --mebac-radius-lg: 16px;

    /* Shadows */
    --mebac-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --mebac-shadow-lg: 0 8px 24px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);

    /* Container */
    max-width: 1170px;
    margin: 0 auto 30px auto;
    padding: 40px 32px;
    background: var(--mebac-card);
    border-radius: var(--mebac-radius);
    box-shadow: var(--mebac-shadow);
    font-family: var(--mebac-font-text);
    color: var(--mebac-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mebac-po *,
.mebac-po *::before,
.mebac-po *::after {
    box-sizing: border-box;
}

/* ══════════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════════ */
.mebac-po-header {
    text-align: center;
    margin-bottom: 32px;
}

.mebac-po-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(28,97,231,0.08) 0%, rgba(28,97,231,0.14) 100%);
    color: var(--mebac-primary);
    font-family: var(--mebac-font-title);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 14px;
    border-radius: 980px;
    margin-bottom: 12px;
}

.mebac-po-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.mebac-po-title {
    font-family: var(--mebac-font-title);
    font-size: 26px;
    font-weight: 600;
    color: var(--mebac-text);
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.mebac-po-subtitle {
    font-size: 15px;
    color: var(--mebac-muted);
    margin: 0;
    line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════
   CONTENT LAYOUT
   ══════════════════════════════════════════════════════════════ */
.mebac-po-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ══════════════════════════════════════════════════════════════
   SELECTOR PANEL (LEFT)
   ══════════════════════════════════════════════════════════════ */
.mebac-po-selector-panel {
    flex: 1 1 0;
    min-width: 0;
}

/* ══════════════════════════════════════════════════════════════
   AMOUNT FIELD
   ══════════════════════════════════════════════════════════════ */
.mebac-po-field {
    margin-bottom: 20px;
}

.mebac-po-label {
    display: block;
    font-family: var(--mebac-font-text);
    font-size: 15px;
    font-weight: 600;
    color: #223349;
    line-height: 1.3;
    margin-bottom: 6px;
}

.mebac-po-amount-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 56px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: var(--mebac-radius-lg);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.mebac-po-amount-wrapper:hover {
    border-color: #b0b8c4;
}

.mebac-po-amount-wrapper:focus-within,
.mebac-po-amount-wrapper.is-focused {
    border-color: var(--mebac-primary);
    box-shadow: 0 0 0 4px rgba(var(--mebac-primary-rgb), 0.18);
}

.mebac-po-amount-wrapper.has-error {
    border-color: var(--mebac-error);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.mebac-po-currency {
    font-family: var(--mebac-font-text);
    font-size: 18px;
    font-weight: 600;
    color: var(--mebac-muted);
    flex-shrink: 0;
    margin-right: 8px;
    user-select: none;
}

.mebac-po-currency--right {
    margin-right: 0;
    margin-left: 8px;
}

.mebac-po-amount-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: var(--mebac-font-text);
    font-size: 18px;
    font-weight: 600;
    color: var(--mebac-text);
    outline: none;
    padding: 0;
}

.mebac-po-amount-input::placeholder {
    color: var(--mebac-muted);
    font-weight: 400;
}

/* Cart info chip */
.mebac-po-cart-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(28,97,231,0.08) 0%, rgba(28,97,231,0.12) 100%);
    color: var(--mebac-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 980px;
}

.mebac-po-cart-info svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Error message */
.mebac-po-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--mebac-radius);
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   PLACEHOLDER (before selection)
   ══════════════════════════════════════════════════════════════ */
.mebac-po-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--mebac-bg);
    border-radius: var(--mebac-radius);
    border: 1px dashed var(--mebac-border);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mebac-po-placeholder.is-hidden {
    display: none;
}

.mebac-po-placeholder-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mebac-card);
    border-radius: 8px;
    color: var(--mebac-muted);
}

.mebac-po-placeholder-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mebac-po-placeholder-text {
    font-size: 14px;
    color: var(--mebac-muted);
    font-style: italic;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   RESULT CARD
   ══════════════════════════════════════════════════════════════ */
.mebac-po-result {
    background: linear-gradient(135deg, rgba(28,97,231,0.04) 0%, rgba(28,97,231,0.08) 100%);
    border: 1px solid transparent;
    border-radius: var(--mebac-radius);
    padding: 0;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
}

.mebac-po-result.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 800px;
    padding: 20px;
    border-color: rgba(var(--mebac-primary-rgb), 0.15);
}

.mebac-po-result-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(var(--mebac-primary-rgb), 0.12);
}

.mebac-po-result-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(28,97,231,0.10) 0%, rgba(28,97,231,0.18) 100%);
    border-radius: var(--mebac-radius-sm);
    color: var(--mebac-primary);
}

.mebac-po-result-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mebac-po-result-method-name {
    font-family: var(--mebac-font-title);
    font-size: 15px;
    font-weight: 600;
    color: var(--mebac-text);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   INSTALLMENTS LIST
   ══════════════════════════════════════════════════════════════ */
.mebac-po-installments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mebac-po-installment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(var(--mebac-primary-rgb), 0.08);
}

.mebac-po-installment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mebac-po-installment-item:first-child {
    padding-top: 0;
}

.mebac-po-installment-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--mebac-text);
    flex: 1;
    min-width: 0;
}

.mebac-po-installment-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--mebac-text);
    flex-shrink: 0;
}

.mebac-po-installment-total {
    font-size: 12px;
    color: var(--mebac-muted);
    flex-shrink: 0;
}

.mebac-po-installment-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 980px;
}

.mebac-po-installment-badge--free {
    background: rgba(var(--mebac-success-rgb), 0.12);
    color: var(--mebac-success);
}

.mebac-po-installment-badge--interest {
    background: rgba(var(--mebac-warning-rgb), 0.12);
    color: var(--mebac-warning);
}

.mebac-po-installment-badge::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: mebac-pulse 2s ease-in-out infinite;
}

@keyframes mebac-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ══════════════════════════════════════════════════════════════
   SINGLE PAYMENT CARD
   ══════════════════════════════════════════════════════════════ */
.mebac-po-single-payment {
    text-align: center;
    padding: 20px 0 0;
}

.mebac-po-single-payment-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--mebac-success-rgb), 0.12) 0%, rgba(var(--mebac-success-rgb), 0.20) 100%);
    border-radius: 50%;
    color: var(--mebac-success);
}

.mebac-po-single-payment-icon svg {
    width: 28px;
    height: 28px;
}

.mebac-po-single-payment h4 {
    font-family: var(--mebac-font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--mebac-text);
    margin: 0 0 8px;
}

.mebac-po-single-payment-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--mebac-primary);
    margin: 0 0 8px;
}

.mebac-po-single-payment-note {
    font-size: 13px;
    color: var(--mebac-muted);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   METHODS PANEL (RIGHT) - REDESIGNED
   ══════════════════════════════════════════════════════════════ */
.mebac-po-methods-panel {
    flex: 0 0 340px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mebac-po-methods-title {
    font-family: var(--mebac-font-text);
    font-size: 15px;
    font-weight: 600;
    color: #223349;
    margin: 0 0 12px;
}

/* ══════════════════════════════════════════════════════════════
   METHODS GRID - PREMIUM CARD STYLE
   ══════════════════════════════════════════════════════════════ */
.mebac-po-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   METHOD CARD - HORIZONTAL LIST STYLE
   ══════════════════════════════════════════════════════════════ */
.mebac-po-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--mebac-card);
    border: 1px solid var(--mebac-border);
    border-radius: var(--mebac-radius);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.mebac-po-method:hover {
    border-color: rgba(var(--mebac-primary-rgb), 0.35);
    background: rgba(var(--mebac-primary-rgb), 0.03);
}

.mebac-po-method:focus,
.mebac-po-method:focus-visible {
    outline: none;
    border-color: var(--mebac-primary);
    box-shadow: 0 0 0 4px rgba(var(--mebac-primary-rgb), 0.12);
}

.mebac-po-method.is-active {
    border-color: var(--mebac-primary);
    background: rgba(var(--mebac-primary-rgb), 0.06);
    box-shadow: 0 0 0 4px rgba(var(--mebac-primary-rgb), 0.12);
}

.mebac-po-method.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--mebac-primary);
    border-radius: var(--mebac-radius) 0 0 var(--mebac-radius);
}

/* Method Icon */
.mebac-po-method-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mebac-bg);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.mebac-po-method:hover .mebac-po-method-icon {
    background: var(--mebac-card);
}

.mebac-po-method.is-active .mebac-po-method-icon {
    background: var(--mebac-card);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.mebac-po-method-icon img,
.mebac-po-method-icon svg {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
}

/* Method Name */
.mebac-po-method-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--mebac-text);
    text-align: left;
    line-height: 1.3;
}

.mebac-po-method.is-active .mebac-po-method-name {
    color: var(--mebac-primary);
}

/* Method Badge */
.mebac-po-method-badge {
    background: rgba(var(--mebac-success-rgb), 0.10);
    color: var(--mebac-success);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    border-radius: 980px;
    flex-shrink: 0;
}

/* Badge para métodos con cuotas */
.mebac-po-method-badge--installments {
    background: rgba(var(--mebac-primary-rgb), 0.10);
    color: var(--mebac-primary);
}

.mebac-po-method.is-active .mebac-po-method-badge {
    background: rgba(var(--mebac-primary-rgb), 0.12);
    color: var(--mebac-primary);
}

/* ══════════════════════════════════════════════════════════════
   METHODS GROUPS
   ══════════════════════════════════════════════════════════════ */
.mebac-po-methods-group {
    margin-bottom: 0;
}

.mebac-po-methods-group--other {
    margin-top: 0;
}

/* Group Header - Separator Style (Purple) */
.mebac-po-group-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0 8px;
}

.mebac-po-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.20) 15%,
        rgba(139, 92, 246, 0.35) 50%,
        rgba(99, 102, 241, 0.20) 85%,
        transparent 100%
    );
}

.mebac-po-header-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mebac-font-title);
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.12) 100%);
    border-radius: 980px;
    border: 1px solid rgba(99, 102, 241, 0.20);
}

/* ══════════════════════════════════════════════════════════════
   SEPARATOR - Premium Style
   ══════════════════════════════════════════════════════════════ */
.mebac-po-separator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 16px;
    padding: 0 8px;
}

.mebac-po-separator-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(var(--mebac-primary-rgb), 0.15) 15%,
        rgba(var(--mebac-primary-rgb), 0.25) 50%,
        rgba(var(--mebac-primary-rgb), 0.15) 85%,
        transparent 100%
    );
}

.mebac-po-separator-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mebac-font-text);
    font-size: 11px;
    font-weight: 600;
    color: var(--mebac-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    padding: 6px 14px;
    background: var(--mebac-bg);
    border-radius: 980px;
    border: 1px solid var(--mebac-border);
}

/* Checkmark for active state */
.mebac-po-method.is-active::after {
    content: "";
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    background: var(--mebac-primary);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Adjust badge position when active (to make room for checkmark) */
.mebac-po-method.is-active .mebac-po-method-badge {
    margin-right: 28px;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.mebac-po-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--mebac-border);
}

.mebac-po-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--mebac-muted);
    margin: 0;
}

.mebac-po-disclaimer svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* ══════════════════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════════════════ */
.mebac-po-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
}

.mebac-po-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(var(--mebac-primary-rgb), 0.15);
    border-top-color: var(--mebac-primary);
    border-radius: 50%;
    animation: mebac-spin 0.8s linear infinite;
}

@keyframes mebac-spin {
    to { transform: rotate(360deg); }
}

.mebac-po-loading p {
    margin: 0;
    font-size: 13px;
    color: var(--mebac-muted);
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE - TABLET
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
    .mebac-po-content {
        flex-direction: column;
        gap: 24px;
    }

    .mebac-po-selector-panel {
        display: contents;
    }

    .mebac-po-field {
        order: 1;
        width: 100%;
    }

    .mebac-po-placeholder {
        order: 3;
    }

    .mebac-po-result {
        order: 4;
        width: 100%;
    }

    .mebac-po-methods-panel {
        order: 2;
        flex: none;
        width: 100%;
    }

    .mebac-po-methods-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .mebac-po-method {
        flex-direction: column;
        text-align: center;
        padding: 14px 10px;
        gap: 8px;
    }

    .mebac-po-method-name {
        text-align: center;
        font-size: 12px;
    }

    .mebac-po-method.is-active::before {
        left: 0;
        right: 0;
        top: 0;
        bottom: auto;
        width: auto;
        height: 3px;
        border-radius: var(--mebac-radius) var(--mebac-radius) 0 0;
    }

    .mebac-po-method.is-active::after {
        top: 6px;
        right: 6px;
        width: 16px;
        height: 16px;
        background-size: 10px;
    }

    .mebac-po-method-badge {
        position: relative;
        top: auto;
        right: auto;
        font-size: 8px;
        padding: 2px 6px;
        margin-top: auto;
    }

    .mebac-po-method.is-active .mebac-po-method-badge {
        display: inline-flex;
        margin-right: 0;
        transition: none;
    }

    /* Ajustar layout del método para acomodar el badge */
    .mebac-po-method {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        min-height: 110px;
        padding-bottom: 10px;
    }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .mebac-po {
        padding: 24px 16px;
        margin: 0 auto 20px auto;
    }

    .mebac-po-title {
        font-size: 22px;
    }

    .mebac-po-content {
        gap: 16px;
    }

    .mebac-po-methods-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .mebac-po-method {
        padding: 12px 8px;
    }

    .mebac-po-method-icon {
        width: 40px;
        height: 40px;
    }

    .mebac-po-method-icon img,
    .mebac-po-method-icon svg {
        width: 32px;
        height: 32px;
    }

    .mebac-po-method-name {
        font-size: 11px;
    }

    .mebac-po-placeholder {
        display: none;
    }

    /* Installments list - mobile card layout */
    .mebac-po-installments-list {
        gap: 8px;
    }

    .mebac-po-installment-item {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 4px 12px;
        padding: 14px;
        background: var(--mebac-card);
        border: 1px solid rgba(var(--mebac-primary-rgb), 0.10);
        border-radius: var(--mebac-radius);
    }

    .mebac-po-installment-item:last-child,
    .mebac-po-installment-item:first-child {
        padding: 14px;
    }

    .mebac-po-installment-name {
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 13px;
        font-weight: 700;
        color: var(--mebac-text);
        min-width: 55px;
    }

    .mebac-po-installment-price {
        grid-column: 2;
        grid-row: 1;
        font-size: 15px;
        font-weight: 700;
        color: var(--mebac-text);
    }

    .mebac-po-installment-total {
        grid-column: 2;
        grid-row: 2;
        font-size: 11px;
        color: var(--mebac-muted);
    }

    .mebac-po-installment-badge {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 11px;
        padding: 5px 10px;
    }
}

@media (max-width: 400px) {
    .mebac-po-title {
        font-size: 20px;
    }

    .mebac-po-amount-input {
        font-size: 16px;
    }

    .mebac-po-methods-grid {
        grid-template-columns: 1fr;
    }

    .mebac-po-method {
        flex-direction: row;
        text-align: left;
        padding: 12px 14px;
        gap: 12px;
    }

    .mebac-po-method-name {
        text-align: left;
        font-size: 13px;
    }

    .mebac-po-method.is-active::before {
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
        width: 4px;
        height: auto;
        border-radius: var(--mebac-radius) 0 0 var(--mebac-radius);
    }

    .mebac-po-method-badge {
        position: relative;
        top: auto;
        right: auto;
        font-size: 9px;
        padding: 3px 7px;
    }

    .mebac-po-method.is-active .mebac-po-method-badge {
        display: inline-flex;
        margin-right: 24px;
        transition: none;
    }

    .mebac-po-method.is-active::after {
        top: 50%;
        transform: translateY(-50%);
        right: 12px;
    }

    /* Installments - extra small screens */
    .mebac-po-installment-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto auto;
        gap: 4px 10px;
        padding: 12px;
    }

    .mebac-po-installment-name {
        grid-column: 1;
        grid-row: 1 / 4;
        font-size: 12px;
        min-width: 48px;
    }

    .mebac-po-installment-price {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
    }

    .mebac-po-installment-total {
        grid-column: 2;
        grid-row: 2;
        font-size: 10px;
    }

    .mebac-po-installment-badge {
        grid-column: 2;
        grid-row: 3;
        justify-self: start;
        font-size: 10px;
        padding: 3px 8px;
        margin-top: 2px;
    }
}

/* ══════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .mebac-po-method,
    .mebac-po-result,
    .mebac-po-installment-badge::before {
        transition: none;
        animation: none;
    }

    .mebac-po-spinner {
        animation: none;
    }
}

@media (prefers-contrast: high) {
    .mebac-po-method {
        border-width: 2px;
    }

    .mebac-po-amount-wrapper {
        border-width: 2px;
    }
}
