/* 予定登録: h2〜先頭入力行の隙間（Semantic .ui.header の margin / original の padding 等）を打ち消す */
#page_schedule .ui.main.container > h2.ui.dividing.header {
    margin-bottom: 1.5rem;
}

/* 予定登録画面: 予定日時行（.inline.field > div の flex-wrap: wrap を上書き） */
.ui.form .field.inline.schedule_datetime_field {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}
.ui.form .field.inline.schedule_datetime_field > label {
    flex-shrink: 0;
}
.ui.form .inline.field.schedule_datetime_field > .schedule_datetime_inputs {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35em;
    flex: 1 1 auto;
    min-width: 0;
}
.ui.form .schedule_datetime_inputs input[type="date"] {
    width: auto;
    min-width: 8.75rem;
    max-width: 10rem;
    flex: 0 0 auto;
    box-sizing: border-box;
    min-height: 2.71428571em;
}
/*
 * 終日ONで時刻セレクトが disabled になると高さが変わる主因:
 * original.css の .ui.form select:disabled にだけ appearance: none が付き、
 * 有効時はネイティブ select、無効時は装飾の取り扱いが変わって高さ・パディングの計算がずれる。
 * 下で line-height / padding / min-height を固定し、:disabled では appearance を上書きする。
 */
.ui.form .schedule_datetime_inputs select[data-ts-prop-key="start_time"],
.ui.form .schedule_datetime_inputs select[data-ts-prop-key="end_time"] {
    width: 7.25rem;
    min-width: 7.25rem;
    max-width: 7.25rem;
    flex: 0 0 7.25rem;
    box-sizing: border-box;
    line-height: 1.21428571em;
    padding: 0.62em 1em;
    min-height: 2.71428571em;
}
.ui.form .schedule_datetime_inputs select[data-ts-prop-key="start_time"]:disabled,
.ui.form .schedule_datetime_inputs select[data-ts-prop-key="end_time"]:disabled {
    -webkit-appearance: menulist;
    -moz-appearance: menulist-button;
    appearance: auto;
}
.ui.form .schedule_datetime_inputs .schedule_datetime_sep {
    flex-shrink: 0;
    padding: 0 0.1em;
    white-space: nowrap;
}

.ui.form .field.inline .schedule_repeat_label {
    margin-left: 0.75em;
}

/* 終日 + 繰り返し: チェックとドロップダウンの間を詰める */
.ui.form .field.inline.schedule_allday_repeat_field {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35em;
}
.ui.form .field.inline.schedule_allday_repeat_field > label {
    flex-shrink: 0;
}
.ui.form .schedule_allday_repeat_controls {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1 1 auto;
    min-width: 0;
}
/*
 * original.css の .ui.form .inline.field > div .ui.checkbox { margin-right: 2em; }
 * と label { padding-left: 2.2em; } が終日行に効き、チェック右に大きな空きになる
 */
.ui.form .field.inline.schedule_allday_repeat_field > div .ui.toggle.checkbox {
    margin-right: 0 !important;
}
.ui.form .field.inline.schedule_allday_repeat_field > div .ui.toggle.checkbox label {
    padding-left: 0 !important;
    min-width: 0 !important;
    width: 6em !important;
}
.ui.form .schedule_repeat_row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
}
.ui.form .schedule_repeat_field {
    flex: 0 0 auto;
    width: 15vw;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.ui.form .schedule_repeat_summary_wrap {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
}
.ui.form .schedule_repeat_summary {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 2.75rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92em;
    color: rgba(0, 0, 0, 0.75);
}
.ui.form .schedule_repeat_change_link {
    flex: 0 0 auto;
    margin-left: 0;
    white-space: nowrap;
    font-size: 0.92em;
}
.ui.form button.schedule_repeat_change_link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #2185d0;
    cursor: pointer;
    text-decoration: underline;
    text-align: left;
}
.ui.form button.schedule_repeat_change_link:hover {
    color: #1678c2;
}
.schedule_repeat_dropdown {
    width: 100%;
}
.schedule_repeat_dropdown .default.text {
    color: rgba(0, 0, 0, 0.87) !important;
}

