/* FDWR Visual Card Styling */
.fdwr-visual-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.fdwr-visual-card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.fdwr-visual-card .card-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    border: none;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.fdwr-visual-card .card-header:hover {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
}

.fdwr-visual-card .transition-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fdwr-visual-card .card-body {
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
}

/* Ratio Display Card */
.ratio-display-card {
    background: white;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.ratio-display-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.15) !important;
}

/* Visual Chart */
.visual-chart-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.fdwr-visual-chart {
    position: relative;
    height: 180px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-top: 1rem;
    overflow: hidden;
}

.chart-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
        rgba(39, 174, 96, 0.1) 0%, 
        rgba(39, 174, 96, 0.1) 40%, 
        rgba(243, 156, 18, 0.1) 40%, 
        rgba(243, 156, 18, 0.1) 60%, 
        rgba(231, 76, 60, 0.1) 60%, 
        rgba(231, 76, 60, 0.1) 100%);
}

.compliance-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    opacity: 0.15;
}

.compliant-zone {
    left: 0;
    width: 40%;
    background: #27ae60;
}

.warning-zone {
    left: 40%;
    width: 20%;
    background: #f39c12;
}

.danger-zone {
    left: 60%;
    width: 40%;
    background: #e74c3c;
}

.current-value-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-line {
    position: absolute;
    top: 0;
    bottom: 40px;
    left: 50%;
    width: 2px;
    background: #2c3e50;
}

.indicator-circle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
}

.indicator-circle:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
}

.indicator-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.limit-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
}

.marker-line {
    position: absolute;
    top: 0;
    bottom: 60px;
    left: 50%;
    width: 2px;
    background: #2c3e50;
    opacity: 0.7;
}

.marker-label {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #2c3e50;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.warning-marker .marker-line {
    background: #f39c12;
}

.chart-scale {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.scale-label {
    position: absolute;
    bottom: -25px;
    transform: translateX(-50%);
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Legend and Cards */
.legend-card, .details-card, .insight-card {
    background: white;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.legend-card:hover, .details-card:hover, .insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.compliant-color {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.warning-color {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
}

.danger-color {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.input-display {
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.input-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 5px;
}

.formula-display {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #2c3e50;
    border: 1px dashed #3498db;
    background: linear-gradient(to right, #f8fafc, #ffffff);
}

/* Progress bar styling */
.progress {
    border-radius: 10px;
    background: #e0e0e0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fdwr-visual-chart {
        height: 150px;
        padding: 15px;
    }
    
    .indicator-circle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .indicator-label {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
}

/* FDWR Validation Styles */
.fdwr-display {
    border-radius: 8px;
    border-left: 3px solid var(--neutral-border);
    transition: all 0.3s ease;
}

.fdwr-display.alert-success {
    border-left-color: var(--success-color);
    background: linear-gradient(to right, rgba(39, 174, 96, 0.1), white);
}

.fdwr-display.alert-warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(to right, rgba(243, 156, 18, 0.1), white);
}

.fdwr-display.alert-danger {
    border-left-color: var(--danger-color);
    background: linear-gradient(to right, rgba(231, 76, 60, 0.1), white);
}

.fdwr-display .progress {
    height: 6px;
    border-radius: 3px;
    background-color: var(--neutral-mid);
}

.fdwr-display .progress-bar {
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

/* Validation input styling */
.is-invalid {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25) !important;
}

.is-valid {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.25) !important;
}

/* Input group styling for validation */
.input-group .is-invalid {
    border-right-color: var(--danger-color) !important;
}

.input-group .is-valid {
    border-right-color: var(--success-color) !important;
}

.bg-light-yellow {
    background-color: #fff9c4 !important;
}

/* Air leakage validation styling */
.air-leakage-input.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.air-leakage-input.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}