/* workTypeSelector.css */

/* ドロップダウンコンテナ */
.worktype-dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

/* ドロップダウンボタン */
.worktype-dropdown-button {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    color: #333;
    transition: all 0.2s ease;
    left: 0;
}

.worktype-dropdown-button:hover {
    border-color: #2196f3;
    background-color: #f8f9ff;
}

/* ドロップダウンの内容 */
.worktype-dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.worktype-dropdown-content.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

/* ドロップダウンオプション */
.worktype-option {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.worktype-option:hover {
    background-color: #f5f5f5;
}

.worktype-option.others {
    border-top: 1px solid #ddd;
    color: #2196f3;
    font-weight: 500;
}

/* カナグループモーダル */
.work-type-modal {
    border: none;
    border-radius: 8px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    background-color: #ffffff;
    max-height: 90vh;
}

.work-type-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* モーダルコンテンツ */
.modal-content {
    display: flex;
    flex-direction: column;
    /*height: 100%;*/
    max-height: 80vh;
    padding: 15px;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.1em;
    text-align: center;
    line-height: 1.4;
}

/* 検索フィールド */
.search-container {
    margin-bottom: 20px;
    width: 100%;
}

.search-input {
    width: 90%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* カナグループリスト */
.kana-group-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -20px; /* ネガティブマージンで横幅を広げる */
    padding: 0 20px;
}

/* スクロールバーのカスタマイズ */
.kana-group-list::-webkit-scrollbar {
    width: 8px;
}

.kana-group-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.kana-group-list::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 4px;
}

/* カナグループ */
.kana-group {
    margin-bottom: 12px;
    width: 90%;
}

/* カナヘッダー */
.kana-header {
    padding: 12px 16px;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: left;
    margin: 10px;
}

.kana-header:hover {
    background-color: #eeeeee;
}

/* カナコンテンツ */
.kana-content {
    display: none;
    padding: 8px 0;
    width: 100%;
}

.kana-content.active {
    display: block;
}

/* カナグループのヘッダー矢印アイコン */
.kana-header::after {
    content: '▼';
    float: right;
    transition: transform 0.3s ease;
}

/* 開いているグループのヘッダー矢印 */
.kana-header.active::after {
    transform: rotate(180deg);
}
/* 勤務種別アイテム */
.worktype-item {
    padding: 12px 16px;
    margin: 4px 0px 4px 9px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.worktype-item:hover {
    background-color: #f5f5f5;
}

.worktype-item.selected {
    background-color: #e3f2fd;
    color: #2e7d32;
}

/* 選択された項目のチェックマーク */
.worktype-item.selected::after {
    content: '✓';
    float: right;
    color: #4caf50;
    font-weight: bold;
    margin-left: 10px;
}
/* ボタンコンテナ */
.button-container {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    width: 100%;
    padding: 10px;
}

/* ボタン共通スタイル */
.button-container button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
}

/* キャンセルボタン */
.cancel-btn {
    background-color: #f5f5f5;
    color: #333;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

/* 確定ボタン */
.confirm-btn {
    background-color: #2196f3;
    color: white;
}

.confirm-btn:hover:not(:disabled) {
    background-color: #1976d2;
}

.confirm-btn:disabled {
    background-color: #bdbdbd;
    cursor: not-allowed;
}

/* 検索結果なしメッセージ */
.no-results-message {
    text-align: center;
    padding: 24px;
    color: #757575;
    font-style: italic;
}

/* アニメーション定義 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
