/**
 * 攻牙底孔計算器 (Tap Drill Size Calculator) - 專屬樣式
 *
 * ⚠️ 注意：本檔案只定義計算器特有的樣式
 * 全域類別 (.glass-card, .form-input, .btn-custom 等) 已在 layout.css 定義
 * 請勿在此重新定義全域類別
 */

/* 信心等級指示器 */
.confidence-indicator {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.confidence-high {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.15) 100%);
    color: #276749;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.confidence-medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.confidence-low {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* 主要推薦鑽頭顯示 */
.drill-recommendation {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 16px;
    margin-bottom: 20px;
}

.drill-recommendation .main-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.drill-recommendation .sub-value {
    font-size: 1.1rem;
    color: #718096;
    margin-top: 5px;
}

/* 結果項目 */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-size: 0.95rem;
    color: #4a5568;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    font-family: 'Roboto Mono', monospace;
}

/* 公式顯示區 */
.formula-display {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

/* 材料建議提示 */
.material-tip {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1) 0%, rgba(56, 161, 105, 0.1) 100%);
    border-left: 4px solid #48bb78;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #276749;
}

.material-tip::before {
    content: "\f0eb";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

/* 螺紋規格詳情 */
.thread-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.thread-detail-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.thread-detail-item .label {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 4px;
}

.thread-detail-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    font-family: 'Roboto Mono', monospace;
}

/* 圖表容器 */
.chart-container {
    height: 200px;
    margin-top: 15px;
}

/* 手動輸入區塊 */
.manual-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 輸入群組標籤 */
.input-group-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

/* Tooltip 圖示 */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 0.7rem;
    color: #718096;
    cursor: help;
    margin-left: 5px;
}

/* 錯誤區塊 */
.error-section {
    text-align: center;
    padding: 40px 20px;
    color: #e53e3e;
}

.error-section i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .drill-recommendation .main-value {
        font-size: 2.5rem;
    }

    .manual-input-group {
        grid-template-columns: 1fr;
    }

    .thread-details {
        grid-template-columns: 1fr 1fr;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .result-value {
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .drill-recommendation .main-value {
        font-size: 2rem;
    }

    .thread-details {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 180px;
    }
}
