/**
 * WooCommerce Price Config - Frontend Styles
 *
 * Styling for alternative pricing display in product loops
 */

/* Main container for the pricing block */
.wc-alternative-pricing-block {
    margin: 10px 0;
    padding: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Reset max-width for product loops to maintain grid layout */
.products .product .wc-alternative-pricing-block {
    max-width: 100%;
}

/* List price - gray and strikethrough */
.wc-list-price {
    padding: 4px 0 8px;
    margin-bottom: 8px;
}

.wc-list-price .wc-price-value {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
}

/* Outlet badge - single teal box */
.wc-outlet-badge {
    background: #3D6D6C;
    padding: 20px 16px;
    border-radius: 0;
    margin-bottom: 0;
    text-align: center;
}

.wc-outlet-badge .wc-outlet-text {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Installment price - dark teal box at top */
.wc-installment-price {
    background: #3D6D6C;
    padding: 14px 12px;
    border-radius: 0;
    margin-bottom: 0;
    color: #fff;
}

/* Total price in installment section - large and prominent */
.wc-installment-price .wc-total-price {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 6px;
}

/* Installment label and per-installment price */
.wc-installment-price .wc-price-label {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #fff;
    margin: 0;
}

.wc-installment-price .wc-price-value {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

/* Bank transfer price - cyan/turquoise box at bottom */
.wc-transfer-price {
    background: #5DDCDC;
    padding: 14px 12px;
    margin-bottom: 0;
    border-radius: 0;
}

/* Savings text inside transfer section */
.wc-transfer-price .wc-savings-text {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    text-transform: capitalize;
}

/* Transfer price value - large and bold */
.wc-transfer-price .wc-price-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 6px;
}

/* Transfer label */
.wc-transfer-price .wc-price-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}

/* Legacy savings text (if outside transfer box) - deprecated */
.wc-savings-text {
    font-size: 13px;
    font-weight: 600;
    color: #ff6b35;
    padding: 4px 0;
    text-transform: lowercase;
}

.wc-savings-text::first-letter {
    text-transform: uppercase;
}

/* Price ranges for variable products */
.wc-price-range {
    white-space: nowrap;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .wc-alternative-pricing-block {
        margin: 8px 0;
        border-radius: 10px;
        max-width: 100%;
    }

    .wc-list-price .wc-price-value {
        font-size: 13px;
    }

    .wc-outlet-badge {
        padding: 16px 12px;
    }

    .wc-outlet-badge .wc-outlet-text {
        font-size: 22px;
        letter-spacing: 1.5px;
    }

    .wc-installment-price {
        padding: 12px 10px;
    }

    .wc-installment-price .wc-total-price {
        font-size: 22px;
    }

    .wc-installment-price .wc-price-label {
        font-size: 12px;
    }

    .wc-installment-price .wc-price-value {
        font-size: 14px;
    }

    .wc-transfer-price {
        padding: 12px 10px;
    }

    .wc-transfer-price .wc-savings-text {
        font-size: 13px;
    }

    .wc-transfer-price .wc-price-value {
        font-size: 22px;
    }

    .wc-transfer-price .wc-price-label {
        font-size: 12px;
    }

    .wc-savings-text {
        font-size: 12px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .wc-list-price .wc-price-value {
        font-size: 11px;
    }

    .wc-outlet-badge .wc-outlet-text {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .wc-installment-price .wc-total-price {
        font-size: 20px;
    }

    .wc-installment-price .wc-price-value {
        font-size: 13px;
    }

    .wc-transfer-price .wc-price-value {
        font-size: 20px;
    }
}


/* Hide WooCommerce default price when alternative pricing is shown */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
.products .product .price {
    display: none !important;
}

/* Compatibility with WooCommerce product loops */
.products .product .wc-alternative-pricing-block {
    width: 100%;
}

/* Ensure proper spacing in different themes */
.woocommerce ul.products li.product .wc-alternative-pricing-block,
.woocommerce-page ul.products li.product .wc-alternative-pricing-block {
    margin-top: 10px;
    margin-bottom: 0;
}

/* ================================
   Modal de Medios de Pago
   ================================ */

/* Prevent body scroll when modal is open */
body.wc-modal-open {
    overflow: hidden;
}

/* Modal overlay - full screen backdrop */
.wc-payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

/* Modal container */
.wc-payment-modal-container {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Modal header */
.wc-payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.wc-payment-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111;
}

.wc-payment-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.wc-payment-modal-close:hover {
    background: #f3f4f6;
    color: #111;
}

/* Modal body */
.wc-payment-modal-body {
    padding: 0 24px;
    flex: 1;
}

/* Payment sections */
.wc-payment-section {
    padding: 20px 0;
}

.wc-payment-section-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.wc-payment-section-desc {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.wc-payment-or-label {
    margin: 12px 0 8px 0;
    font-size: 13px;
    color: #666;
}

.wc-payment-separator {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0;
}

/* Installment rows */
.wc-installment-rows {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

.wc-installment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px;
    color: #333;
    gap: 8px;
}

.wc-installment-row + .wc-installment-row {
    border-top: 1px solid #e5e7eb;
}

.wc-inst-desc {
    flex: 1;
    min-width: 0;
}

.wc-inst-rate {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

.wc-inst-total {
    white-space: nowrap;
    font-size: 13px;
    color: #333;
}

/* Card logos */
.wc-card-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.wc-card-logo-img {
    height: 30px;
    width: auto;
    display: block;
    border-radius: 4px;
}

/* Modal footer */
.wc-payment-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid #e5e7eb;
}

.wc-payment-modal-back {
    color: #555;
    font-size: 13px;
    text-decoration: underline;
}

.wc-payment-modal-back:hover {
    color: #111;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .wc-payment-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .wc-payment-modal-container {
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
    }

    .wc-installment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 12px;
    }

    .wc-inst-rate {
        font-size: 11px;
    }
}
