/* Bundle summary & validation styles for WooCommerce BundleCraft */
.wbc-summary-container {
    margin-top: 32px;
    padding: var(--wbc-summary-padding, 20px);
    border-radius: var(--wbc-summary-radius, 12px);
    background: var(--wbc-summary-background, var(--wbc-card-bg));
    border: 1px solid var(--wbc-border);
}

.wbc-summary-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Progress Bar */
.wbc-progress-wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wbc-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--wbc-text);
}

.wbc-progress-bar-bg {
    width: 100%;
    max-width: 100%;
    height: 10px;
    background: var(--wbc-border);
    border-radius: 5px;
    overflow: hidden;
    box-sizing: border-box;
}

.wbc-progress-bar-fill {
    height: 100%;
    width: 0;
    max-width: 100%;
    background: var(--wbc-progress-bar, var(--wbc-primary));
    border-radius: 5px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    overflow: hidden;
}

/* Pricing summary */
.wbc-summary-pricing {
    text-align: right;
}

.wbc-summary-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wbc-text-muted);
}

.wbc-summary-price {
    font-family: var(--wbc-font-price), 'Inter', sans-serif;
    font-size: var(--wbc-font-size-price, 24px);
    font-weight: 800;
    color: var(--wbc-price-color, var(--wbc-primary));
}

/* Validation results box */
.wbc-validation-results-box {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--wbc-border);
}

.wbc-validation-results-box.wbc-invalid-state {
    border-left-color: var(--wbc-warning);
    background: rgba(245, 158, 11, 0.05);
}

.wbc-validation-results-box.wbc-valid-state {
    border-left-color: var(--wbc-success);
    background: rgba(16, 185, 129, 0.05);
}

