/* RO Desalination Calculator Styles */
.ro-calculator-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

.ro-calculator-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ro-calculator-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.ro-calculator-header p {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    opacity: 0.95;
}

.status-indicator {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.status-indicator.calculating {
    background: rgba(255, 255, 255, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ro-calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ro-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ro-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.section-icon {
    width: 24px;
    height: 24px;
    color: #667eea;
}

.ro-section-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: #1f2937;
}

/* Input Section */
.ro-input-section {
    grid-column: 1;
}

.ro-input-group {
    margin-bottom: 20px;
}

.ro-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95em;
}

.ro-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ro-input-wrapper input,
.ro-input-group input[type="number"],
.ro-input-group select {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.ro-input-wrapper input:focus,
.ro-input-group input:focus,
.ro-input-group select:focus {
    outline: none;
    border-color: #667eea;
}

.unit {
    color: #6b7280;
    font-size: 0.9em;
    min-width: 60px;
}

.ro-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ro-slider-wrapper input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.ro-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.ro-slider-wrapper input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 60px;
    text-align: right;
    font-weight: 600;
    color: #667eea;
}

/* Results Section */
.ro-results-section {
    grid-column: 2;
}

.ro-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.ro-result-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-label {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    font-size: 1.3em;
    font-weight: 700;
    color: #1f2937;
}

/* Visualization Section */
.ro-visualization-section {
    grid-column: 1 / -1;
}

.ro-visualization-container {
    margin-top: 20px;
}

.ro-flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 30px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.flow-item {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 150px;
}

.flow-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.flow-value {
    font-size: 1.1em;
    color: #667eea;
    font-weight: 700;
}

.flow-arrow {
    font-size: 2em;
    color: #667eea;
    font-weight: bold;
}

.flow-split {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flow-branch {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Membrane Section */
.ro-membrane-section {
    grid-column: 1 / -1;
}

.ro-membrane-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ro-membrane-card {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.ro-membrane-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.membrane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.membrane-name {
    font-size: 1.2em;
    font-weight: 700;
    color: #1f2937;
}

.membrane-manufacturer {
    color: #6b7280;
    font-size: 0.9em;
}

.membrane-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-percentage {
    padding: 5px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

.membrane-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #059669;
}

.membrane-specs {
    margin-bottom: 15px;
}

.membrane-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9em;
}

.membrane-spec-label {
    color: #6b7280;
}

.membrane-spec-value {
    font-weight: 600;
    color: #1f2937;
}

.membrane-features {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

.membrane-features strong {
    color: #374151;
    display: block;
    margin-bottom: 5px;
}

.membrane-features {
    color: #6b7280;
    font-size: 0.9em;
}

/* Charts Section */
.ro-charts-section {
    grid-column: 1 / -1;
}

.ro-tab-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.ro-tab-button {
    padding: 10px 20px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
}

.ro-tab-button:hover {
    border-color: #667eea;
    color: #667eea;
}

.ro-tab-button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.ro-chart-container {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    min-height: 300px;
}

/* Energy Section */
.ro-energy-section {
    grid-column: 1 / -1;
}

.ro-energy-chart {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    min-height: 300px;
}

/* Export Section */
.ro-export-section {
    grid-column: 1 / -1;
    text-align: center;
}

.ro-export-section p {
    color: #6b7280;
    margin-bottom: 20px;
}

.ro-export-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.ro-export-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ro-export-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.ro-calculator-footer {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

#calculatingIndicator {
    font-style: italic;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ro-calculator-content {
        grid-template-columns: 1fr;
    }
    
    .ro-results-section {
        grid-column: 1;
    }
    
    .ro-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ro-calculator-header h1 {
        font-size: 2em;
    }
    
    .ro-flow-diagram {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .ro-export-buttons {
        flex-direction: column;
    }
    
    .ro-export-btn {
        width: 100%;
    }
}

