body {
    margin: 0;
    padding: 0;
    font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
    font-size: 16px;
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#calendar {
    max-width: 95%;
    margin: 50px auto;
}

.hidden {
    display: none;
}

.none {
    visibility: hidden;
}

html>body {
    font-family: "Noto Sans Japanese", "Segoe UI", "Verdana", "Helvetica", "Arial", sans-serif;
}


input[name="c3"]:checked+label {
    background-color: #de8520;
    color: #fff;
}

input[name="key"]:checked+label {
    background-color: #6f62e2;
    color: #fff;
}

input[name="kizai"]:checked+label {
    background-color: #e51358;
    color: #fff;
}



/* 追加 */

.holiday {
    background-color: "#ffd0d0";
}


/* 土日 */
.fc-sat,
td.fc-sat {
    background-color: #eaf4ff;
}

.fc-sun,
td.fc-sun {
    background-color: #ffeaea;
}

.ui-widget-content {
    border: 1px solid #c9c9c9 !important;
    border-bottom: 1px solid #9f9f9f !important;
}

@media only screen and (max-width:700px) {
    .fc-title {
        font-size: 24px !important;
    }

    .fc-rows {
        font-size: 24px !important;
    }

    .fc-list-table {
        font-size: 24px !important;
    }

    .popover {
        max-width: 60vw !important;
        font-size: 4rem;
    }

    .popover {
        font-size: 4rem;
    }
}

@media only screen and (min-width:701px) {
    /* .fc-title {
        font-size: 0.8em !important;
    } */

    .fc-cell-title {
        font-size: 24px !important;
    }
}


.fc-timeline-event {
    border-color: rgb(183 103 32) !important;
}


/* タブ切り替えボタン */

.cp_tab *,
.cp_tab *:before,
.cp_tab *:after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}


