/**
 * WooCommerce Bundle & Save Upsell for Elementor - Styles
 * Pure Vanilla CSS - Ultra High Performance & Speed Optimized
 */

.wc-bsu-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.wc-bsu-container * {
    box-sizing: border-box;
}

/* --- Section Header Divider --- */
.wc-bsu-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.wc-bsu-divider::before,
.wc-bsu-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1.5px solid #d3d3d3;
}

.wc-bsu-header-title {
    padding: 0 16px;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 16px;
    color: #4A4A4A;
    text-transform: uppercase;
}

/* --- Card List & Wrapper --- */
.wc-bsu-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wc-bsu-card-wrapper {
    position: relative;
}

/* Floating Top-Right Badge */
.wc-bsu-floating-badge {
    position: absolute;
    top: -10px;
    right: 24px;
    background-color: #5B57AF;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    z-index: 5;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.2px;
}

/* --- Main Card Layout --- */
.wc-bsu-card {
    background-color: #F4F3FD;
    border: 1.5px solid #E2E0F8;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.wc-bsu-card.is-selected {
    background-color: #ECEBFF;
    border-color: #7E75D8;
    box-shadow: 0 4px 14px rgba(126, 117, 216, 0.15);
}

.wc-bsu-card:hover {
    border-color: #998BF0;
}

.wc-bsu-card-main {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 14px;
}

/* --- Custom Checkbox --- */
.wc-bsu-checkbox-col {
    display: flex;
    align-items: center;
}

.wc-bsu-checkbox-label {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    cursor: pointer;
    user-select: none;
}

.wc-bsu-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.wc-bsu-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: #ffffff;
    border: 2px solid #C4C0E8;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wc-bsu-card.is-selected .wc-bsu-checkmark {
    background-color: #ffffff;
    border-color: #7E75D8;
}

.wc-bsu-checkbox-label input:checked ~ .wc-bsu-checkmark:after {
    display: block;
}

.wc-bsu-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid #7E75D8;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* --- Thumbnails Col --- */
.wc-bsu-thumb-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wc-bsu-img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #ffffff;
}

.wc-bsu-combo-thumbs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wc-bsu-combo-thumbs .wc-bsu-img {
    width: 44px;
    height: 44px;
}

.wc-bsu-plus-icon {
    font-size: 14px;
    font-weight: 700;
    color: #666666;
}

/* --- Content Col --- */
.wc-bsu-content-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wc-bsu-item-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.25;
}

.wc-bsu-discount-badge {
    background-color: #9885F0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 14px;
    white-space: nowrap;
}

/* --- Price Col --- */
.wc-bsu-price-col {
    text-align: right;
    flex-shrink: 0;
}

.wc-bsu-sale-price {
    font-size: 18px;
    font-weight: 700;
    color: #5550AD;
    line-height: 1.1;
}

.wc-bsu-regular-price {
    font-size: 15px;
    color: #222222;
    margin-top: 2px;
    line-height: 1;
}

.wc-bsu-regular-price s {
    text-decoration: line-through;
    opacity: 0.85;
}

/* --- Bottom Sub-Bar --- */
.wc-bsu-bottom-bar {
    background-color: #6E6CBF;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 500;
    text-align: center;
    padding: 7px 16px;
    letter-spacing: 0.3px;
}

/* --- Standalone Action Button --- */
.wc-bsu-action-wrapper {
    margin-top: 20px;
}

.wc-bsu-submit-btn {
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    padding: 16px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wc-bsu-submit-btn:hover {
    background-color: #1a1a1a;
}

.wc-bsu-submit-btn:active {
    transform: scale(0.99);
}


.wc-bsu-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: wc-bsu-spin 0.8s infinite linear;
    margin-left: 10px;
}

@keyframes wc-bsu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Checkout Order Bump Box Styling --- */
.wc-bsu-order-bump-box {
    background-color: #FFFDF0;
    border: 2px dashed #E6C845;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.wc-bsu-bump-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wc-bsu-bump-checkbox-label {
    position: relative;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.wc-bsu-bump-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.wc-bsu-bump-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #ffffff;
    border: 2px solid #E6C845;
    border-radius: 4px;
}

.wc-bsu-bump-checkbox-label input:checked ~ .wc-bsu-bump-checkmark {
    background-color: #E6C845;
}

.wc-bsu-bump-checkbox-label input:checked ~ .wc-bsu-bump-checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #111111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wc-bsu-bump-headline {
    font-weight: 700;
    font-size: 15px;
    color: #B22222;
    flex: 1;
}

.wc-bsu-bump-badge {
    background-color: #B22222;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

.wc-bsu-bump-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wc-bsu-bump-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.wc-bsu-bump-info {
    flex: 1;
}

.wc-bsu-bump-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #111111;
}

.wc-bsu-bump-desc {
    font-size: 12px;
    color: #555555;
    margin-top: 2px;
}

.wc-bsu-bump-price-tag {
    text-align: right;
    white-space: nowrap;
}

.wc-bsu-bump-sale {
    font-weight: 700;
    color: #B22222;
    font-size: 15px;
}

.wc-bsu-bump-price-tag s {
    display: block;
    font-size: 12px;
    color: #777777;
}

/* --- Post Purchase Upsell Card Styling --- */
.wc-bsu-post-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    border: 1px solid #eee;
}

.wc-bsu-post-header {
    background-color: #E53935;
    color: #ffffff;
    padding: 20px 16px;
}

.wc-bsu-post-headline {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.wc-bsu-post-subheadline {
    font-size: 14px;
    opacity: 0.95;
}

.wc-bsu-post-body {
    padding: 24px 20px;
}

.wc-bsu-post-img {
    max-width: 140px;
    height: auto;
    border-radius: 12px;
    margin-bottom: 14px;
}

.wc-bsu-post-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #222222;
}

.wc-bsu-post-pricing {
    font-size: 22px;
    font-weight: 800;
    color: #E53935;
    margin-bottom: 18px;
}

.wc-bsu-post-pricing s {
    font-size: 16px;
    color: #888888;
    margin-left: 8px;
}

.wc-bsu-post-submit-btn {
    width: 100%;
    background-color: #4CAF50;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    padding: 16px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wc-bsu-post-submit-btn:hover {
    background-color: #43A047;
}

.wc-bsu-post-skip {
    margin-top: 14px;
}

.wc-bsu-skip-link {
    color: #777777;
    font-size: 13px;
    text-decoration: underline;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 480px) {
    .wc-bsu-card-main {
        padding: 12px 14px;
        gap: 10px;
    }

    .wc-bsu-item-title {
        font-size: 15px;
    }

    .wc-bsu-sale-price {
        font-size: 16px;
    }

    .wc-bsu-regular-price {
        font-size: 13px;
    }

    .wc-bsu-img {
        width: 44px;
        height: 44px;
    }

    .wc-bsu-combo-thumbs .wc-bsu-img {
        width: 36px;
        height: 36px;
    }
}