/* 業務行: 顧客名・検索の幅は従来どおり、業務指示だけ残り幅いっぱい */
.ui.form .field.inline.schedule_work_field {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35em;
}
.ui.form .field.inline.schedule_work_field > label {
    flex-shrink: 0;
}
.ui.form .inline.field.schedule_work_field > .schedule_work_customer,
.ui.form .inline.field.schedule_work_field > .schedule_work_search {
    flex: 0 0 auto;
}
.ui.form .inline.field.schedule_work_field > .schedule_work_customer input[type="text"] {
    width: auto;
    box-sizing: border-box;
}
.ui.form .inline.field.schedule_work_field > .schedule_work_instruction {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
}
.ui.form .inline.field.schedule_work_field > .schedule_work_instruction input[type="text"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* カテゴリ選択（Semantic dropdown） */
.ui.form .field.inline.schedule_category_field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ui.form .field.inline.schedule_category_field > label {
    flex-shrink: 0;
}
.ui.form .field.inline.schedule_category_field > .ui:first-of-type {
    flex: 0 0 auto;
    width: 15vw;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.schedule_category_dropdown .item .category_option_dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.schedule_category_dropdown {
    width: 100%;
}
.schedule_category_dropdown .text .category_option_dot {
    margin-right: 0.45rem;
}
.schedule_category_dropdown .default.text {
    color: rgba(0, 0, 0, 0.87) !important;
}

.ui.form .field.inline.schedule_calendar_field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ui.form .field.inline.schedule_calendar_field > label {
    flex-shrink: 0;
}
.ui.form .field.inline.schedule_calendar_field > .ui:first-of-type {
    flex: 0 0 auto;
    width: 15vw;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.schedule_calendar_dropdown {
    width: 100%;
}
.schedule_calendar_dropdown .item .calendar_option_dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.schedule_calendar_dropdown .text .calendar_option_dot {
    margin-right: 0.45rem;
}
.schedule_calendar_dropdown .default.text {
    color: rgba(0, 0, 0, 0.87) !important;
}

/* 通知タイミング（Semantic dropdown）: カテゴリと同じ幅・レイアウト */
.ui.form .field.inline.schedule_notify_field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ui.form .field.inline.schedule_notify_field > label {
    flex-shrink: 0;
}
.ui.form .field.inline.schedule_notify_field > .ui:first-of-type {
    flex: 0 0 auto;
    width: 15vw;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.schedule_notify_dropdown {
    width: 100%;
}
.schedule_notify_dropdown .default.text {
    color: rgba(0, 0, 0, 0.87) !important;
}

/* 参加者・通知リスト: 表示テキストの可読性と削除ボタンの間隔 */
#sch_regist .assignee.members li {
    display: flex;
    align-items: center;
    gap: 1em;
}
#sch_regist .assignee.notify li {
    display: flex;
    align-items: center;
    gap: 1em;
}
#sch_regist .assignee.members li .type {
    flex: 0 0 auto;
    min-width: 3em;
}
#sch_regist .assignee.members li .dept {
    flex: 0 0 auto;
    min-width: 7em;
}
#sch_regist .assignee.members li .name {
    flex: 1 1 auto;
    min-width: 18em;
}
#sch_regist .assignee.notify li [data-ts-prop-key="notify_name"],
#sch_regist .assignee.notify li [data-ts-prop-key="notify_custom_text"] {
    flex: 0 0 auto;
}
#sch_regist .assignee.notify li [data-ts-prop-key="notify_custom_text"] {
    min-width: 18em;
}
#sch_regist .assignee.members li .row_delete_btn,
#sch_regist .assignee.notify li .row_delete_btn {
    margin-left: auto;
}

/* 公開設定: 2つ目のラジオ（value に依存しない） */
#sch_regist input[name="public_flg"] ~ input[name="public_flg"] {
    margin-left: 1.75em;
}