.cp_tab>input[name="cp_tab"] {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    outline: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* .cp_tab .cp_tabpanel {
    display: none;
} */

.cp_tab>input:first-child:checked~.cp_tabpanels>.cp_tabpanel:first-child,
.cp_tab>input:nth-child(3):checked~.cp_tabpanels>.cp_tabpanel:nth-child(2) {
    display: block;
}

.cp_tab>label {
    position: relative;
    display: inline-block;
    padding: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: 0;
}

.cp_tab>label:hover,
.cp_tab>input:focus+label {
    color: #0066cc;
}

.cp_tab>input:checked+label {
    margin-bottom: -1px;
    border-color: #cccccc;
    border-bottom: 1px solid #ffffff;
    /*背景色と同じ*/
    border-radius: 6px 6px 0 0;
}

.cp_tab label,
.cp_tabpanel,
.footer {
    font-size: 16px;
}

.cp_tabpanel {
    padding: 0em 0.5em 0.4em;
}

@media (max-width: 480px) {
    .cp_tab {
        width: 100%;
        font-size: 0.8em;
    }

    .cp_tab label {
        padding: 0.5em;
    }
}


/* フィルターボタン */

.fil {
    display: none;
}

.filter1 label {
    display: block;
    float: left;
    cursor: pointer;
    width: 30px;
    max-width: 50px;
    margin: 0;
    padding: 12px 5px;
    border-right: 1px solid #abb2b7;
    background: #bdc3c7;
    color: #555e64;
    font-size: 14px;
    text-align: center;
    line-height: 1;
    transition: 0.2s;
}

.filter1 label:first-of-type {
    border-radius: 3px 0 0 3px;
}

.filter1 label:last-of-type {
    border-right: 0px;
    border-radius: 0 3px 3px 0;
}

.fil+label {
    background-color: #cacaca;
    color: rgb(54, 54, 54);
    border-radius: 6px 6px 0 0;
    font-size: 1em;
    padding: 0 4px 0 4px;
    margin: 0 0 0 4px !important;
}

/* input[name="cal"]:checked+label {
    background-color: #f8ac64;
    color: #fff;
} */


input[name="cal"]:checked.cal_btn0+label {
    background-color: #FFDAB9;
}

input[name="cal"]:checked.cal_btn1+label {
    background-color: #d3daff;
}

input[name="cal"]:checked.cal_btn2+label {
    background-color: #68d5a2;
}

input[name="cal"]:checked.cal_btn3+label {
    background-color: rgb(235 162 255);
}

input[name="cal"]:checked.cal_btn4+label {
    background-color: #ffbab4;
}

input[name="cal"]:checked.cal_btn5+label {
    background-color: #ffca36;
}

input[name="cal"]:checked.cal_btn6+label {
    background-color: #ff9473;
}

input[name="cal"]:checked.cal_btn7+label {
    background-color: #7ccaff;
}

input[name="cal"]:checked.cal_btn8+label {
    background-color: rgb(229 229 229);
}

input[name="cal"]:checked.cal_btn9+label {
    background-color: #b2beff;
}

input[name="cal"]:checked.cal_btn10+label {
    background-color: rgb(102 255 175);
}

input[name="cal"]:checked.cal_btn11+label {
    background-color: #ff9191;
}

input[name="team"]:checked+label {
    background-color: #6da32e;
    color: #fff;
}

input[name="fil_staff"]:checked+label {
    background-color: #03a9f4;
    color: #fff;
}

input[name="fil_staff_new"]:checked+label {
    background-color: #03a9f4;
    color: #fff;
}

span[data-badge-bottom-right] {
    display: block;
    position: relative;
    border-radius: 6px;
    color: #fff;
}


/* アイコン部 */

span[data-badge-top-left]:before,
span[data-badge-top-right]:before,
span[data-badge-bottom-left]:before,
span[data-badge-bottom-right]:before {
    position: absolute;
    display: inline-block;
    font-weight: bold;
    background-color: #f00;
    border-radius: 50%;
    font-size: 1em;
    line-height: 1;
    min-width: 1em;
    padding: 5px;
    border: 2px solid #fff;
    box-shadow: 0px 0px 3px #999;
}

span[data-badge-top-left]:before {
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    content: attr(data-badge-top-left) "";
}

span[data-badge-top-right]:before {
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    content: attr(data-badge-top-right) "";
}

span[data-badge-bottom-left]:before {
    bottom: 0;
    left: 0;
    transform: translate(-50%, 50%);
    content: attr(data-badge-bottom-left) "";
}

span[data-badge-bottom-right]:before {
    bottom: 5px;
    right: 0;
    transform: translate(50%, 50%);
    content: attr(data-badge-bottom-right) "";
    z-index: 1;
}


/* インフォメーションボード */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap');

.bg {
    /* display: flex;
  flex-direction: column;
  justify-content: center; */
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    color: #fff;
}

.bg.-visible:before {
    transform: translate(0, 0);
}

.bg:before {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #a33e46;
    transform: translate(0, 100%);
    transition: transform cubic-bezier(0.215, 0.61, 0.355, 1) .6s;
    content: '';
}

/* テキストのスタイル */
.bg_title {
    display: block;
    color: #e2f6fc#fff;
    font-family: 'Josefin Sans', sans-serif;
    text-align: center;
}

#loading_bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
}

#calendar_top {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
}

#loading_bg {
    background: #2196F3;
    z-index: 10;
    transition: all 0.6s ease-in-out;
}

#loading_bg.active {
    top: -60%;
}

#todays_hint {
    margin: 0;
    padding: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #E3F6FC;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.5s forwards;
}

#progressBar {
    z-index: 15;
}

.font-size-control {
    display: inline-block;
    background-color: #f0f0f0;
    border-radius: 20px;
}

.font-size-control button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.font-size-control button:focus {
    outline: none;
}

#font-size-counter {
    display: inline-block;
    width: 30px;
    text-align: center;
    font-size: 16px;
}

.fc-toolbar.fc-header-toolbar {
    font-size: 16px;
}

.fc-divider {
    background-color: rgb(234 234 234 / 50%);
}

.page_main {
    position: relative;
    z-index: 5;
}

