/* WFP-Credits PRO Storefront Styles */

/* Vertical Bank Badges on Product Photo & Grids (Screenshots 3 & 5) */
.product-thumb .image,
.product-thumb .product-thumb__image,
.thumbnails .thumbnail,
.product-page__image-main,
.product-page__img,
.product-image {
    position: relative;
}

.wfp-grid-badges {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap-reverse;
    max-height: calc(100% - 12px);
    gap: 4px;
    align-items: flex-end;
}

.product-page__image:hover,
.product-page__image-main:hover,
.product-thumb:hover {
    z-index: 150;
}

.product-thumb .wfp-grid-badges {
    right: auto;
    left: 6px;
    top: 6px;
    flex-direction: column;
    flex-wrap: nowrap;
    max-height: none;
    align-items: flex-start;
}

.wfp-grid-badges.wfp-pos-left,
.product-thumb .wfp-grid-badges.wfp-pos-left {
    left: 6px;
    right: auto;
    align-items: flex-start;
}

.wfp-grid-badges.wfp-pos-right,
.product-thumb .wfp-grid-badges.wfp-pos-right {
    right: 6px;
    left: auto;
    align-items: flex-end;
}

.product-thumb .wfp-grid-badge-item {
    width: 32px;
    height: 32px;
    padding: 2px;
}

.product-thumb .wfp-grid-badge-item img {
    width: 24px;
    height: 24px;
}

.wfp-badges-more {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.product-thumb .wfp-badges-more {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.wfp-badges-more-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
    z-index: 9999;
    grid-template-columns: repeat(3, 46px);
    gap: 6px;
}

.product-thumb .wfp-badges-more-popover {
    left: 0;
    right: auto;
    padding: 6px;
    grid-template-columns: repeat(3, 32px);
    gap: 5px;
}

.wfp-grid-badges.wfp-pos-left .wfp-badges-more-popover,
.product-thumb .wfp-grid-badges.wfp-pos-left .wfp-badges-more-popover {
    left: 0;
    right: auto;
}

.wfp-grid-badges.wfp-pos-right .wfp-badges-more-popover,
.product-thumb .wfp-grid-badges.wfp-pos-right .wfp-badges-more-popover {
    right: 0;
    left: auto;
}

.wfp-badges-more:hover .wfp-badges-more-popover {
    display: grid;
}

.wfp-grid-badge-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    box-sizing: border-box;
}

.wfp-grid-badge-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
}

.wfp-badge-months {
    position: absolute;
    right: 2px;
    bottom: 1px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    padding: 1px 3px;
    border-radius: 3px;
}

/* Sleek Dark Hover Tooltip (Screenshots 2 & 5) */
.wfp-tooltip-target {
    position: relative;
}

.wfp-tooltip-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    padding: 7px 11px;
    border-radius: 5px;
    white-space: pre-line;
    text-align: center;
    min-width: 175px;
    max-width: 240px;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.wfp-tooltip-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.94) transparent transparent transparent;
}

.wfp-tooltip-target:hover > .wfp-tooltip-popup {
    display: block;
}

/* Unified Product Page Credit Button (Screenshot 2) */
.wfp-product-widget {
    margin: 10px 0 14px;
    flex-basis: 100%;
    width: 100%;
    display: block;
    clear: both;
}

.wfp-unified-credit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: var(--wfp-btn-width, 100%);
    max-width: 100%;
    min-height: var(--wfp-btn-height, auto);
    padding: 9px 14px;
    background-color: var(--wfp-btn-bg, #0ea5e9);
    color: var(--wfp-btn-text, #ffffff);
    border-radius: var(--wfp-btn-radius, 6px);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
    transition: background-color 0.18s ease, color 0.18s ease, opacity 0.15s ease;
    box-sizing: border-box;
}

.wfp-unified-credit-btn:hover {
    background-color: var(--wfp-btn-hover-bg, #0284c7);
    color: var(--wfp-btn-hover-text, #ffffff);
}

.wfp-btn-icons {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.wfp-btn-icon-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    box-sizing: border-box;
}

.wfp-btn-icon-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
}

.wfp-btn-more {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
}

.wfp-btn-more-popover {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
    z-index: 9999;
    grid-template-columns: repeat(3, 28px);
    gap: 5px;
}

.wfp-btn-more-popover .wfp-btn-icon-item {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
}

.wfp-btn-more:hover .wfp-btn-more-popover {
    display: grid;
}

.wfp-btn-label {
    font-size: 15px;
    font-weight: 600;
}

/* Modal Calculator (Screenshot 4) */
.wfp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10500;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wfp-modal-overlay.is-open {
    display: flex;
}

.wfp-modal-dialog {
    background: var(--wfp-modal-bg, #ffffff);
    color: var(--wfp-modal-text, #1e293b);
    border-radius: var(--wfp-modal-radius, 8px);
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.wfp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--wfp-modal-header-bg, #f8fafc);
    border-bottom: 1px solid #e2e8f0;
}

.wfp-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wfp-modal-text, #1e293b);
    margin: 0;
}

.wfp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

.wfp-modal-close:hover {
    color: #0f172a;
}

.wfp-modal-body {
    padding: 14px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wfp-modal-bank-row {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.wfp-modal-bank-row.is-selected {
    border-color: var(--wfp-modal-accent, #65a30d);
    background: rgba(101, 163, 13, 0.06);
}

.wfp-modal-bank-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
    flex: 1 1 210px;
}

.wfp-modal-bank-left img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
}

.wfp-modal-bank-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.wfp-modal-bank-right {
    flex: 2 1 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wfp-modal-calc-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #334155;
}

.wfp-period-select {
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

/* Green Range Slider (Screenshots 4 & 6) */
.wfp-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
}

.wfp-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 22px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.wfp-range-slider::-moz-range-thumb {
    width: 18px;
    height: 22px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.wfp-modal-actions-row {
    display: flex;
    justify-content: center;
}

.wfp-modal-apply-btn {
    padding: 7px 20px;
    border-radius: var(--wfp-btn-radius, 5px);
    border: none;
    background-color: var(--wfp-btn-bg, #0ea5e9);
    color: var(--wfp-btn-text, #ffffff);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.wfp-modal-apply-btn:hover:not(:disabled) {
    background-color: var(--wfp-btn-hover-bg, #0284c7);
    color: var(--wfp-btn-hover-text, #ffffff);
}

.wfp-modal-apply-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Inline Checkout Period Box (Screenshot 6) */
.wfp-inline-checkout-calc {
    margin: 8px 0 12px 22px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    max-width: 460px;
}

.wfp-inline-checkout-calc .wfp-modal-calc-line {
    margin-bottom: 10px;
}

/* Checkout Confirm Box */
.wfp-checkout-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    margin-bottom: 15px;
}

.wfp-checkout-submit-btn {
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
