/* ==============================================
   検査実施可能院一覧テーブルスタイル
   ============================================== */

.examination-table-section {
    background: linear-gradient(to bottom, #F7FAFC, #ffffff);
    padding: 60px 20px;
    margin: 40px 0;
}

.examination-table-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* アコーディオンヘッダー（クリック可能） */
.examination-table-header {
    background: linear-gradient(135deg, #2C7A7B 0%, #4FD1C5 100%);
    border-radius: 12px;
    padding: 25px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 122, 123, 0.2);
    user-select: none;
}

.examination-table-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 122, 123, 0.3);
}

.examination-table-header.active {
    border-radius: 12px 12px 0 0;
}

.examination-table-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.examination-table-title-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.examination-table-title i.icon-list {
    color: white;
    font-size: 1.5rem;
}

.examination-table-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 8px 0 0 0;
}

/* アコーディオン開閉アイコン */
.accordion-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accordion-toggle i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.examination-table-header.active .accordion-toggle i {
    transform: rotate(180deg);
}

.examination-table-wrapper {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.examination-table-wrapper.active {
    max-height: 2000px;
    opacity: 1;
    margin-top: 0;
}

/* テーブルのスクロール対応 */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.examination-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.examination-table thead {
    background: linear-gradient(135deg, #2C7A7B 0%, #4FD1C5 100%);
}

.examination-table thead th {
    color: white;
    font-weight: 600;
    padding: 18px 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.examination-table thead th:last-child {
    border-right: none;
}

.examination-table thead th:first-child {
    text-align: left;
    padding-left: 25px;
}

.examination-table tbody tr {
    border-bottom: 1px solid #E2E8F0;
    transition: background-color 0.2s ease;
}

.examination-table tbody tr:hover {
    background-color: #F7FAFC;
}

.examination-table tbody tr:last-child {
    border-bottom: none;
}

/* 全院実施可能な行の背景色 */
.examination-table tbody tr.all-available {
    background: linear-gradient(to right, #F0FDF4 0%, #DCFCE7 100%);
}

.examination-table tbody tr.all-available:hover {
    background: linear-gradient(to right, #DCFCE7 0%, #BBF7D0 100%);
}

/* 一部院のみ実施の行の背景色 */
.examination-table tbody tr.partial-available {
    background: linear-gradient(to right, #FFFBEB 0%, #FEF3C7 100%);
}

.examination-table tbody tr.partial-available:hover {
    background: linear-gradient(to right, #FEF3C7 0%, #FDE68A 100%);
}

.examination-table tbody td {
    padding: 16px 15px;
    text-align: center;
}

.examination-table tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: #2D3748;
    padding-left: 25px;
}

.examination-table tbody td:nth-child(2) {
    color: #718096;
    font-weight: 500;
}

/* ○と×のアイコンスタイル */
.availability-icon {
    font-size: 1.3rem;
    font-weight: 700;
}

.availability-icon.available {
    color: #10B981;
}

.availability-icon.unavailable {
    color: #DC2626;
    opacity: 0.6;
}

/* 凡例 */
.table-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    padding: 20px;
    background: #F7FAFC;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #4A5568;
}

.legend-icon {
    font-size: 1.2rem;
    font-weight: 700;
}

.legend-icon.available {
    color: #10B981;
}

.legend-icon.unavailable {
    color: #DC2626;
    opacity: 0.6;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .examination-table-section {
        padding: 40px 15px;
    }
    
    .examination-table-header {
        padding: 20px 20px;
    }
    
    .examination-table-title {
        font-size: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .examination-table-title-text {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .examination-table-title i.icon-list {
        font-size: 1.2rem;
    }
    
    .examination-table-description {
        font-size: 0.9rem;
        margin-left: 0;
    }
    
    .accordion-toggle {
        width: 100%;
        justify-content: center;
        padding-top: 8px;
    }
    
    .examination-table {
        font-size: 0.85rem;
    }
    
    .examination-table thead th,
    .examination-table tbody td {
        padding: 12px 10px;
    }
    
    .examination-table tbody td:first-child {
        padding-left: 15px;
    }
    
    .examination-table thead th:first-child {
        padding-left: 15px;
    }
    
    .table-legend {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .examination-table-header {
        padding: 18px 16px;
    }
    
    .examination-table-title {
        font-size: 1.05rem;
        gap: 10px;
    }
    
    .examination-table-title-text {
        font-size: 1.05rem;
        gap: 6px;
    }
    
    .examination-table-title i.icon-list {
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .examination-table-description {
        font-size: 0.8rem;
        line-height: 1.5;
        margin-left: 0;
    }
    
    .accordion-toggle {
        font-size: 0.85rem;
        padding-top: 6px;
    }
    
    .accordion-toggle i {
        font-size: 1rem;
    }
    
    .examination-table {
        font-size: 0.8rem;
    }
    
    .examination-table thead th,
    .examination-table tbody td {
        padding: 10px 8px;
    }
    
    .examination-table tbody td:first-child {
        font-size: 0.85rem;
        padding-left: 12px;
    }
    
    .availability-icon {
        font-size: 1.1rem;
    }
}
