/* BPO Calculator Styles - UPDATED: White background wrapper, dark cards */
.bpo-calculator-wrapper {
    /*font-family: system-ui, -apple-system, sans-serif;*/
    margin-top: 0;
}

@media (min-width: 768px) {
    .bpo-calculator-wrapper {
        padding: 0;
        width: 100%;
    }
}

.bpo-calculator-container {
    background-color: transparent;
    padding: 0;
}

/* Calculator Description Styles */
.bpo-calculator-description {
    font-size: 1rem;
    color: #3b3b3b;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background-color: rgba(180, 180, 180, 0.25);
}

.bpo-calculator-description p {
    margin-bottom: 0;
}

.bpo-calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 2rem;
}


@media (max-width: 768px) {
    .bpo-calculator-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .bpo-calculator-description {
        border-radius: 0.5rem;
    }

    .bpo-toggle-group {
        margin-left: 0; /* Reset */
        align-self: flex-end; /* Push to right side */
    }

}

/* Toggle buttons - DARK BACKGROUND */
.bpo-toggle-container {
    display: flex;
    justify-content: flex-end; /* Aligns children to the right */
}

.bpo-toggle-container .bpo-toggle-group {
    margin-left: 0; /* Remove auto margin if using container */
}

.bpo-toggle-group {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background-color: #3b3b3b;
    border: 1px solid #555555;
    padding: 0.125rem;
    font-size: 0.75rem;
    margin-left: auto; /* Pushes to the right */
}

.bpo-toggle-btn {
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-weight: 500;
    font-size: 0.75rem;
}

.bpo-toggle-btn.active {
    background-color: #E25F07;
    color: white;
}

.bpo-toggle-btn.inactive {
    color: #b0b0b0;
    background: transparent;
}

.bpo-toggle-btn:hover {
    opacity: 0.9;
}

/* Card styles - DARK BACKGROUND */
.bpo-card {
    background-color: #3b3b3b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

@media (min-width: 768px) {
    .bpo-card {
        padding: 2rem 2rem 1rem;
    }
}

/* Assumptions section header */
.bpo-assumptions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #555555;
}

.bpo-assumptions-header span:first-child {
    font-weight: 600;
    color: #ffffff;
}

/* Slider container */
.bpo-slider-container {
    margin-bottom: 1rem;
    position: relative;
}

.bpo-slider-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0rem;
}

.bpo-slider-label span {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
}

.bpo-slider-value {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #E25F07 !important;
}

/* UPDATED SLIDER - ORANGE FILL, WHITE TRACK */
.bpo-slider {
    width: 100%;
    height: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #E25F07 var(--fill-percent, 0%), #f0f0f0 var(--fill-percent, 0%));
    border-radius: 0.5rem;
    outline: none;
    border: 1px solid #ddd;
    position: relative;
    transition: background 0.3s ease;
}

/* Webkit browsers */
.bpo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 3px solid #E25F07;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    transition: all 0.2s;
}

.bpo-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

/* Firefox */
.bpo-slider::-moz-range-thumb {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 3px solid #E25F07;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.bpo-slider::-moz-range-track {
    background: #f0f0f0;
    border-radius: 0.5rem;
    height: 0.5rem;
}

.bpo-slider::-moz-range-progress {
    background: #E25F07;
    border-radius: 0.5rem;
    height: 0.5rem;
}

.bpo-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a0a0a0;
    margin-top: 0rem;
    padding: 0 0.25rem;
}

/* Results grid */
.bpo-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    font-size: 0.75rem;
    margin: 1.75rem 0;
}

/* Cost boxes */
.bpo-cost-box {
    border-radius: 0.75rem;
    border: 1px solid #e0e0e0;
    background-color: #3b3b3b;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.bpo-cost-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #a0a0a0;
    margin-bottom: 0.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.bpo-cost-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

@media (min-width: 768px) {
    .bpo-cost-value {
        font-size: 1.5rem;
    }
}

.bpo-cost-suffix {
    margin-left: 0.125rem;
    font-size: 0.85rem;
    color: #a0a0a0;
    font-weight: 500;
}

/* Offshore box */
.bpo-offshore-box {
    border-color: #E25F07;
    background-color: rgba(226, 95, 7, 0.08);
    box-shadow: 0 4px 12px rgba(226, 95, 7, 0.25),
                0 0 0 1px rgba(226, 95, 7, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.bpo-offshore-label {
    color: #E25F07;
    font-weight: 700;
}

.bpo-offshore-value {
    color: #FF8C42;
    font-weight: 700;
}

.bpo-offshore-suffix {
    color: rgba(255, 140, 66, 0.9);
}

/* Progress bar */
.bpo-progress-container {
    margin-bottom: 1.25rem;
}

.bpo-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.bpo-progress-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.bpo-progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E25F07;
}

.bpo-progress-bar {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #555555;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid #666;
}

.bpo-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(to right, #E25F07, #FF8C42);
    box-shadow: 0 1px 3px rgba(226, 95, 7, 0.4);
    transition: width 0.3s ease;
}

/* Savings box */
.bpo-savings-box {
    border-radius: 0.75rem;
    border: 1px solid #E25F07;
    background: linear-gradient(to right, 
        rgba(226, 95, 7, 0.15), 
        rgba(226, 95, 7, 0.08), 
        rgba(59, 59, 59, 0.9));
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    box-shadow: 0 4px 8px rgba(226, 95, 7, 0.15);
}

.bpo-savings-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #FF8C42;
    margin-bottom: 0.125rem;
    font-weight: 700;
}

.bpo-savings-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FF8C42;
}

@media (min-width: 768px) {
    .bpo-savings-value {
        font-size: 1.5rem;
    }
}

.bpo-savings-text {
    font-size: 0.75rem;
    color: rgba(255, 140, 66, 0.9);
    text-align: right;
    max-width: 9rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Layout grid */
.bpo-main-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .bpo-main-grid {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        gap: 1rem;
    }
}

/* Additional responsive adjustments */
@media (max-width: 767px) {
    .bpo-results-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .bpo-savings-box {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .bpo-savings-text {
        max-width: 100%;
        text-align: center;
    }
    
    .bpo-main-grid {
        gap: 1rem;
    }

    .bpo-assumptions-header span{
        font-size: 0.75rem;
    }
}

/* White background adjustment */
.bpo-calculator-wrapper .bpo-slider-labels,
.bpo-calculator-wrapper .bpo-assumptions-header span:not(:first-child) {
    color: #ffffff;
}