/* CalWhat Calculator Platform - WireGaugeCalculator Specific Styles */
/* This file contains calculator-specific styles */


    /* 模式切換按鈕 */
    .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;
            }

  

    .input-group-custom {
        margin-bottom: 25px;
    }

    .input-label {
        font-weight: 500;
        color: #4a5568;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
        position: relative;
    }

        .input-label i {
            color: #667eea;
            font-size: 0.9rem;
        }

    .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-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;
        white-space: normal;
    }

        .tooltip-text::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #2d3748;
        }

    .tooltip-icon:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

    .form-input {
        width: 100%;
        padding: 12px 15px;
        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 {
            outline: none;
            border-color: #38a169;
            box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
            transform: translateY(-2px);
        }

    .form-select {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #48bb78;
        border-radius: 12px;
        font-size: 1rem;
        background: #f0fff4;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .form-select:focus {
            outline: none;
            border-color: #38a169;
            box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.2);
        }

    .input-range {
        font-size: 0.85rem;
        color: #718096;
        margin-top: 5px;
    }

    /* 三種模式控制 */

    /*
    欄位分類:
    - 無 class: 基本欄位(所有模式都顯示) - 電流、長度、電壓
    - .quick-only: 快速和完整模式顯示 - 設備範本、功率/電流切換、功率輸入
    - .complete-only: 只在完整模式顯示 - 電壓降、配線方式、溫度、線數
    */

    /* 簡易模式: 隱藏 quick-only 和 complete-only */
    .basic-mode .quick-only,
    .basic-mode .complete-only {
        display: none !important;
    }

    /* 快速(情境)模式: 顯示 quick-only,隱藏 complete-only */
    .quick-mode .complete-only {
        display: none !important;
    }

    /* 完整模式: 顯示所有欄位(無需隱藏任何內容) */

    .quick-only,
    .complete-only {
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .result-card {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border-radius: 20px;
        padding: 30px;
        margin-bottom: 25px;
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    }

    .result-label {
        font-size: 1rem;
        opacity: 0.9;
        margin-bottom: 10px;
    }

    .result-value {
        font-family: 'Roboto Mono', monospace;
        font-size: 3rem;
        font-weight: 700;
        margin-bottom: 5px;
        animation: pulse 0.5s ease;
    }

    .result-unit {
        font-size: 1.5rem;
        opacity: 0.8;
    }

    .result-details {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 15px;
        margin-top: 20px;
    }

    .result-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

        .result-item:last-child {
            border-bottom: none;
        }

    .result-item-label {
        font-size: 0.95rem;
        opacity: 0.9;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .result-item-value {
        font-family: 'Roboto Mono', monospace;
        font-weight: 600;
        font-size: 1.2rem;
    }

    .warning-box {
        background: #fff3cd;
        border-left: 4px solid #ffc107;
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 25px;
    }

        .warning-box h3 {
            color: #856404;
            font-size: 1.1rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .warning-box ul {
            list-style: none;
            padding-left: 0;
        }

            .warning-box ul li {
                color: #856404;
                padding: 8px 0;
                display: flex;
                align-items: flex-start;
                gap: 10px;
            }

                .warning-box ul li:before {
                    content: '⚠️';
                    flex-shrink: 0;
                }

    .spec-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

        .spec-table th,
        .spec-table td {
            padding: 12px;
            text-align: center;
            border: 1px solid #e2e8f0;
        }

        .spec-table th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-weight: 600;
        }

        .spec-table tbody tr:nth-child(even) {
            background: #f7fafc;
        }

        .spec-table tbody tr:hover {
            background: #edf2f7;
        }

        .spec-table .highlight {
            background: #fef5e7 !important;
            font-weight: 600;
            color: #667eea;
        }

        .spec-table .highlight-cell {
            background: #d4edda !important;
            font-weight: 700;
            color: #155724;
            border: 2px solid #28a745 !important;
        }


    .spinner {
        display: none;
    }

    .spinner-border {
        width: 1rem;
        height: 1rem;
        border: 2px solid currentColor;
        border-right-color: transparent;
        border-radius: 50%;
        animation: spinner-border 0.75s linear infinite;
    }

    @keyframes spinner-border {
        to {
            transform: rotate(360deg);
        }
    }

    @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: 768px) {
        .page-header h1 {
            font-size: 2rem;
        }

        .result-value {
            font-size: 2rem;
        }

        .glass-card {
            padding: 20px;
        }

        .spec-table {
            font-size: 0.85rem;
        }

            .spec-table th,
            .spec-table td {
                padding: 8px 4px;
            }

        /* 模式選擇器響應式 */
        .mode-selector {
            max-width: 100%;
            padding: 6px;
        }

        .mode-btn {
            padding: 12px 10px;
            font-size: 0.9rem;
        }

            .mode-btn i {
                font-size: 1.2rem;
            }

            .mode-btn .mode-desc {
                font-size: 0.7rem;
            }
    }