/* 業務検索モーダル（業務完了報告の材料検索モーダルと同様のサイズ・レイアウト） */
.ui.modal.modal_schedule_biz.search_modal {
    width: 85% !important;
    height: 85% !important;
    min-height: 85% !important;
}
.ui.modal.modal_schedule_biz.search_modal.active {
    display: flex !important;
    flex-direction: column;
}
.ui.modal.modal_schedule_biz .modal_container.content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 80vh;
    padding: 1em 2em;
}
.ui.modal.modal_schedule_biz .modal_container.content .header_title {
    flex-shrink: 0;
}
.ui.modal.modal_schedule_biz .modal_container.content .toggle_wrap h3 {
    font-size: 14px;
    margin-bottom: 0;
}
.ui.modal.modal_schedule_biz .modal_container.content .toggle_wrap.open h3 {
    margin-bottom: 10px;
}
.ui.modal.modal_schedule_biz .modal_container.content > main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#modal_schedule_biz #schedule_biz_search_wrap {
    flex-shrink: 0;
}
#modal_schedule_biz .schedule_biz_search_result_area {
    display: none;
    margin: 20px 0 15px;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}
#modal_schedule_biz .schedule_biz_search_result_area.is-visible {
    display: flex !important;
}
#modal_schedule_biz .schedule_biz_search_result_area > .ui.dividing.header {
    flex-shrink: 0;
}
#modal_schedule_biz .schedule_biz_search_result_area .search_header_area {
    flex-shrink: 0;
}
#modal_schedule_biz .schedule_biz_result_table_wrap {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
}

