/* Main Container - Completely Self-Contained */
.washdown-cost-estimator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
}

.washdown-cost-estimator-container * {
    box-sizing: border-box;
}

/* Header Styles - Contained */
.washdown-cost-estimator-header {
    background: linear-gradient(135deg, #096D6D, #07385D) !important;
    border-bottom: 3px solid #1A202C;
}

.washdown-cost-estimator-header-text {
    color: #ffffff !important;
    margin: 0;
    font-weight: 600;
}

/* Card Styles - Contained */
.washdown-cost-estimator-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(7, 56, 93, 0.1);
}

.washdown-cost-estimator-body {
    background: #ffffff;
    color: #1A202C;
    padding: 2rem;
}

/* Text Colors - Only within container */
.washdown-cost-estimator-text-primary {
    color: #096D6D !important;
    font-weight: 600;
}

.washdown-cost-estimator-text-secondary {
    color: #07385D !important;
    font-weight: 600;
}

/* Form Elements - Contained */
.washdown-cost-estimator-label {
    color: #1A202C !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.washdown-cost-estimator-form-text {
    color: #07385D !important;
    font-size: 0.875em;
    opacity: 0.8;
}

.washdown-cost-estimator-select,
.washdown-cost-estimator-input {
    color: #1A202C !important;
    border: 1px solid #dee2e6;
    background: #ffffff;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.95rem;
}

.washdown-cost-estimator-select:focus,
.washdown-cost-estimator-input:focus {
    border-color: #096D6D;
    box-shadow: 0 0 0 0.2rem rgba(9, 109, 109, 0.15);
    outline: none;
}

.washdown-cost-estimator-input-text {
    background-color: #e9ecef;
    color: #1A202C !important;
    border-color: #dee2e6;
    font-weight: 500;
}

