/* ==========================================================================
   WUS Installments – Frontend Styles
   ========================================================================== */

/* Trigger button
   -------------------------------------------------------------------------- */
.wus-installments-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.wus-installments-open-btn:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Overlay
   -------------------------------------------------------------------------- */
#wus-installments-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    padding: 16px;
}

body.wus-popup-open {
    overflow: hidden;
}

/* Popup box
   -------------------------------------------------------------------------- */
.wus-installments-popup {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: wusSlideUp 0.25s ease;
}

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

/* Header
   -------------------------------------------------------------------------- */
.wus-installments-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}
.wus-installments-popup-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}
.wus-installments-close-btn {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.15s;
    padding: 0 4px;
}
.wus-installments-close-btn:hover { color: #111; }

/* Month selector
   -------------------------------------------------------------------------- */
.wus-installments-month-selector {
    padding: 20px 24px 8px;
}
.wus-installments-month-selector h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}
#wus-month-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wus-installments-month-tile {
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.wus-installments-month-tile:hover {
    border-color: #9ca3af;
}
.wus-installments-month-tile.active {
    border-color: #111;
    background: #111;
    color: #fff;
}

/* Provider cards section
   -------------------------------------------------------------------------- */
.wus-installments-options {
    padding: 16px 24px 8px;
}
.wus-installments-options h3 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
}

/* Bank card
   -------------------------------------------------------------------------- */
.wus-installments-bank-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}
.wus-installments-bank-card:last-child { border-bottom: none; }

.wus-installments-bank-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 68px;
    text-align: center;
}
.wus-installments-bank-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.wus-installments-bank-name {
    font-size: 11px;
    font-weight: 600;
    color: #374151;
}

/* Table inside card
   -------------------------------------------------------------------------- */
.wus-installments-bank-details { flex: 1; }

.wus-installments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wus-installments-table th {
    padding: 4px 8px;
    text-align: left;
    color: #9ca3af;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.wus-installments-table td {
    padding: 6px 8px;
    color: #374151;
}
.wus-installments-table .wus-monthly-highlight {
    font-weight: 700;
    color: #111;
    font-size: 15px;
}

/* Footer / CTA
   -------------------------------------------------------------------------- */
.wus-installments-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.wus-installments-continue-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s;
}
.wus-installments-continue-btn:hover { background: #333; color: #fff; }

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .wus-installments-bank-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .wus-installments-bank-logo {
        flex-direction: row;
        min-width: unset;
    }
    .wus-installments-table th,
    .wus-installments-table td {
        padding: 4px 4px;
    }
}

/* ==========================================================================
   "Pay as low as" trigger button
   ========================================================================== */

.wus-pay-as-low-as-button {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 14px !important;
    padding: 14px 20px !important;
    border: none !important;
    border-radius: 10px !important;
    background: #c6ff00 !important;
    color: #111 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: filter 0.15s, box-shadow 0.15s !important;
    line-height: 1.4 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wus-pay-as-low-as-button:hover,
.wus-pay-as-low-as-button:focus {
    filter: brightness(0.92) !important;
    box-shadow: 0 4px 16px rgba(198,255,0,0.4) !important;
    color: #111 !important;
    text-decoration: none !important;
}

.wus-pay-icon-money {
    flex-shrink: 0;
    opacity: 0.8;
}

.wus-pay-label {
    flex: 1;
    font-size: 15px;
    color: #111;
    font-weight: 500;
}

.wus-pay-amount {
    font-weight: 800 !important;
    font-size: 16px !important;
    color: #111 !important;
}

.wus-pay-icon-arrow {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s, transform 0.15s;
}

.wus-pay-as-low-as-button:hover .wus-pay-icon-arrow {
    opacity: 1;
    transform: translateX(3px);
}
