/* CalWhat Calculator Platform - PipeSizeCalculator Specific Styles */
/* This file contains calculator-specific styles */




        .input-group-custom {
            margin-bottom: 12px;
        }

        .input-label {
            font-weight: 500;
            color: #4a5568;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            position: relative;
        }

        .tooltip-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #667eea;
            color: white;
            font-size: 0.7rem;
            cursor: help;
            margin-left: 5px;
            position: relative;
        }

            .tooltip-icon:hover .tooltip-text {
                visibility: visible;
                opacity: 1;
            }

        .tooltip-text {
            visibility: hidden;
            opacity: 0;
            position: absolute;
            z-index: 1000;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            background-color: #2d3748;
            color: white;
            text-align: center;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 0.85rem;
            white-space: nowrap;
            transition: opacity 0.3s;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            font-weight: 400;
            min-width: 200px;
        }

            .tooltip-text::after {
                content: "";
                position: absolute;
                top: 100%;
                left: 50%;
                margin-left: -5px;
                border-width: 5px;
                border-style: solid;
                border-color: #2d3748 transparent transparent transparent;
            }

        .input-wrapper {
            position: relative;
        }

        .form-input, .form-select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #48bb78;
            border-radius: 12px;
            font-size: 1rem;
            font-family: 'Roboto Mono', monospace;
            transition: all 0.3s ease;
            background: #f0fff4;
        }

            .form-input:focus, .form-select:focus {
                outline: none;
                border-color: #38a169;
                box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
                transform: translateY(-2px);
            }

        .input-range {
            font-size: 0.85rem;
            color: #718096;
            margin-top: 4px;
        }

        .result-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            padding: 30px;
            color: white;
            text-align: center;
            margin-bottom: 20px;
            box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
        }

        .result-label {
            font-size: 1rem;
            font-weight: 500;
            margin-bottom: 10px;
            opacity: 0.9;
        }

        .result-value {
            font-family: 'Roboto Mono', monospace;
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 30px;
            animation: pulse 0.5s ease;
        }

        .result-details {
            background: #f7fafc;
            padding: 20px;
            border-radius: 12px;
            margin-top: 20px;
        }

        .result-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #e2e8f0;
        }

            .result-item:last-child {
                border-bottom: none;
            }

        .result-item-label {
            font-size: 0.95rem;
            color: #4a5568;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .result-item-value {
            font-family: 'Roboto Mono', monospace;
            font-weight: 600;
            color: #2d3748;
            font-size: 1.1rem;
        }

        .status-badge {
            display: inline-block;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            margin-left: 8px;
        }

        .status-optimal {
            background: #c6f6d5;
            color: #22543d;
        }

        .status-warning {
            background: #fef3c7;
            color: #78350f;
        }

        .status-danger {
            background: #fecaca;
            color: #7f1d1d;
        }

        .chart-container {
            position: relative;
            height: 300px;
            margin: 20px 0;
        }


        .spinner {
            display: none;
        }

            .spinner.active {
                display: inline-block;
            }

        .warning-box {
            background: #fef3c7;
            border-left: 4px solid #f59e0b;
            padding: 15px 20px;
            border-radius: 8px;
            margin-top: 20px;
        }

            .warning-box h4 {
                color: #92400e;
                font-size: 1.1rem;
                margin-bottom: 10px;
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .warning-box ul {
                margin: 0;
                padding-left: 20px;
            }

            .warning-box li {
                color: #78350f;
                margin-bottom: 8px;
                line-height: 1.6;
            }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        @media (max-width: 992px) {
            .page-header h1 {
                font-size: 2.5rem;
            }
        }

        @media (max-width: 768px) {
            .page-header h1 {
                font-size: 2rem;
            }

            .result-value {
                font-size: 2rem;
            }

            .glass-card {
                padding: 20px;
            }

            .btn-custom {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .page-header h1 {
                font-size: 1.5rem;
            }

            .main-container {
                padding: 0 10px;
            }
        }

        /* 模式切換按鈕 */
        .mode-selector {
            display: flex;
            justify-content: center;
            gap: 0;
            margin: 30px auto 40px;
            max-width: 600px;
            background: white;
            border-radius: 15px;
            padding: 8px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        }

        .mode-btn {
            flex: 1;
            padding: 15px 20px;
            background: transparent;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            color: #718096;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            position: relative;
        }

            .mode-btn i {
                font-size: 1.5rem;
                transition: all 0.3s ease;
            }

            .mode-btn .mode-desc {
                font-size: 0.75rem;
                font-weight: 400;
                opacity: 0.7;
            }

            .mode-btn:hover {
                color: #667eea;
                transform: translateY(-2px);
            }

            .mode-btn.active {
                background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
                color: white;
                box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
            }

                .mode-btn.active i {
                    transform: scale(1.1);
                }

                .mode-btn.active .mode-desc {
                    opacity: 1;
                }

        /* 問題診斷卡片樣式 */
        .card {
            transition: all 0.3s ease;
        }

            .card:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
            }

        /* 配管示意圖樣式 */
        .piping-diagram {
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            font-family: 'Courier New', Consolas, monospace;
            font-size: 14px;
            line-height: 1.5;
            overflow-x: auto;
            white-space: pre;
        }

            .piping-diagram .main-pipe {
                color: #2563eb;
                font-weight: bold;
            }

            .piping-diagram .branch-pipe {
                color: #059669;
            }

            .piping-diagram .fixture {
                color: #7c3aed;
            }

            .piping-diagram .label {
                color: #dc2626;
                font-weight: bold;
            }

        /* 錯誤警示樣式 */
        .error-warning {
            background: #fef2f2;
            border-left: 4px solid #dc2626;
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 10px;
            animation: slideIn 0.3s ease;
        }

            .error-warning .warning-title {
                color: #991b1b;
                font-weight: 600;
                margin-bottom: 5px;
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .error-warning .warning-content {
                color: #7f1d1d;
                font-size: 0.95rem;
                line-height: 1.5;
            }

            .error-warning.warning-level {
                background: #fffbeb;
                border-left-color: #f59e0b;
            }

                .error-warning.warning-level .warning-title {
                    color: #92400e;
                }

                .error-warning.warning-level .warning-content {
                    color: #78350f;
                }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-10px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }