/* ========================================
   縦型比較表CSS（美しい色合い版）
======================================== */

.vertical-comparison-container {
    margin: 30px 0;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vertical-comparison-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
    display: table;
}

/* ヘッダー部分 */
.vertical-comparison-table thead {
    background: linear-gradient(135deg, #ff7b7b 0%, #ff9999 100%);
    display: table-header-group;
}

.vertical-comparison-table thead tr {
    display: table-row;
}

.vertical-comparison-table thead th {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    vertical-align: middle;
    color: white;
    display: table-cell;
    box-sizing: border-box;
}

.info-header {
    background: linear-gradient(135deg, #ff7b7b 0%, #ff9999 100%);
    color: white;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    font-size: 14px;
    font-weight: bold;
}

.clinic-header {
    background: #ffffff;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: 2px solid #e0e0e0;
}

.clinic-header.featured-clinic-header {
    background: #ffffff;
    color: #333;
    border-left: 3px solid #ff9800;
    border-right: 3px solid #ff9800;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

.clinic-header.featured-clinic-header::after {
    content: '★ おすすめ';
    position: absolute;
    top: -1px;
    right: 8px;
    background: #ff9800;
    color: white;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 0 0 6px 6px;
}

.clinic-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.2;
    white-space: normal;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.4em; /* 2行分の高さ */
    color: #333;
}

.clinic-badges {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.featured-badge {
    background: #ff7b7b;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
}

/* tbody も確実に表示させる */
.vertical-comparison-table tbody {
    display: table-row-group;
}

.vertical-comparison-table tbody tr {
    display: table-row;
}

/* 行のスタイル */
.vertical-comparison-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.vertical-comparison-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.vertical-comparison-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* セルの基本スタイル */
.vertical-comparison-table td {
    padding: 12px 10px;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #f0f0f0;
    font-size: 13px;
    display: table-cell;
    box-sizing: border-box;
}

.info-cell {
    background: linear-gradient(135deg, #ff7b7b 0%, #ff9999 100%);
    color: white;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    font-weight: bold;
    text-align: center;
}

.clinic-cell {
    width: calc((100% - 150px) / 3);
    min-width: 200px;
}

.clinic-cell.featured-cell {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
    border-left: 3px solid #ff9800;
    border-right: 3px solid #ff9800;
    font-weight: 600;
}

/* 料金行の背景色を完全に削除 */
.price-row {
    background: none !important;
}

.price-row td {
    background: inherit !important;
}

.price-row .clinic-cell {
    background: inherit !important;
}

.price-row .clinic-cell.featured-cell {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%) !important;
}

.price-display {
    text-align: center;
}

.price-main {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #e91e63;
    line-height: 1.2;
}opacity: 0.9;
    font-weight: normal;
}

/* .clinic-cell {
    width: calc((100% - 150px) / 3);
    min-width: 200px;
} */

.clinic-cell.featured-cell {
    background: #fff3cd !important;
    border-left: 3px solid #ffc107;
    border-right: 3px solid #ffc107;
    font-weight: 600;
}

/* 料金行の特別スタイル */
.price-row {
    background: #e8f5e8 !important;
}

.price-row .clinic-cell.featured-cell {
    background: #d4edda !important;
}

.price-display {
    text-align: center;
}

.price-main {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
    line-height: 1.2;
}

/* 治療リスト */
.treatment-list {
    text-align: left;
    padding: 0 5px;
}

.treatment-item {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 2px;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.treatment-item.more {
    color: #6c757d;
    font-style: italic;
}

/* 時間・キャンペーン・アクセス表示 */
.time-display,
.campaign-display,
.access-display {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.campaign-display {
    color: #dc3545;
}

.access-display {
    color: #333;
    font-size: 12px;
    font-weight: bold;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 2px;
    display: inline-block;
}

/* ポイントリスト */
.points-list {
    text-align: left;
    padding: 0 5px;
}

.point-item {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 2px;
    color: #495057;
    position: relative;
    padding-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.point-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* アクション行 */
.action-row {
    background: #f1f3f4 !important;
}

.action-row .clinic-cell.featured-cell {
    background: #e2e6ea !important;
}

.comparison-cta-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 80px;
}

.comparison-cta-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.comparison-cta-btn.featured-btn {
    background: #ffc107;
    color: #212529;
}

.comparison-cta-btn.featured-btn:hover {
    background: #e0a800;
    color: #212529;
}

/* テーブル注釈 */
.table-note {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    margin: 0;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .vertical-comparison-container {
        margin: 20px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    
    .info-header,
    .info-cell {
        width: 120px;
        font-size: 12px;
    }
    
    .clinic-header,
    .clinic-cell {
        min-width: 160px;
		
    }
    
    .clinic-name {
        font-size: 12px;
    }
    
    .price-main {
        font-size: 16px;
    }
    
    .comparison-cta-btn {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    
    .info-header,
    .info-cell {
        width: 80px;
        font-size: 11px;
        padding: 8px 5px;
    }
    
    .clinic-header,
    .clinic-cell {
        padding: 8px 5px;	
		min-width: 160px !important;
    }
    
    .treatment-item,
    .point-item {
        font-size: 10px;
    }
}

/* 印刷対応 */
@media print {
    .vertical-comparison-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .comparison-cta-btn {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
    
    .clinic-header.featured-clinic-header::after {
        background: #000 !important;
        color: #fff !important;
    }
}