/* Button Styles - Contained */
.washdown-cost-estimator-btn-primary {
    background: linear-gradient(135deg, #096D6D, #07385D);
    color: #ffffff !important;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.washdown-cost-estimator-btn-primary:hover {
    background: linear-gradient(135deg, #07385D, #096D6D);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(7, 56, 93, 0.3);
    color: #ffffff !important;
}

.washdown-cost-estimator-btn-primary:active {
    transform: translateY(0);
}

/* Output Panels - Contained */
.washdown-cost-estimator-output-panel {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6 !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.washdown-cost-estimator-output-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 56, 93, 0.15);
}

.washdown-cost-estimator-highlight-panel {
    background: linear-gradient(135deg, #e8f4f8, #d4e9f2) !important;
    border-color: #096D6D !important;
    border-width: 2px !important;
}

.washdown-cost-estimator-output-value {
    background: linear-gradient(45deg, #096D6D, #07385D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #096D6D !important;
    font-weight: 700;
}

.washdown-cost-estimator-output-label {
    color: #07385D !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.washdown-cost-estimator-output-unit {
    color: #6c757d !important;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Border Styles - Contained */
.washdown-cost-estimator-border-end {
    border-right: 2px solid #e9ecef !important;
}

.washdown-cost-estimator-border-bottom {
    border-bottom: 2px solid #e9ecef !important;
}

/* Results Container - Contained */
.washdown-cost-estimator-results {
    background: #ffffff;
    color: #1A202C;
    border-radius: 8px;
}

/* Cost Visualization */
.washdown-cost-estimator-cost-bar {
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.washdown-cost-estimator-cost-fill {
    background: linear-gradient(135deg, #096D6D, #07385D);
    border-radius: 8px;
    transition: all 0.5s ease;
}

.washdown-cost-estimator-savings-fill {
    background: linear-gradient(135deg, #198754, #0d6e3d);
    border-radius: 8px;
    transition: all 0.5s ease;
}

/* Budget Meter - Contained */
.washdown-cost-estimator-budget-bar {
    background: linear-gradient(90deg, #198754 0%, #ffc107 25%, #fd7e14 50%, #dc3545 75%, #6c757d 100%) !important;
    height: 25px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.washdown-cost-estimator-current-budget {
    width: 6px;
    height: 35px;
    top: -5px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-radius: 3px;
    background: #ffffff;
    z-index: 10;
    transition: left 0.5s ease;
}

.washdown-cost-estimator-budget-marker {
    font-size: 10px;
    transform: translateX(-50%);
    top: 5px;
    color: #1A202C !important;
    font-weight: 600;
}

.washdown-cost-estimator-budget-labels span {
    font-size: 11px;
    font-weight: 600;
}

.washdown-cost-estimator-budget-low { color: #198754 !important; }
.washdown-cost-estimator-budget-moderate { color: #ffc107 !important; }
.washdown-cost-estimator-budget-high { color: #fd7e14 !important; }
.washdown-cost-estimator-budget-critical { color: #dc3545 !important; }

/* Badge Styles - Contained */
.washdown-cost-estimator-badge {
    font-size: 0.7em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.washdown-cost-estimator-badge-low {
    background-color: #198754 !important;
    color: #ffffff !important;
}

.washdown-cost-estimator-badge-moderate {
    background-color: #ffc107 !important;
    color: #1A202C !important;
}

.washdown-cost-estimator-badge-high {
    background-color: #fd7e14 !important;
    color: #ffffff !important;
}

.washdown-cost-estimator-badge-critical {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Details Panel - Contained */
.washdown-cost-estimator-details-panel {
    background: #f8f9fa !important;
    color: #1A202C;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.washdown-cost-estimator-recommendations-panel {
    background: #ffffff !important;
    color: #1A202C;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.washdown-cost-estimator-small-text {
    font-size: 0.875em;
    color: #1A202C !important;
    line-height: 1.5;
}

.washdown-cost-estimator-recommendation {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-left: 4px solid #096D6D;
    background-color: #f8f9fa;
    border-radius: 0 6px 6px 0;
    color: #1A202C !important;
    transition: all 0.3s ease;
}

.washdown-cost-estimator-recommendation:hover {
    background-color: #e9ecef;
    transform: translateX(2px);
}

/* Alert Styles - Contained */
.washdown-cost-estimator-alert {
    background-color: #f8e8e8;
    border-color: #f5c6c6;
    color: #1A202C !important;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

.washdown-cost-estimator-alert.alert-info {
    background-color: #e8f4f8;
    border-color: #b8e1f2;
    color: #1A202C !important;
    border-left: 4px solid #096D6D;
}

/* Loading Styles - Contained */
.washdown-cost-estimator-spinner {
    color: #096D6D !important;
    width: 3rem;
    height: 3rem;
}

.washdown-cost-estimator-loading-text {
    color: #07385D !important;
    font-weight: 500;
}

/* Background Elements - Contained */
.washdown-cost-estimator-container .bg-light {
    background-color: #f8f9fa !important;
    color: #1A202C;
    border-radius: 6px;
}

.washdown-cost-estimator-container .bg-white {
    background-color: #ffffff !important;
    color: #1A202C;
    border-radius: 6px;
}

/* Chart Container - Contained */
.washdown-cost-estimator-comparison-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
}

/* Form Section Headers */
.washdown-cost-estimator-container h5,
.washdown-cost-estimator-container h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.washdown-cost-estimator-container h5 {
    color: #07385D !important;
}

.washdown-cost-estimator-container h6 {
    color: #096D6D !important;
}

/* Configuration Container */
.washdown-cost-estimator-configuration-container,
.washdown-cost-estimator-budget-container {
    background: #f8f9fa !important;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Progress Bar Styles */
.washdown-cost-estimator-progress {
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.washdown-cost-estimator-progress-bar {
    background: linear-gradient(135deg, #096D6D, #07385D);
    transition: width 0.5s ease;
}

/* Responsive Design */
@media (max-width: 992px) {
    .washdown-cost-estimator-container {
        padding: 15px;
    }
    
    .washdown-cost-estimator-body {
        padding: 1.5rem;
    }
    
    .washdown-cost-estimator-border-end {
        border-right: none !important;
        border-bottom: 2px solid #e9ecef;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
    
    .washdown-cost-estimator-output-panel {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .washdown-cost-estimator-container {
        padding: 10px;
    }
    
    .washdown-cost-estimator-body {
        padding: 1rem;
    }
    
    .washdown-cost-estimator-btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .washdown-cost-estimator-btn-primary,
    .washdown-cost-estimator-form {
        display: none;
    }
    
    .washdown-cost-estimator-results {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .washdown-cost-estimator-container {
        padding: 0;
        margin: 0;
    }
}

/* Ensure no external style leakage */
.washdown-cost-estimator-container {
    isolation: isolate;
}

/* Custom scrollbar for webkit browsers */
.washdown-cost-estimator-container ::-webkit-scrollbar {
    width: 6px;
}

.washdown-cost-estimator-container ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.washdown-cost-estimator-container ::-webkit-scrollbar-thumb {
    background: #096D6D;
    border-radius: 3px;
}

.washdown-cost-estimator-container ::-webkit-scrollbar-thumb:hover {
    background: #07385D;
}