/* ==========================================================================
   Centrifugal Compressors Module - Specific Styles
   Extends compressors-shared.css for centrifugal-specific components
   ========================================================================== */

/* ==========================================================================
   Performance Curve Diagram Styles
   ========================================================================== */
.performance-curve-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.performance-curve-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.performance-curve-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.curve-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.legend-line {
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

.legend-line.surge { background: #ef4444; }
.legend-line.speed { background: #22c55e; }
.legend-line.power { background: #f59e0b; }
.legend-line.efficiency { background: #3b82f6; }

/* ==========================================================================
   Operating Point Indicator
   ========================================================================== */
.operating-point-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.operating-point-card.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fcd34d;
}

.operating-point-card.danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #f87171;
}

.op-indicator {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.operating-point-card .op-indicator {
    background: #22c55e;
    color: white;
}

.operating-point-card.warning .op-indicator {
    background: #f59e0b;
    color: white;
}

.operating-point-card.danger .op-indicator {
    background: #ef4444;
    color: white;
}

.op-details h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.operating-point-card .op-details h4 { color: #166534; }
.operating-point-card.warning .op-details h4 { color: #92400e; }
.operating-point-card.danger .op-details h4 { color: #991b1b; }

.op-details p {
    font-size: 0.8125rem;
    margin: 0;
}

.operating-point-card .op-details p { color: #15803d; }
.operating-point-card.warning .op-details p { color: #b45309; }
.operating-point-card.danger .op-details p { color: #dc2626; }

/* ==========================================================================
   Surge Margin Indicator
   ========================================================================== */
.surge-margin-bar {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.surge-margin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.surge-margin-header span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.surge-margin-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.surge-margin-value.good { color: #22c55e; }
.surge-margin-value.caution { color: #f59e0b; }
.surge-margin-value.danger { color: #ef4444; }

.surge-bar-track {
    height: 12px;
    background: linear-gradient(to right, #ef4444 0%, #ef4444 10%, #f59e0b 10%, #f59e0b 20%, #22c55e 20%, #22c55e 100%);
    border-radius: 6px;
    position: relative;
}

.surge-bar-indicator {
    position: absolute;
    top: -4px;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid #1e40af;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Speed Lines Cards
   ========================================================================== */
.speed-lines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.speed-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: center;
    transition: all 0.2s;
}

.speed-card.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.speed-card .speed-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.speed-card .speed-label {
    font-size: 0.6875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speed-card .speed-percent {
    font-size: 0.75rem;
    color: #22c55e;
    font-weight: 500;
}

/* ==========================================================================
   Efficiency Contour Display
   ========================================================================== */
.efficiency-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin: 1rem 0;
}

.efficiency-gauge {
    width: 80px;
    height: 80px;
    position: relative;
}

.efficiency-gauge svg {
    transform: rotate(-90deg);
}

.efficiency-gauge circle {
    fill: none;
    stroke-width: 8;
}

.efficiency-gauge .track {
    stroke: #e2e8f0;
}

.efficiency-gauge .progress {
    stroke: #3b82f6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.efficiency-gauge .value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e40af;
}

.efficiency-details h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.efficiency-details p {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}

/* ==========================================================================
   Head/Flow Map Container
   ========================================================================== */
.head-flow-map {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.map-header {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-header h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.map-controls {
    display: flex;
    gap: 0.5rem;
}

.map-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.map-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.map-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.map-canvas {
    background: white;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Compressor Stage Cards
   ========================================================================== */
.stage-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stage-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.stage-card-header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stage-card-header h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.stage-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.stage-card-body {
    padding: 1rem;
}

.stage-row {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.stage-row:last-child {
    border-bottom: none;
}

.stage-row .label {
    font-size: 0.8125rem;
    color: #64748b;
}

.stage-row .value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
}

/* ==========================================================================
   Gas Property Summary
   ========================================================================== */
.gas-property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.gas-property-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: center;
}

.gas-property-card .prop-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.gas-property-card .prop-label {
    font-size: 0.6875rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gas-property-card .prop-unit {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ==========================================================================
   Application Cards (Pipeline, Process, etc.)
   ========================================================================== */
.application-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.application-card {
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.application-card.pipeline {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
}

.application-card.process {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #86efac;
}

.application-card.refrigeration {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border: 1px solid #67e8f9;
}

.application-card h4 {
    font-size: 0.9375rem;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.application-card.pipeline h4 { color: #1e40af; }
.application-card.process h4 { color: #166534; }
.application-card.refrigeration h4 { color: #0e7490; }

.application-badge {
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: white;
}

.application-card.pipeline .application-badge { background: #3b82f6; }
.application-card.process .application-badge { background: #22c55e; }
.application-card.refrigeration .application-badge { background: #06b6d4; }

.application-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
}

.application-card.pipeline ul { color: #1e40af; }
.application-card.process ul { color: #166534; }
.application-card.refrigeration ul { color: #0e7490; }

.application-card a {
    font-weight: 500;
    text-decoration: none;
}

.application-card.pipeline a { color: #2563eb; }
.application-card.process a { color: #15803d; }
.application-card.refrigeration a { color: #0891b2; }

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .speed-lines-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stage-cards-grid {
        grid-template-columns: 1fr;
    }

    .gas-property-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .efficiency-display {
        flex-direction: column;
        text-align: center;
    }

    .application-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .speed-lines-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gas-property-grid {
        grid-template-columns: 1fr;
    }
}
