/* Only apply styles to bundles within the solution-builder */
#solution-builder .stepped-bundle-container {
    margin-bottom: 30px;
}

#solution-builder .stepped-bundle-progress {
    margin-bottom: 20px;
}

#solution-builder .progress-bar {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

#solution-builder .progress-fill {
    height: 100%;
    background-color: #A11F1D;
    width: 0;
    transition: width 0.3s ease;
}

/* Step titles in progress area */
#solution-builder .progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

#solution-builder .progress-step-item {
    display: flex;
    align-items: flex-start;
    flex: 1;
    min-width: 140px;
    min-height: 50px;
    padding: 12px 16px;
    border-radius: 25px;
    background-color: #f5f5f5;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
    justify-content: flex-start;
}

#solution-builder .progress-step-item.active {
    background-color: #A11F1D;
    color: white;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(161, 31, 29, 0.3);
}

#solution-builder .progress-step-item.completed {
    background-color: #28a745;
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

#solution-builder .progress-step-item .step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    color: inherit;
    line-height: 24px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    margin-top: 2px;
    text-align: center;
    flex-shrink: 0;
}

#solution-builder .progress-step-item.active .step-number {
    background-color: rgba(255, 255, 255, 0.9);
    color: #A11F1D;
}

#solution-builder .progress-step-item.completed .step-number {
    background-color: rgba(255, 255, 255, 0.9);
    color: #28a745;
}

#solution-builder .progress-step-item .step-title-text {
    flex: 1;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Responsive adjustments for progress steps */
@media (max-width: 768px) {
    #solution-builder .progress-steps {
        flex-direction: column;
        gap: 5px;
    }
    
    #solution-builder .progress-step-item {
        min-width: auto;
        justify-content: flex-start;
    }
    
    #solution-builder .progress-step-item .step-title-text {
        white-space: normal;
        text-overflow: initial;
        overflow: visible;
    }
}

#solution-builder .step-counter {
    font-size: 14px;
    text-align: right;
    margin-top: 10px;
}

#solution-builder .bundle-step {
    display: none;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 20px;
}

#solution-builder .bundle-step.active {
    display: block;
}

#solution-builder .step-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

#solution-builder .step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#solution-builder .bundle-summary {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

#solution-builder .bundle-selections {
    margin: 15px 0;
}

#solution-builder .bundle-selection-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

#solution-builder .bundle-selection-item:last-child {
    border-bottom: none;
}

/* Hide the original bundle form when in stepped mode */
#solution-builder.stepped-mode .bundle_form > .bundled_product_summary {
    display: none !important;
}

/* Error highlighting */
#solution-builder .error {
    border: 1px solid #A11F1D !important;
    background-color: rgba(255, 0, 0, 0.05);
}

/* Optional control styling */
#solution-builder .optional-control {
    margin-bottom: 15px;
    font-weight: bold;
    padding: 10px;
    background-color: #f7f7f7;
    border-radius: 4px;
}

#solution-builder .quantity.disabled {
    opacity: 0.5;
    pointer-events: none;
}

#solution-builder .bundle-step .quantity {
    display: block !important;
    margin-top: 10px;
}

#solution-builder .bundled_item_qty_container {
    display: block !important;
}

/* Two-column layout for step content and overview */
#solution-builder .step-layout {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 20px;
    width: 100%;
    box-sizing: border-box;
}

#solution-builder .step-content-column {
    flex: 1;
    min-width: 60%;
    padding: 0 15px;
    box-sizing: border-box;
}

#solution-builder .step-overview-column {
    flex: 0 0 35%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Style the product overview section */
#solution-builder .solution-overview {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 2rem;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

#solution-builder .solution-overview h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

#solution-builder .overview-content {
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive layout */
@media (max-width: 768px) {
    #solution-builder .step-content-column,
    #solution-builder .step-overview-column {
        flex: 0 0 100%;
    }
    
    #solution-builder .step-overview-column {
        margin-top: 20px;
    }
}

/* Bundle summary table styles */
.bundle-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.bundle-summary-table th,
.bundle-summary-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.bundle-summary-table th {
    background-color: #f7f7f7;
    font-weight: 600;
    text-align: left;
}

.bundle-summary-table .variation-details {
    color: #666;
    font-style: italic;
}

.bundle-summary-table .subtotal-row td,
.bundle-summary-table .total-row td {
    border-top: 2px solid #333;
    font-size: 1.1em;
    padding-top: 15px;
}

.bundle-summary-table .total-row td {
    font-size: 1.2em;
    color: #333;
}

.subscription-indicator {
    color: #666;
    font-style: italic;
}

.one-time-subtotal-row td,
.subscription-subtotal-row td {
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.total-row td {
    border-top: 2px solid #333;
    padding-top: 15px;
}