.page_main>aside {
    overflow-y: auto;
    background-color: rgb(253 255 245);
    width: 500px;
    height: 100%;
    top: 0;
    left: -350px;
    position: fixed;
}

.page_main>aside ul {
    margin: 0;
    padding: 0;
    top: 50px;
    left: 114px;
    position: absolute;
}

.page_main>aside li {
    margin: 20px auto;
    list-style: none;
}

#staff-list {
    background-color: rgba(76, 84, 130, 0.8);
    display: block;
    position: fixed;
    top: calc(100% - 215px);
    left: 0px;
    width: 26px;
    height: 66px;
    margin: 0;
    padding: 0;
    border-radius: 0 5px 5px 0;
}

.scrollable-table {
    height: 100%;
    /* ボタンの高さを考慮 */
    overflow-y: auto;
}

.page_main table thead tr {
    background-color: #fd6767;
    color: #fff;
}

.bikou {
    text-align: left;
    font-size: .85em;
    white-space: normal;
    word-wrap: break-word;
}

.page_main table th,
.page_update table th,
.page_update table td {
    padding: .35em 1em;
    text-align: center;
}

.table td,
.table th {
    padding: .3rem !important;
    font-size: 1.2rem;
}

.guest-table {
    border-collapse: collapse;
    margin: 0 auto;
    padding: 0;
    /* width: 650px; */
    table-layout: fixed;
    color: #000;
}

.guest-list {
    padding: .35em;
    border-bottom: 1px solid #bbb;
}

/* table thead{
    border-bottom: 5px solid #ff9900;
  } */
.guest-list:last-child {
    border-bottom: none
}

.name-list,
.txt {
    padding: 1em 10px 1em 1em;
    border-right: 1px solid #bbb;
}



.add_red {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #ff0000 0%);
}

.add_yellow {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #f6ff00 0%);
}

.add_green {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #2eff00 0%);
}

.add_water {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #00c4ff 0%);
}

.add_blue {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #002eff 0%);
}

.add_purple {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #8b00ff 0%);
}

.add_pink {
    background-image: linear-gradient(to bottom, #00ffdc00 85%, #ff00f0 0%);
}

/* 外部編集中イベント用スタイル */
.external-editing {
    background-color: #383838 !important;
    color: #ffffff !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.external-editing:hover {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.external-editing .fc-title {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* 外部編集中イベントのドラッグ無効化 */
.external-editing.ui-draggable-dragging {
    display: none !important;
}

/* 変更履歴タブエリアの更新済みスタイル */
.history-tabs-container {
    padding-right: 0;
    padding-left: 0;
    background-color: rgb(251, 252, 255);
    margin-top: 16px;
}

.history-tabs-container .card {
    height: 500px;
    border: none;
    display: flex;
    flex-direction: column;
    background-color: rgb(251, 252, 255);
    border-radius: 8px 0 0 8px;
}

.history-tabs-container .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
    border-radius: 8px 0 0 0;
}

.history-tabs-container .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.history-tabs-container .list-group {
    overflow-y: auto;
    overflow-x: hidden;
    background-color: rgb(251, 252, 255);
}

.history-tabs-container .list-group::-webkit-scrollbar {
    width: 4px;
}

.history-tabs-container .list-group::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.history-tabs-container .list-group::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.history-tabs-container .list-group::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* モダンカード型の履歴アイテム */
.history-tab {
    border: none !important;
    border-radius: 8px 0 0 8px !important;
    padding: 4px;
    height: auto !important;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    margin-bottom: 4px;
    background-color: #eeeeee !important;
    /* 純白背景 */
    border-left: 4px solid #939393 !important;
    /* 全面に影を落として選ばれていないことを強調 */
    border-bottom: 2px solid #939393 !important;
    border-top: 2px solid #939393 !important;
    z-index: 1;
    /* 右側フォームより後ろに配置 */
}

.history-tab:hover {
    background-color: #e3f2fd !important;
    /* より強調した青系背景 */
    color: #495057;
    border-bottom: 2px solid #007bff !important;
    border-top: 2px solid #007bff !important;
    border-right: none !important;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25), 0 2px 0px rgba(0, 0, 0, 0.1) !important;
    /* ホバー時も全面に影を落とす */
    border-left-color: #007bff !important;
    transform: translateX(2px);
}