.wbc-validation-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wbc-validation-list li {
    font-size: 13px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wbc-validation-list li:last-child {
    margin-bottom: 0;
}

.wbc-validation-list .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wbc-validation-list .wbc-invalid-item {
    color: var(--wbc-warning);
}

.wbc-validation-list .wbc-valid-item {
    color: var(--wbc-success);
}

/* Checkout Button */
.wbc-add-to-cart-placeholder-btn {
    padding: var(--wbc-btn-padding, 12px 32px);
    font-family: var(--wbc-font-button), 'Inter', sans-serif;
    font-weight: var(--wbc-font-weight, 700);
    font-size: var(--wbc-btn-font-size, 15px);
    color: var(--wbc-btn-text, #fff);
    background: var(--wbc-btn-background, var(--wbc-primary));
    border: var(--wbc-btn-border-width, 1px) solid var(--wbc-btn-border, var(--wbc-primary));
    border-radius: var(--wbc-btn-radius, 8px);
    cursor: pointer;
    transition: all 0.15s ease;
    height: var(--wbc-btn-height, auto);
}

.wbc-add-to-cart-placeholder-btn:hover:not(:disabled) {
    background: var(--wbc-btn-hover, var(--wbc-primary-hover));
}

.wbc-add-to-cart-placeholder-btn:disabled {
    background: var(--wbc-text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

/* Selected Items Section inside Summary box */
.wbc-selected-items-section {
    margin-top: 24px;
    border-top: 1px solid var(--wbc-border, #e2e8f0);
    padding-top: 16px;
    box-sizing: border-box;
}

.wbc-selected-items-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wbc-text, #1e293b);
    margin: 0 0 12px 0;
}

.wbc-selected-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wbc-selected-item-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.wbc-selected-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.wbc-selected-item-thumbnail img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    background: #e2e8f0;
    border: 1px solid rgba(0,0,0,0.05);
}

.wbc-selected-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wbc-selected-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wbc-text, #1e293b);
}

.wbc-selected-item-qty {
    font-size: 11px;
    color: var(--wbc-text-muted, #64748b);
    font-weight: 500;
}

.wbc-selected-item-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wbc-selected-item-remove-btn:hover {
    color: #ef4444;
}

/* Layout Compact specific styles */
.wbc-selected-item-row.wbc-layout-compact {
    padding: 8px 12px;
}
.wbc-selected-item-row.wbc-layout-compact .wbc-selected-item-thumbnail img {
    width: 36px;
    height: 36px;
}

/* Layout Cards specific styles */
.wbc-selected-item-row.wbc-layout-cards {
    padding: 12px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-left {
    align-items: flex-start;
    gap: 16px;
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-thumbnail img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-info {
    gap: 4px;
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-name {
    font-size: 14px;
    font-weight: 700;
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-variation {
    font-size: 12px;
    color: var(--wbc-text-muted, #64748b);
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-qty-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--wbc-text, #1e293b);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}
.wbc-selected-item-row.wbc-layout-cards .wbc-selected-item-remove-btn {
    align-self: flex-start;
    margin-top: -4px;
}

/* Floating "Added to Bundle" Helper Panel */
.wbc-floating-helper-panel {
    position: fixed;
    z-index: 99999;
    width: var(--wbc-floating-helper-width, 280px);
    max-width: var(--wbc-floating-helper-max-width, 360px);
    height: var(--wbc-floating-helper-height, auto);
    max-height: var(--wbc-floating-helper-max-height, 320px);
    background: var(--wbc-floating-helper-bg-color, var(--wbc-card-bg, #ffffff));
    border: var(--wbc-floating-helper-border-width, 1px) solid var(--wbc-floating-helper-border-color, var(--wbc-border, #e2e8f0));
    border-radius: var(--wbc-floating-helper-radius, var(--wbc-summary-radius, 12px));
    box-shadow: 0 10px 25px var(--wbc-floating-helper-shadow-color, rgba(0,0,0,0.1)), 0 2px 5px rgba(0,0,0,0.05);
    padding: var(--wbc-floating-helper-padding, 16px);
    font-family: inherit;
    box-sizing: border-box;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--wbc-floating-helper-fade-dur, 0.4s) cubic-bezier(0.4, 0, 0.2, 1), 
                transform var(--wbc-floating-helper-slide-dur, 0.4s) cubic-bezier(0.4, 0, 0.2, 1),
                visibility var(--wbc-floating-helper-fade-dur, 0.4s);
}

.wbc-floating-helper-panel.wbc-visible {
    opacity: 1;
    visibility: visible;
}

/* Floating positions */
.wbc-floating-helper-panel.wbc-pos-bottom-left {
    left: var(--wbc-floating-offset-x-dt, 20px);
    bottom: var(--wbc-floating-offset-y-dt, 20px);
    transform: translateY(20px) scale(0.95);
}
.wbc-floating-helper-panel.wbc-pos-bottom-left.wbc-visible {
    transform: translateY(0) scale(1);
}

.wbc-floating-helper-panel.wbc-pos-bottom-right {
    right: var(--wbc-floating-offset-x-dt, 20px);
    bottom: var(--wbc-floating-offset-y-dt, 20px);
    transform: translateY(20px) scale(0.95);
}
.wbc-floating-helper-panel.wbc-pos-bottom-right.wbc-visible {
    transform: translateY(0) scale(1);
}

.wbc-floating-helper-panel.wbc-pos-mobile-bottom {
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    bottom: var(--wbc-floating-offset-mb-bt, 20px);
}
.wbc-floating-helper-panel.wbc-pos-mobile-bottom.wbc-visible {
    transform: translateX(-50%) translateY(0) scale(1);
}

.wbc-floating-helper-panel.wbc-pos-mobile-top {
    left: 50%;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
    top: var(--wbc-floating-offset-mb-tp, 20px);
}
.wbc-floating-helper-panel.wbc-pos-mobile-top.wbc-visible {
    transform: translateX(-50%) translateY(0) scale(1);
}

/* Animation type overrides */
.wbc-floating-helper-panel.wbc-anim-fade {
    transition-property: opacity, visibility;
    transform: none !important;
}
.wbc-floating-helper-panel.wbc-anim-slide {
    transition-property: transform, visibility;
    opacity: 1 !important;
}
.wbc-floating-helper-panel.wbc-anim-slide:not(.wbc-visible) {
    visibility: hidden;
}
.wbc-floating-helper-panel.wbc-anim-fade-slide {
    transition-property: opacity, transform, visibility;
}

/* Internal scroll if content exceeds height */
.wbc-floating-helper-list-wrapper {
    flex: 1;
    overflow-y: var(--wbc-floating-helper-overflow-y, auto);
    margin: 0 0 12px 0;
}

.wbc-floating-helper-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--wbc-floating-helper-item-gap, 8px);
}

.wbc-floating-helper-list li {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wbc-floating-helper-item-bg, transparent);
    border-radius: 6px;
    transition: background 0.15s ease;
    gap: 8px;
    box-sizing: border-box;
}

.wbc-floating-helper-list li:hover {
    background: var(--wbc-floating-helper-item-hover-bg, rgba(0,0,0,0.02));
}

.wbc-floating-helper-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.wbc-floating-helper-item-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wbc-floating-helper-item-thumbnail img {
    width: var(--wbc-floating-helper-img-size, 32px) !important;
    height: var(--wbc-floating-helper-img-size, 32px) !important;
    border-radius: 4px;
    object-fit: cover;
}

.wbc-floating-helper-item-name {
    font-family: inherit;
    font-size: var(--wbc-floating-helper-item-name-size, 13px);
    font-weight: var(--wbc-floating-helper-item-name-weight, 600);
    color: var(--wbc-floating-helper-item-name-color, var(--wbc-text, #1e293b));
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.wbc-floating-helper-variation-text {
    font-size: var(--wbc-floating-helper-variation-size, 11px);
    color: var(--wbc-floating-helper-variation-color, var(--wbc-text-muted, #64748b));
}

.wbc-floating-helper-remove-btn {
    background: none !important;
    border: none !important;
    color: var(--wbc-floating-helper-remove-color, #94a3b8) !important;
    font-size: var(--wbc-floating-helper-remove-size, 20px) !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: color 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    box-shadow: none !important;
}

.wbc-floating-helper-remove-btn:hover {
    color: var(--wbc-floating-helper-remove-hover-color, #ef4444) !important;
    background: none !important;
}

.wbc-floating-helper-title {
    font-size: var(--wbc-floating-helper-heading-size, 14px);
    font-weight: var(--wbc-floating-helper-heading-weight, 700);
    margin: 0 0 10px 0;
    color: var(--wbc-floating-helper-heading-color, var(--wbc-text, #1e293b));
    border-bottom: 1px solid var(--wbc-floating-helper-divider-color, var(--wbc-border, #e2e8f0));
    padding-bottom: 8px;
    flex-shrink: 0;
}

.wbc-floating-helper-title.wbc-complete {
    color: var(--wbc-success, #10b981);
}

.wbc-floating-helper-status {
    font-size: var(--wbc-floating-helper-counter-size, 12px);
    font-weight: 600;
    color: var(--wbc-floating-helper-counter-color, var(--wbc-text-muted, #64748b));
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--wbc-floating-helper-divider-color, var(--wbc-border, #e2e8f0));
    padding-top: 8px;
    flex-shrink: 0;
    margin-top: auto;
}

.wbc-floating-helper-status.wbc-complete-status {
    color: var(--wbc-success, #10b981);
}

@media (max-width: 768px) {
    .wbc-floating-helper-panel {
        width: 90%;
        max-width: 360px;
    }
}
