/**
 * YBA Bundle Pricing - Frontend Styles
 */

/* Preview Container */
.yba-bundle-preview {
    margin: 15px 0;
    padding: 0;
}

.yba-bundle-preview-inner {
    background-image: linear-gradient(264deg, #ed4317 0%, #c70711 100%) !important;
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Header */
.yba-bundle-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.yba-bundle-icon {
    font-size: 1.5em;
}

.yba-bundle-title {
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Loading State */
.yba-bundle-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 0.95em;
    opacity: 0.9;
}

.yba-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: yba-spin 0.8s linear infinite;
}

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

/* Prices */
.yba-bundle-prices {
    margin-bottom: 12px;
}

.yba-bundle-original-price,
.yba-bundle-discounted-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.yba-bundle-original-price .label,
.yba-bundle-discounted-price .label {
    font-size: 0.9em;
    opacity: 0.9;
}

.yba-bundle-original-price .price {
    font-size: 1em;
}

.yba-bundle-original-price .price del {
    opacity: 0.7;
    text-decoration: line-through;
    color:white !important;
}

.yba-bundle-discounted-price .price {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 0px !important;
    color:white !important;
}

/* Savings Badge */
.yba-bundle-savings {
    margin-bottom: 12px;
}

.yba-bundle-savings-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.yba-bundle-savings-badge .amount {
    font-weight: 700;
}

/* Packs Info */
.yba-bundle-packs {
    font-size: 0.85em;
    opacity: 0.9;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.yba-bundle-packs .label {
    margin-right: 5px;
}

.yba-bundle-packs .packs-list {
    font-weight: 500;
}

/* Highlight Animation */
.yba-bundle-highlight .yba-bundle-preview-inner {
    animation: yba-pulse 0.5s ease;
}

@keyframes yba-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* WooCommerce price overrides */
.yba-bundle-preview .woocommerce-Price-amount {
    color: inherit !important;
}

.yba-bundle-preview .woocommerce-Price-currencySymbol {
    color: inherit !important;
}

/* Responsive */
@media (max-width: 768px) {
    .yba-bundle-preview-inner {
        padding: 15px;
    }
    
    .yba-bundle-discounted-price .price {
        font-size: 1.2em;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .yba-bundle-preview-inner {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

/* RTL Support */
[dir="rtl"] .yba-bundle-preview-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .yba-bundle-original-price,
[dir="rtl"] .yba-bundle-discounted-price {
    flex-direction: row-reverse;
}