.history-tab.active {
    background-color: rgb(251, 252, 255) !important;
    margin: 16px 0;
    /* 右側フォームと同じ背景色に統一 */
    border-left-color: #007bff !important;
    /* 影を完全に削除してフラットに */
    transform: translateX(2px);
    border-bottom: 2px solid #007bff !important;
    border-top: 2px solid #007bff !important;
    border-right: none !important;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25), 0 2px 0px rgba(0, 0, 0, 0.1) !important;
    /* 右側の境界線を削除して一体感を演出 */
    z-index: 3;
    /* 選択されたタブは最前面に配置 */
}

.history-tab.active:hover {
    background-color: #f0f8ff !important;
    color: #495057 !important;
    border-bottom: 2px solid #007bff !important;
    border-top: 2px solid #007bff !important;
    border-right: none !important;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25), 0 2px 0px rgba(0, 0, 0, 0.1) !important;

}

.history-tab-date {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    margin: 0 0 4px 0 !important;
    color: #007bff !important;
}

.history-tab-user {
    font-size: 12px !important;
    line-height: 1.2;
    margin: 0 0 2px 0 !important;
    color: #44484a !important;
    font-weight: 500;
}

.history-tab-changes {
    font-size: 11px !important;
    line-height: 1.3;
    margin: 0 !important;
    color: #44484a !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* メインコンテンツエリア */
.main_box {
    margin: 0 auto;
    width: 85%;
    background-color: rgb(251, 252, 255);
    /* 親要素の高さに合わせる */
    box-shadow: -12px 0 12px rgba(0, 0, 0, 0.3);
    /* 左端からの影のみ残して下の影を削除 */
    z-index: 2;
    /* 右側フォームを前面に配置 */
}

/* モーダルコンテナの調整 */
#modal #container .container .row {
    margin: 0;
    background-color: rgb(251, 252, 255);
    /* 背景色統一 */
    height: 100%;
    /* #modalの高さに合わせる */
}

/* 編集中カード専用スタイル */
.editing-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: black !important;
    text-align: center !important;
    min-height: 60px !important;
}

.editing-card .text-center {

    width: 100% !important;
    height: 100% !important;
}

.editing-card .fw-bold {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 20px !important;
    color: black !important;
}

/* 編集中カードがアクティブ状態の時の専用スタイル */
.editing-card.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: black !important;
    text-align: center !important;
    min-height: 60px !important;
    /* アクティブ状態の他のスタイルは維持 */
    background-color: rgb(251, 252, 255) !important;
    margin: 16px 0 !important;
    border-left-color: #007bff !important;
    transform: translateX(2px) !important;
    border-bottom: 2px solid #007bff !important;
    border-top: 2px solid #007bff !important;
    border-right: none !important;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.25), 0 2px 0px rgba(0, 0, 0, 0.1) !important;
    z-index: 3 !important;
}

/* モバイル対応 */
@media (max-width: 767.98px) {
    .history-tabs-container {
        padding-right: 0;
        padding-left: 0;
        margin-bottom: 1rem;
        height: auto;
    }

    .history-tabs-container .card {
        height: auto;
        border-radius: 8px;
        /* モバイルでは通常の角丸 */
    }

    .history-tab {
        border-radius: 8px !important;
        /* モバイルでは通常の角丸 */
        transform: none !important;
        /* モバイルでは移動効果なし */
    }

    .history-tab:hover,
    .history-tab.active {
        transform: none !important;
        /* モバイルでは移動効果なし */
    }

    .main_box {
        padding-left: 0;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    #modal #container .container .row {
        height: auto;
    }

    .toggle-icon {
        transition: transform 0.3s ease;
    }

    .toggle-icon.rotated {
        transform: rotate(180deg);
    }
}