/* ==============================================
   CaseConverter.css - 變數命名轉換器專屬樣式

   ⚠️ 注意：此檔案僅定義計算器專屬樣式
   全域樣式已定義於 layout.css，請勿重複定義：
   - .glass-card, .form-input, .btn-custom, .btn-sponsor 等

   Source: Case naming conventions verified via
   - Google TypeScript Style Guide
   - Microsoft C# Naming Guidelines
   Verified: 2025-11-28
   ============================================== */

/* ==============================================
   輸入區域樣式
   ============================================== */

/* 多行輸入框 */
.case-input-textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 輸入提示文字 */
.case-input-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 8px;
}

/* ==============================================
   結果區域樣式
   ============================================== */

/* 單個結果項目 */
.case-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.2s ease;
}

.case-result-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.case-result-item:last-child {
    margin-bottom: 0;
}

/* 結果標籤（格式名稱） */
.case-result-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
    min-width: 110px;
    flex-shrink: 0;
}

/* 結果值（轉換後的文字） */
.case-result-value {
    flex: 1;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-size: 0.95rem;
    color: #1e293b;
    padding: 0 12px;
    word-break: break-all;
    text-align: left;
}

/* 複製按鈕 */
.case-copy-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.case-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.case-copy-btn:active {
    transform: translateY(0);
}

.case-copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* 複製全部按鈕 */
.case-copy-all-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    font-size: 0.9rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.case-copy-all-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
}

/* ==============================================
   多行結果區域
   ============================================== */

/* 多行模式容器 */
.case-multiline-results {
    margin-top: 16px;
}

.case-multiline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.case-multiline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
}

.case-multiline-count {
    font-size: 0.8rem;
    color: #64748b;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

/* 多行結果表格 */
.case-multiline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.case-multiline-table th {
    background: rgba(102, 126, 234, 1);
    color: white;
    font-weight: 600;
    padding: 10px 8px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    font-size: 0.8rem;
}

.case-multiline-table th:first-child {
    border-radius: 8px 0 0 0;
}

.case-multiline-table th:last-child {
    border-radius: 0 8px 0 0;
}

.case-multiline-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    font-family: 'Roboto Mono', 'Consolas', monospace;
    word-break: break-all;
    vertical-align: top;
}

.case-multiline-table tr:hover td {
    background: rgba(102, 126, 234, 0.05);
}

/* 多行結果滾動容器 */
.case-multiline-scroll {
    max-height: 400px;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 0.5);
}

/* 可點擊的儲存格值 */
.case-cell-value {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.case-cell-value:hover {
    background: rgba(102, 126, 234, 0.15);
}

/* ==============================================
   空狀態提示
   ============================================== */

.case-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.case-empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.case-empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ==============================================
   格式說明區域
   ============================================== */

.case-format-info {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.case-format-info code {
    background: rgba(102, 126, 234, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    color: #667eea;
}

/* ==============================================
   Tab 切換（單行/多行模式）
   ============================================== */

.case-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.case-mode-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.5);
    color: #64748b;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.case-mode-tab:hover {
    border-color: rgba(102, 126, 234, 0.4);
}

.case-mode-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ==============================================
   響應式設計
   ============================================== */

/* 平板 */
@media (max-width: 991px) {
    .case-result-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .case-result-label {
        min-width: 100%;
        margin-bottom: 4px;
    }

    .case-result-value {
        flex: 1;
        padding: 0;
        min-width: calc(100% - 80px);
    }
}

/* 手機 */
@media (max-width: 767px) {
    .case-input-textarea {
        min-height: 100px;
        font-size: 0.9rem;
    }

    .case-result-item {
        padding: 10px 12px;
    }

    .case-result-label {
        font-size: 0.8rem;
    }

    .case-result-value {
        font-size: 0.9rem;
    }

    .case-copy-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .case-mode-tabs {
        flex-direction: column;
    }

    .case-multiline-table {
        font-size: 0.75rem;
        table-layout: auto;
    }

    .case-multiline-table th,
    .case-multiline-table td {
        padding: 6px 4px;
        min-width: 70px;
    }

    .case-multiline-table th {
        font-size: 0.7rem;
    }

    .case-multiline-scroll {
        max-height: 300px;
    }
}