/* カテゴリー編集モーダル */
.ui.modal.modal_schedule_category {
    width: 760px;
    max-width: calc(100vw - 2rem);
}
.ui.modal.modal_schedule_category > .content {
    padding: 1.5rem;
    position: relative;
}
.ui.modal.modal_schedule_category .category_modal_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.ui.modal.modal_schedule_category .category_modal_header h2.ui.header {
    margin: 0;
}
.ui.modal.modal_schedule_category .category_modal_body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.ui.modal.modal_schedule_category .category_column {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.ui.modal.modal_schedule_category .category_row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.ui.modal.modal_schedule_category .category_row input[type="text"] {
    flex: 1;
    min-width: 0;
}
.ui.modal.modal_schedule_category .category_color {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    flex: 0 0 1.35rem;
}
.ui.modal.modal_schedule_category .color01 { background-color: #ff5c8d; }
.ui.modal.modal_schedule_category .color02 { background-color: #ff6f3d; }
.ui.modal.modal_schedule_category .color03 { background-color: #f4a61c; }
.ui.modal.modal_schedule_category .color04 { background-color: #14bf5a; }
.ui.modal.modal_schedule_category .color05 { background-color: #ffd4e4; }
.ui.modal.modal_schedule_category .color06 { background-color: #fde17a; }
.ui.modal.modal_schedule_category .color07 { background-color: #c7e9a3; }
.ui.modal.modal_schedule_category .color08 { background-color: #bfe0ff; }
.ui.modal.modal_schedule_category .color09 { background-color: #3b76ff; }
.ui.modal.modal_schedule_category .color10 { background-color: #d8c1ff; }
.ui.modal.modal_schedule_category .category_delete_mark,
.ui.modal.modal_schedule_category .category_plus {
    width: 1.35rem;
    height: 1.35rem;
    line-height: 1.35rem;
    text-align: center;
    color: #7f8896;
    font-weight: bold;
    flex: 0 0 1.35rem;
}
.ui.modal.modal_schedule_category .category_delete_mark {
    cursor: pointer;
}
.ui.modal.modal_schedule_category .category_plus.has_color {
    border-radius: 50%;
    color: transparent;
}
.ui.modal.modal_schedule_category .category_delete_mark.spacer {
    visibility: hidden;
}
.ui.modal.modal_schedule_category .category_row input[type="text"]:disabled {
    background-color: #f3f4f6;
    color: #7f8896;
}
.ui.modal.modal_schedule_category .category_modal_footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.ui.modal.modal_schedule_category .category_color,
.ui.modal.modal_schedule_category .category_plus {
    cursor: pointer;
}

.ui.modal.modal_schedule_category .category_color_picker {
    position: absolute;
    top: 4.8rem;
    right: 1.5rem;
    z-index: 20;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
}
.ui.modal.modal_schedule_category .category_color_picker_grid {
    display: grid;
    grid-template-columns: repeat(5, 24px);
    gap: 10px;
}
.ui.modal.modal_schedule_category .picker_color_btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
}
.ui.modal.modal_schedule_category .picker_color_btn.selected::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    color: #6b7280;
    font-size: 12px;
    font-weight: bold;
}

/* 繰り返し詳細設定モーダル */
.ui.modal.modal_schedule_repeat {
    --repeat-modal-label-col: 7rem;
    width: 640px;
    max-width: calc(100vw - 2rem);
    overflow: visible !important;
}
.ui.modal.modal_schedule_repeat > .content {
    padding: 1.25rem 1.5rem 1rem;
    overflow: visible !important;
}
.ui.modal.modal_schedule_repeat .repeat_modal_row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.75rem;
    margin-bottom: 1rem;
    overflow: visible;
}
/*
 * 繰り返しモーダル用ラベル: page.css の .ui.form .field>label { font-size: 18px } を上書き。
 * Semantic Modal は表示時に #page_schedule 外へ移ることがあるため、#page_schedule は使わない。
 */
.ui.modal.modal_schedule_repeat .repeat_detail_form > .field > .repeat_modal_label {
    flex: 0 0 var(--repeat-modal-label-col);
    width: var(--repeat-modal-label-col);
    max-width: 40%;
    margin: 0 !important;
    padding: 0;
    font-size: 1rem !important;
    line-height: 1.4;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.78);
    align-self: center;
}
.ui.modal.modal_schedule_repeat .repeat_interval_segmented,
.ui.modal.modal_schedule_repeat .repeat_end_row .repeat_end_radios {
    flex: 1 1 0;
    min-width: 0;
}
/* 繰り返し間隔: radio のままセグメントボタン風（画像のトグル群に近い見た目） */
.ui.modal.modal_schedule_repeat .repeat_interval_segmented {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #d8dde4;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.ui.modal.modal_schedule_repeat .repeat_interval_segment {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}
.ui.modal.modal_schedule_repeat .repeat_interval_input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
}
.ui.modal.modal_schedule_repeat .repeat_interval_face {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.52em 0.35em;
    min-height: 2.6em;
    box-sizing: border-box;
    background: #fff;
    color: rgba(0, 0, 0, 0.87);
    border-right: 1px solid #e8eaed;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background 0.15s ease, color 0.15s ease;
}
.ui.modal.modal_schedule_repeat .repeat_interval_segment:last-child .repeat_interval_face {
    border-right: none;
}
.ui.modal.modal_schedule_repeat .repeat_interval_segment:hover .repeat_interval_face {
    background: #f4f6f8;
}
.ui.modal.modal_schedule_repeat .repeat_interval_input:checked + .repeat_interval_face {
    background: #2185d0;
    color: #fff;
    font-weight: 600;
}
.ui.modal.modal_schedule_repeat .repeat_interval_segment:hover .repeat_interval_input:checked + .repeat_interval_face {
    background: #1678c2;
}
.ui.modal.modal_schedule_repeat .repeat_interval_input:focus-visible + .repeat_interval_face {
    outline: 2px solid #2185d0;
    outline-offset: -2px;
    z-index: 1;
}
.ui.modal.modal_schedule_repeat .repeat_detail_box {
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    background: #f9fafb;
    padding: 1rem 1rem 0.85rem;
    margin-bottom: 1rem;
    /* 繰り返し間隔のラベル列幅 + gap に合わせ、上段の入力エリアと左端を揃える */
    margin-left: calc(var(--repeat-modal-label-col) + 0.75rem);
    width: calc(100% - var(--repeat-modal-label-col) - 0.75rem);
    box-sizing: border-box;
    /* overflow:auto だと Semantic dropdown の .menu が途中で切れて選択できなくなる */
    overflow: visible;
}
.ui.modal.modal_schedule_repeat > .close.icon {
    display: none !important;
}
.ui.modal.modal_schedule_repeat .repeat_monthly_day_wrap,
.ui.modal.modal_schedule_repeat .repeat_yearly_date_wrap {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.25rem;
}
/* 繰り返しモーダル内 Semantic dropdown */
.ui.modal.modal_schedule_repeat .repeat_detail_form {
    overflow: visible !important;
}
.ui.modal.modal_schedule_repeat .repeat_detail_panel,
.ui.modal.modal_schedule_repeat .repeat_sub_radios,
.ui.modal.modal_schedule_repeat .repeat_monthly_nth_wrap,
.ui.modal.modal_schedule_repeat .repeat_yearly_nth_wrap,
.ui.modal.modal_schedule_repeat .repeat_monthly_option,
.ui.modal.modal_schedule_repeat .repeat_yearly_option {
    overflow: visible;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.ui.selection.dropdown {
    min-height: 2.71428571em;
    padding: 0.62em 2.1em 0.62em 1em;
    line-height: 1.21428571em;
    flex-shrink: 0;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.ui.selection.dropdown > .dropdown.icon {
    right: 0.75em;
}
/* 開いている dropdown を下の行・actions より手前に */
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.ui.selection.dropdown.active {
    z-index: 200;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.ui.selection.dropdown .menu {
    z-index: 201 !important;
    min-width: 100%;
    width: max-content;
    max-width: min(22rem, calc(100vw - 4rem));
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.ui.selection.dropdown .menu > .item {
    white-space: nowrap !important;
    padding-right: 1.5em !important;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown .text,
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown .default.text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(0, 0, 0, 0.87);
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.repeat_day_dd {
    min-width: 4.25rem;
    width: 4.25rem;
    max-width: none;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.repeat_month_dd {
    min-width: 5.85rem;
    width: 5.85rem;
    max-width: none;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.repeat_nth_week_dd {
    min-width: 4.25rem;
    width: 4.25rem;
    max-width: none;
}
.ui.modal.modal_schedule_repeat .repeat_modal_dropdown.repeat_nth_weekday_dd {
    min-width: 7rem;
    width: 7rem;
    max-width: none;
}
.ui.modal.modal_schedule_repeat .repeat_day_suffix {
    white-space: nowrap;
}
@media screen and (max-width: 480px) {
    .ui.modal.modal_schedule_repeat .repeat_detail_box {
        margin-left: 0;
        width: 100%;
        overflow-x: visible;
    }
}
.ui.modal.modal_schedule_repeat .repeat_detail_panel {
    margin: 0;
}
.ui.modal.modal_schedule_repeat .repeat_inline_field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.ui.modal.modal_schedule_repeat .repeat_num_input {
    width: 4rem;
    min-width: 3rem;
    box-sizing: border-box;
}
.ui.modal.modal_schedule_repeat .repeat_num_input_sm {
    width: 3.25rem;
}
.ui.modal.modal_schedule_repeat .repeat_suffix {
    white-space: nowrap;
}
.ui.modal.modal_schedule_repeat .repeat_weekday_checks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.25rem;
}
.ui.modal.modal_schedule_repeat .repeat_weekday_cb label {
    padding-left: 1.75em !important;
}
.ui.modal.modal_schedule_repeat .repeat_sub_radios {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.ui.modal.modal_schedule_repeat .repeat_monthly_option,
.ui.modal.modal_schedule_repeat .repeat_yearly_option {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    white-space: nowrap;
    min-width: 0;
}
.ui.modal.modal_schedule_repeat .repeat_monthly_nth_wrap,
.ui.modal.modal_schedule_repeat .repeat_yearly_nth_wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem 0.35rem;
    white-space: nowrap;
}
.ui.modal.modal_schedule_repeat .repeat_end_row .repeat_end_radios {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem 1rem;
}
.ui.modal.modal_schedule_repeat .repeat_end_row .repeat_end_radios > .ui.radio.checkbox {
    flex-shrink: 0;
}
.ui.modal.modal_schedule_repeat .repeat_end_date_input {
    display: none;
    flex-shrink: 0;
    margin: 0;
    width: auto;
    min-width: 9.5rem;
    min-height: 2.71428571em;
    box-sizing: border-box;
}
.ui.modal.modal_schedule_repeat .repeat_end_date_input.repeat_end_date_visible {
    display: block;
}
.ui.modal.modal_schedule_repeat .actions {
    padding: 0.75rem 1.5rem 1.25rem !important;
    border-top: 1px solid #eee;
    text-align: right;
}

/* 繰り返し予定の修正・削除モーダル共通（docs/繰り返し予定の修正.png・削除.png） */
.ui.modal.modal_schedule_repeat_edit_scope,
.ui.modal.modal_schedule_repeat_delete_scope {
    width: 92% !important;
    max-width: 42rem !important; /* 既定モーダル幅の約6割相当 */
}

.ui.modal.modal_schedule_repeat_edit_scope .content,
.ui.modal.modal_schedule_repeat_delete_scope .content {
    padding-top: 1.35rem;
}

/* モーダルは表示時に body 直下へ移動するため #page_schedule 配下ではセレクタに合わない */
.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__warn,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__warn {
    margin: 0 0 1.5rem;
    line-height: 1.55;
    font-size: 0.95rem;
    color: #8a8a8a !important;
}

.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__box,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__box {
    border: 1px solid #e0e4ea;
    border-radius: 6px;
    padding: 1rem 1.15rem 0.9rem;
    background: #fafbfc;
}

.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__radio.field,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__radio.field {
    margin: 0 0 0.5rem;
}

.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__radio.field:last-child,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__radio.field:last-child {
    margin-bottom: 0;
}

.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__radio .ui.radio.checkbox label,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__radio .ui.radio.checkbox label {
    cursor: pointer;
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.87) !important;
}

/* 選択中のラジオ：ラベルを青（Semantic の label 色より優先） */
.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__radio .ui.radio.checkbox.checked label,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__radio .ui.radio.checkbox.checked label,
.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__radio .ui.radio.checkbox input:checked ~ label,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__radio .ui.radio.checkbox input:checked ~ label,
.ui.modal.modal_schedule_repeat_edit_scope .schedule_repeat_edit_scope__radio .ui.radio.checkbox:has(input:checked) label,
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__radio .ui.radio.checkbox:has(input:checked) label {
    color: #2185d0 !important;
}

.ui.modal.modal_schedule_repeat_edit_scope .actions,
.ui.modal.modal_schedule_repeat_delete_scope .actions {
    padding: 0.75rem 1.5rem 1.25rem !important;
    border-top: 1px solid #eee;
    text-align: right;
}

/* 削除モーダル：削除ボタンは予定登録の .btn.delete_btn と同系（赤背景・白字） */
.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__btn-delete.ui.button {
    background-color: #db2828 !important;
    color: #fff !important;
    border: 1px solid #db2828 !important;
    box-shadow: none !important;
}

.ui.modal.modal_schedule_repeat_delete_scope .schedule_repeat_delete_scope__btn-delete.ui.button:hover {
    background-color: #b21e1e !important;
    border-color: #b21e1e !important;
    color: #fff !important;
}

.schedule_facility_row_spacer {
    padding: 0 !important;
}

.ui.form .field.inline.schedule_facility_field {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    clear: both;
}

.ui.form .field.inline.schedule_facility_field > label {
    flex-shrink: 0;
}

.ui.form .field.inline.schedule_facility_field > .schedule_facility_controls {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: auto !important;
}

.schedule_facility_controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.schedule_facility_selected_tags,
.schedule_facility_modal_selected .schedule_facility_selected_tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
}

.schedule_facility_tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f8f8f8;
}

.schedule_facility_tag__remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.ui.modal.modal_schedule_facility .schedule_facility_modal_selected {
    padding: 0.65rem 0.75rem;
    background: #f3faff;
    border: 1px solid #d6ebf7;
    border-radius: 4px;
}

.ui.modal.modal_schedule_facility .schedule_facility_tag {
    background: #dff0fb;
    border: 1px solid #b8daf0;
    border-radius: 4px;
    padding: 0.3rem 0.55rem;
    color: #1678c2;
}

.ui.modal.modal_schedule_facility .schedule_facility_tag__name {
    color: #1678c2;
}

.ui.modal.modal_schedule_facility .schedule_facility_tag__remove {
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.95rem;
}

.ui.modal.modal_schedule_facility .schedule_facility_tag__remove:hover {
    color: rgba(0, 0, 0, 0.7);
}

/* 設備選択ポップアップ */
.ui.modal.modal_schedule_facility {
    width: 34rem;
    max-width: calc(100vw - 2rem);
}

.ui.modal.modal_schedule_facility > .content {
    padding-top: 0.75rem;
}

.schedule_facility_modal_hint {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    color: rgba(0, 0, 0, 0.55);
}

.schedule_facility_modal_tree {
    max-height: 22rem;
    overflow-y: auto;
    border-top: 1px solid #e8e8e8;
    padding-top: 0.35rem;
}

.schedule_facility_group + .schedule_facility_group {
    margin-top: 0.15rem;
}

.schedule_facility_group__toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.45rem 0.15rem;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: rgba(0, 0, 0, 0.87);
}

.schedule_facility_group__toggle:hover {
    background: #f7f7f7;
}

.schedule_facility_group__chevron {
    width: 1rem;
    margin: 0 !important;
    flex-shrink: 0;
    color: rgba(0, 0, 0, 0.45);
}

.schedule_facility_group__name {
    font-weight: 700;
}

.schedule_facility_group.is-collapsed .schedule_facility_group__list {
    display: none;
}

.schedule_facility_group__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0.35rem 1.35rem;
}

.schedule_facility_item + .schedule_facility_item {
    border-top: 1px solid #f0f0f0;
}

.schedule_facility_item__label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.35rem 0.45rem 0;
    cursor: pointer;
    margin: 0;
}

.schedule_facility_item__checkbox {
    flex-shrink: 0;
    margin: 0;
}

.schedule_facility_item.is-unavailable,
.schedule_facility_item__label.is-unavailable {
    color: rgba(0, 0, 0, 0.4);
    cursor: default;
}

.schedule_facility_item.is-unavailable .schedule_facility_item__checkbox:disabled {
    cursor: default;
}

.schedule_facility_item__name {
    flex: 1 1 auto;
    min-width: 0;
}

.schedule_facility_item__capacity {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: rgba(0, 0, 0, 0.55);
    font-size: 1rem;
    line-height: 1;
}

.schedule_facility_item__capacity .icon {
    margin: 0 !important;
    font-size: 1em;
    line-height: 1;
}

.schedule_facility_item__capacity_num {
    font-size: 1em;
    line-height: 1;
}

.schedule_facility_item.is-unavailable .schedule_facility_item__capacity {
    color: rgba(0, 0, 0, 0.35);
}

.schedule_facility_modal_empty {
    padding: 1rem 0;
    color: rgba(0, 0, 0, 0.55);
}

.ui.modal.modal_schedule_facility .schedule_facility_modal_actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.ui.modal.modal_schedule_facility .schedule_facility_modal_selected:empty {
    display: none;
}

.ui.modal.modal_schedule_facility .schedule_facility_modal_action_btns {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}
