/* タブ切り替え用CSS */
.tab-container {
    display: flex;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    margin-right: 5px;
    border: 2px solid #e0e0e0;
    background-color: #f8f9fa;
    cursor: pointer !important;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #666;
    font-size: 14px;
}

.tab-button *,
.tab-button i,
.tab-button span {
    pointer-events: none;
}

.tab-button:hover,
.tab-button:hover *,
.tab-button:hover i,
.tab-button:hover span {
    cursor: pointer !important;
}

.tab-button:hover {
    background-color: #e9ecef;
    color: #333;
}

.tab-button.active {
    background-color: #fff;
    color: #333;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
}

.tab-content {
    border: 2px solid #e0e0e0;
    border-top: none;
    padding: 10px;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 階層タブ（サブタブ）スタイル */
.sub-tab-container {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.sub-tab-button {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    cursor: pointer !important;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
    user-select: none;
}

.sub-tab-button *,
.sub-tab-button i,
.sub-tab-button span {
    pointer-events: none;
}

.sub-tab-button:hover,
.sub-tab-button:hover *,
.sub-tab-button:hover i,
.sub-tab-button:hover span {
    cursor: pointer !important;
}

/* ボタンタグで使用する場合のスタイルリセット */
button.sub-tab-button {
    font-family: inherit;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer !important;
}

button.sub-tab-button,
button.sub-tab-button:hover,
button.sub-tab-button:focus,
button.sub-tab-button:active {
    cursor: pointer !important;
}

.sub-tab-button:hover {
    background-color: #e9ecef;
    color: #333;
}

.sub-tab-button:active {
    transform: scale(0.98);
}

.sub-tab-button.active {
    background-color: #fff;
    color: var(--unit-color);
    border-color: #e0e0e0;
    border-bottom: 2px solid #fff;
    margin-bottom: -2px;
    font-weight: bold;
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .tab-button {
        padding: 10px 16px;
        font-size: 13px;
        margin-right: 2px;
        min-height: 44px; /* タッチ操作に適したサイズ */
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .sub-tab-button {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 44px; /* タッチ操作に適したサイズ */
    }
    
    .sub-tab-container {
        gap: 3px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .tab-button {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 1px;
        flex: 1;
        min-height: 44px; /* タッチ操作に適したサイズ */
    }
    
    .tab-content {
        padding: 10px;
    }
    
    .sub-tab-button {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 44px; /* タッチ操作に適したサイズ */
        flex: 1;
    }
    
    .sub-tab-container {
        gap: 2px;
        margin-bottom: 10px;
    }
} 