/* IHIW19 Management System カスタムスタイル */

/* 全体のスタイル */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8f9fa;
}

/* ナビゲーションバー */
.navbar-brand {
    font-weight: 700;
}

/* ナビゲーションハイライト - Lab Viewタブと調和したスタイル */
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 0.375rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar-nav .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

/* カード */
.card {
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* ボタン */
.btn {
    border-radius: 0.25rem;
}

/* TDD Blue Phase: MFI カラム専用スタイル */
.mfi-raw {
    color: #2563eb !important;  /* ブルー - RAW MFI値 */
    font-weight: 500;
}

.mfi-normalized {
    color: #059669 !important;  /* グリーン - Normalized MFI値 */
    font-weight: 500;
}

/* .mfi-legacy removed per user request */

/* MFI値表示の品質向上 */
.mfi-raw:hover, .mfi-normalized:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

/* レスポンシブ対応: 小画面でのMFIカラム */
@media (max-width: 768px) {
    .mfi-raw, .mfi-normalized {
        font-size: 0.85em;
    }

    /* 小画面では値のみ表示、ラベルは省略 */
    .table th:nth-child(2)::after { content: " (R)"; }  /* Raw MFI */
    .table th:nth-child(3)::after { content: " (N)"; }  /* Normalized MFI */
}

/* 詳細表示モーダルでのMFI行のスタイリング */
#details-content .table tbody tr:has(.mfi-raw) {
    background-color: rgba(37, 99, 235, 0.05);  /* RAW MFI行の背景 */
}

#details-content .table tbody tr:has(.mfi-normalized) {
    background-color: rgba(5, 150, 105, 0.05);  /* Normalized MFI行の背景 */
}

/* フォーム */
.form-control {
    border-radius: 0.25rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 変更不可フィールド */
.form-control[readonly] {
    background-color: #f2f2f2;
    color: #6c757d;
    border-left: 4px solid #dc3545;
    padding-left: calc(0.75rem - 1px);
    cursor: not-allowed;
}

.readonly-field-container {
    position: relative;
}

.readonly-field-container::after {
    content: "\f023";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-size: 0.875rem;
}

.readonly-field-label::after {
    content: " (変更不可)";
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: normal;
}

/* テーブル */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* リスト */
.list-group-item.active {
    background-color: #007bff;
    border-color: #007bff;
}

/* ダッシュボード */
.dashboard-card {
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* アバター */
.avatar-circle {
    width: 100px;
    height: 100px;
    background-color: #007bff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-initials {
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

/* ファイルアイコン */
.file-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* ページネーション */
.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* アラート */
.alert {
    border-radius: 0.25rem;
}

/* モーダル */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* フッター */
.footer {
    background-color: #f8f9fa;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Antibody Typing Method Styles */
.typing-method-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1rem;
}

.typing-method-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Form field consistency with HML import modal */
.typing-method-section .form-label {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.5rem;
}

.typing-method-section .form-select,
.typing-method-section .form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.typing-method-section .form-select:focus,
.typing-method-section .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

/* Modal size adjustment for Antibody Import */
#import-csv-modal .modal-dialog {
    max-width: 800px;
}

#import-csv-modal .modal-title {
    font-weight: 600;
    color: #495057;
}

/* Enhanced styling for typing method fields */
.typing-method-section .row {
    margin-bottom: 0;
}

.typing-method-section .col-md-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Optional field styling */
.typing-method-section .form-control[placeholder*="Optional"],
.typing-method-section .form-control[placeholder*="optional"] {
    border-style: dashed;
    border-color: #adb5bd;
}

.typing-method-section .form-control[placeholder*="Optional"]:focus,
.typing-method-section .form-control[placeholder*="optional"]:focus {
    border-style: solid;
    border-color: #86b7fe;
}

/* Version field specific styling */
#antibody-typing-method-version {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
}

/* Additional info field styling */
#antibody-typing-method-additional-info {
    resize: none;
}

/* Responsive adjustments for typing method section */
@media (max-width: 768px) {
    #import-csv-modal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .typing-method-section .col-md-6 {
        margin-bottom: 1rem;
        padding-left: 0;
        padding-right: 0;
    }

    .typing-method-section h6 {
        font-size: 1rem;
    }

    .typing-method-section .form-label {
        font-size: 0.875rem;
    }
}

/* Import progress enhancement */
#import-progress .progress {
    height: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

#import-progress .progress-bar {
    background-color: #007bff;
    transition: width 0.6s ease;
}

/* Import result styling */
#import-result .alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#import-result .alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

#import-result .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

#import-result .alert-warning {
    background-color: #fff3cd;
    color: #856404;
}
