/* AntennaLengthCalculator.css
 * 天線長度計算器專用樣式
 * 建立日期: 2025-11-27
 *
 * ⚠️ 注意：此檔案只包含計算器專用樣式
 * 全域樣式 (glass-card, form-input, btn-custom 等) 請使用 layout.css
 */

/* ==================== 快速頻率選擇按鈕 ==================== */
.freq-preset-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.freq-preset-btn {
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 20px;
    background: white;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.freq-preset-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.freq-preset-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==================== 天線示意圖容器 ==================== */
.antenna-visual-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.antenna-diagram {
    width: 100%;
    max-width: 300px;
}

.antenna-diagram svg {
    width: 100%;
    height: auto;
}

.diagram-label {
    font-size: 0.85rem;
    fill: #666;
    font-family: 'Roboto Mono', monospace;
}

.diagram-dimension {
    font-size: 0.9rem;
    fill: #667eea;
    font-weight: 600;
}

/* ==================== 結果顯示區域 ==================== */
.antenna-result-main {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 15px;
}

.antenna-result-main .result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.antenna-result-main .result-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.antenna-result-main .result-unit {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-left: 5px;
}

.antenna-result-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.result-detail-item {
    background: rgba(102, 126, 234, 0.08);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.result-detail-item .detail-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
}

.result-detail-item .detail-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
}

/* 偶極天線專用：每臂長度顯示 */
.arm-length-display {
    display: none;
}

.arm-length-display.show {
    display: block;
}

/* ==================== 參考表 ==================== */
.freq-reference-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.freq-reference-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
}

.freq-reference-table th:first-child {
    border-radius: 8px 0 0 0;
}

.freq-reference-table th:last-child {
    border-radius: 0 8px 0 0;
}

.freq-reference-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.freq-reference-table tr:hover td {
    background-color: rgba(102, 126, 234, 0.05);
}

.freq-reference-table tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.freq-reference-table tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

.freq-reference-table .clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.freq-reference-table .clickable-row:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

/* ==================== 提示訊息 ==================== */
.antenna-tip {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 12px 15px;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: #92400e;
    margin-top: 15px;
}

.antenna-tip.info {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    color: #4338ca;
}

/* ==================== 輸入群組標籤 ==================== */
.input-group-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    display: block;
}

.input-with-unit {
    display: flex;
    gap: 10px;
}

.input-with-unit .frequency-input {
    flex: 2;
}

.input-with-unit .unit-select {
    flex: 1;
    min-width: 80px;
}

/* ==================== 響應式設計 ==================== */
@media (max-width: 991px) {
    .antenna-result-detail {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .freq-preset-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .antenna-result-main .result-value {
        font-size: 2rem;
    }

    .antenna-result-detail {
        grid-template-columns: 1fr;
    }

    .freq-reference-table {
        font-size: 0.8rem;
    }

    .freq-reference-table th,
    .freq-reference-table td {
        padding: 8px 5px;
    }

    /* 表格水平捲動 */
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .antenna-visual-container {
        min-height: 150px;
        padding: 15px;
    }
}

@media (max-width: 575px) {
    .freq-preset-container {
        gap: 6px;
    }

    .freq-preset-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .input-with-unit {
        flex-direction: column;
    }

    .input-with-unit .frequency-input,
    .input-with-unit .unit-select {
        flex: 1;
        width: 100%;
    }
}
