.calendar-wrap {
    --gap: 20px;
    --calendar-width: 700px;
    position: relative;
    width: 100%;
    margin-top: 50px;
    display: flex;
    gap: 0 var(--gap);
    flex-wrap: wrap;
    > .com-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        .tit {
            width: 50%;
        }
    }
    .schd-head {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: flex-end;
        .toggle-btn {
            .btn {
                border: 1px solid var(--navy-color);
                display: inline-block;
                padding: 6px 10px;
                position: relative;
                text-align: center;
                -webkit-transition:
                    background 600ms ease,
                    color 600ms ease;
                transition:
                    background 600ms ease,
                    color 600ms ease;
                font-size: 1.3rem;
                color: var(--navy-color);
                font-weight: 600;
            }
            input[type="radio"]:not(old) {
                background: none;
                display: none;
                & + label {
                    background: none;
                    margin: 0;
                }
                &:checked + label {
                    margin: 0;
                }
                &:not(old):checked + label {
                    margin: 0;
                }
                &.toggle {
                    & + label {
                        cursor: pointer;
                        line-height: normal;
                    }
                    & + label:after {
                        background: var(--navy-color);
                        content: "";
                        height: 100%;
                        position: absolute;
                        top: 0;
                        -webkit-transition: left 200ms
                            cubic-bezier(0.77, 0, 0.175, 1);
                        transition: left 200ms cubic-bezier(0.77, 0, 0.175, 1);
                        width: 100%;
                        z-index: -1;
                    }
                    &.toggle-left + label {
                        border-right: 0;
                        background: #fff;
                    }
                    &.toggle-left + label:after {
                        left: 100%;
                    }
                    &.toggle-right + label {
                        margin-left: -5px;
                        background: #fff;
                    }
                    &.toggle-right + label:after {
                        left: -100%;
                    }
                    &:checked + label {
                        cursor: default;
                        color: #fff;
                        background: var(--navy-color);
                        -webkit-transition: color 200ms;
                        transition: color 200ms;
                        z-index: 1;
                    }
                    &:checked + label:after {
                        left: 0;
                    }
                }
            }
        }
        .filter-area {
            position: relative;
            top: 5px;
            input[type="checkbox"].check-box {
                & + label {
                    font-size: 1.4rem;
                    font-weight: 600;
                    margin-right: 10px;
                }
                & + label:before {
                    width: 13px;
                    height: 13px;
                    background-size: 6px 6px;
                    margin-right: 4px;
                }
            }
        }
    }
    .calendar-area {
        position: relative;
        width: var(--calendar-width);
        .calendar-head {
            padding: 15px 0;
            border-top: 1px solid #a3a3a3;
            .month-select {
                display: flex;
                align-items: center;
                gap: 30px;
                justify-content: center;
                .date {
                    font-size: 2.3rem;
                    font-weight: 800;
                }
                .prev,
                .next {
                    cursor: pointer;
                    width: 30px;
                    height: 30px;
                }
                .next {
                    transform: rotate(180deg);
                }
            }
        }
        .calendar-group {
            margin: 0;
            overflow: hidden;
            .grid {
                border-bottom: 0;
                .week {
                    margin: 0;
                    line-height: 30px;
                    display: grid;
                    grid-template-columns: repeat(7, minmax(0, 1fr));
                    gap: 3px;
                    .week-cell {
                        text-align: center;
                        font-size: 1.2rem;
                        cursor: default;
                        font-weight: 500;
                        border: 1px solid #d0d0d0;
                        background: #f4f4f4;
                        font-weight: 600;
                        &.holiday {
                            color: #ff7f7f;
                        }
                        &.sat {
                            color: #6d7ee3;
                        }
                    }
                }
                .row {
                    position: relative;
                    height: 100px;
                    overflow: hidden;
                    margin-bottom: 3px;
                    .background {
                        position: absolute;
                        top: 0;
                        right: 0;
                        bottom: 0;
                        left: 0;
                        display: grid;
                        grid-template-columns: repeat(7, minmax(0, 1fr));
                        gap: 3px;
                        .bg-cell {
                            height: 100%;
                            border: 1px solid #d0d0d0;
                            &.select,
                            &:hover {
                                background: #f4f4f4;
                            }
                        }
                    }
                    .day {
                        position: absolute;
                        top: 0;
                        right: 0;
                        bottom: 0;
                        left: 0;
                        z-index: 5;
                        display: grid;
                        grid-template-columns: repeat(7, minmax(0, 1fr));
                        gap: 3px;
                        .day-cell {
                            line-height: 25px;
                            background: transparent;
                            font-size: 1.2rem;
                            height: 100%;
                            position: relative;
                            cursor: pointer;
                            padding: 1px 10px;
                            &.disabled {
                                color: #d3d3d3;
                                background: rgba(0, 0, 0, 0.08);
                                border: 0;
                            }
                            &:after {
                                content: "";
                                position: absolute;
                                top: 0;
                                left: 0;
                                width: 100%;
                                height: 100%;
                            }
                            .date {
                                position: relative;
                                &.select {
                                    color: #fff;
                                    &:after {
                                        position: absolute;
                                        top: 50%;
                                        left: 50%;
                                        transform: translate(-50%, -50%);
                                        background: var(--main-color);
                                        border-radius: 50%;
                                        width: 21px;
                                        height: 21px;
                                        content: "";
                                        z-index: -1;
                                    }
                                }
                            }
                        }
                    }
                    .line {
                        position: relative;
                        height: calc(100% - 25px);
                        width: 100%;
                        top: 25px;
                        z-index: 3;
                        cursor: pointer;
                        .line-g {
                            position: relative;
                            width: 100%;
                            .line-cell {
                                float: left;
                                width: 14.2857%;
                                position: relative;
                                padding: 0 3px;
                                .schd-item {
                                    position: relative;
                                    font-size: 1.2rem;
                                    font-weight: 600;
                                    height: 19px;
                                    text-align: left;
                                    width: 100%;
                                    padding: 2px 0 0 5px;
                                    text-overflow: ellipsis;
                                    overflow: hidden;
                                    white-space: nowrap;
                                    margin-bottom: 2px;
                                    &.cec {
                                        background: rgba(0, 53, 255, 0.1);
                                        color: #0035ff;
                                    }
                                    &.kpubic {
                                        background: rgba(154, 79, 239, 0.2);
                                        color: #9a4fef;
                                    }
                                    &.smt {
                                        background: rgba(255, 127, 191, 0.2);
                                        color: #ff7fd9;
                                    }
                                    &.intern {
                                        background: rgba(56, 160, 208, 0.2);
                                        color: #38a0d0;
                                    }
                                    &.amic {
                                        background: rgba(56, 208, 111, 0.2);
                                        color: #1bb375;
                                    }
                                    &.sanhak {
                                        background: rgba(255, 127, 127, 0.2);
                                        color: #ff7f7f;
                                    }
                                    &.line-1 {
                                        width: calc(100%);
                                    }
                                    &.line-2 {
                                        width: calc(200% + 5px);
                                    }
                                    &.line-3 {
                                        width: calc(300% + 11px);
                                    }
                                    &.line-4 {
                                        width: calc(400% + 17px);
                                    }
                                    &.line-5 {
                                        width: calc(500% + 24px);
                                    }
                                    &.line-6 {
                                        width: calc(600% + 29px);
                                    }
                                    &.line-7 {
                                        width: calc(700% + 36px);
                                    }
                                    &.more {
                                        position: relative;
                                        padding-top: 0;
                                        > span {
                                            display: inline-block;
                                            width: 3px;
                                            height: 3px;
                                            border-radius: 10px;
                                            background: #777;
                                            margin: 0 0.2px;
                                        }
                                    }
                                    > span {
                                        overflow: hidden;
                                        white-space: nowrap;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    .schedule-area {
        position: relative;
        width: calc(100% - var(--calendar-width) - var(--gap));
        .schd-title {
            padding: 15px 20px;
            border-radius: 3px;
            background: var(--navy-color);
            .tit {
                color: #fff;
                font-size: 1.6rem;
                font-weight: 800;
                position: relative;
                padding-left: 15px;
                &:after {
                    content: "";
                    position: absolute;
                    top: 3px;
                    left: 0;
                    border-left: 7px solid #fff;
                    border-top: 6px solid transparent;
                    border-bottom: 6px solid transparent;
                }
            }
        }
        .schd-list {
            position: relative;
            top: 1px;
            height: 560px;
            background: #fff;
            border: 1px solid #d0d0d0;
            padding: 5px 5px 0 0;
            border-top: 0;
            .schedule {
                @include scrollbar;
                position: relative;
                width: 100%;
                height: 100%;
                overflow-y: auto;
                padding: 15px 15px 20px 20px;
                .schd-row {
                    &:not(:last-child) {
                        margin-bottom: 20px;
                    }
                    &.cec {
                        .head {
                            color: var(--blue-color);
                        }
                    }
                    &.kpubic {
                        .head {
                            color: var(--purple-color);
                        }
                    }
                    &.amic {
                        .head {
                            color: var(--pink-color);
                        }
                    }
                    &.intern {
                        .head {
                            color: var(--sky-color);
                        }
                    }
                    &.sanhak {
                        .head {
                            color: var(--orange-color);
                        }
                    }
                    .head {
                        font-size: 1.3rem;
                        font-weight: 900;
                        padding-bottom: 15px;
                        position: relative;
                        .schd-toggle-tit {
                            position: absolute;
                            top: -3px;
                            right: 0;
                            .total {
                                display: inline-block;
                                font-size: 1.3rem;
                                font-weight: 600;
                                color: #9b9b9b;
                                margin-right: 5px;
                            }
                            .btn {
                                position: relative;
                                cursor: pointer;
                                display: inline-block;
                                font-size: 1.2rem;
                                font-weight: 600;
                                color: #444;
                                padding: 4px 8px 4px 30px;
                                background: #ddd;
                                border-radius: 3px;
                                &:after {
                                    content: "접기";
                                    display: block;
                                    position: absolute;
                                    top: 4px;
                                    left: 8px;
                                }
                                img {
                                    width: 8px;
                                    height: 3px;
                                    position: relative;
                                    top: 5px;
                                    margin-left: 3px;
                                }
                            }
                        }
                    }
                    .item {
                        padding-bottom: 10px;
                        margin-bottom: 10px;
                        border-bottom: 1px solid var(--line-color);
                        .tit {
                            float: left;
                            width: calc(100% - 280px);
                            font-size: 1.4rem;
                            font-weight: 600;
                            @include ellipsis;
                            a:hover {
                                text-decoration: underline;
                            }
                            .label {
                                font-size: 1.2rem;
                                color: #fff;
                                padding: 3px 0;
                                border-radius: 5px 0 5px 0;
                                margin-right: 5px;
                                display: inline-block;
                                min-width: 45px;
                                text-align: center;
                                &.on {
                                    background: var(--main-color);
                                }
                                &.end {
                                    background: #aeaeae;
                                }
                            }
                        }
                        .txt {
                            float: right;
                            width: 280px;
                            text-align: right;
                            font-size: 1.2rem;
                            letter-spacing: -1px;
                            color: #949494;
                            font-weight: 600;
                            span {
                                padding-right: 10px;
                                color: #3c5b92;
                            }
                        }
                    }
                    &.no-list {
                        .toggle-row {
                            height: unset !important;
                        }
                        .item {
                            > p {
                                padding-bottom: 10px;
                                font-size: 1.2rem;
                                font-weight: 500;
                                color: #888;
                            }
                        }
                    }
                    .toggle-row {
                        position: relative;
                        width: 100%;
                        max-height: auto;
                        overflow: hidden;
                    }
                    &.schd-toggle-on {
                        .schd-toggle-tit {
                            .btn {
                                &:after {
                                    content: "열기";
                                }
                                img {
                                    transform: rotate(180deg);
                                }
                            }
                        }
                        .toggle-row {
                            height: 100px;
                        }
                    }
                }
            }
            &.day-list {
                .schedule {
                    .schd-row {
                        .item {
                            margin-bottom: 15px;
                            padding-bottom: 0;
                            .tit {
                                float: none;
                                width: 100%;
                                padding-bottom: 5px;
                                border-bottom: 1px solid #bdc1ca;
                            }
                            .txt {
                                float: none;
                                width: 100%;
                                padding-top: 10px;
                                text-align: left;
                                background: #fff;
                                padding-left: 10px;
                                border-left: 1px solid var(--line-color);
                                border-right: 1px solid var(--line-color);
                                font-weight: 500;
                                font-size: 1.1rem;
                                > span {
                                    font-weight: 600;
                                }
                                &:last-child {
                                    padding-bottom: 10px;
                                }
                            }
                        }
                        &.kpubic {
                            .item {
                                border-bottom: 0;
                                .time-area {
                                    padding-top: 5px;
                                    .time {
                                        width: 9.5%;
                                        text-align: center;
                                        font-size: 1rem;
                                        font-weight: 600;
                                        display: inline-block;
                                        background: #e0e3e5;
                                        border-radius: 3px;
                                        padding: 5px 0;
                                        color: #657485;
                                        margin: 0 2px 5px 0;
                                        &.disabled {
                                            text-decoration: line-through;
                                            color: #a5a8ac;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (max-width: 1200px) {
    .calendar-wrap {
        flex-direction: column;
        .calendar-area {
            width: 100%;
        }
        .schedule-area {
            width: 100%;
            margin-top: 50px;
        }
        .schd-head {
            .filter-area {
                input[type="checkbox"].check-box + label {
                    font-size: 1.2rem;
                }
            }
        }
    }
}

@media (max-width: 1024px) {
    .calendar-wrap {
        > .com-title {
            flex-direction: column;
            gap: 20px;
            .tit {
                width: 100%;
            }
            .schd-head {
                width: 100%;
                justify-content: flex-start;
            }
        }
    }
}

@media (max-width: 650px) {
    .calendar-wrap {
        .schd-head {
            flex-direction: column;
            gap: 10px;
            .toggle-btn {
                .btn {
                    width: 50%;
                    padding: 10px;
                }
            }
            .filter-area {
                margin: 5px 0;
                .check-input-box {
                    padding: 8px 0;
                    width: 30%;
                }
                input[type="checkbox"].check-box + label {
                    font-size: 1.4rem;
                }
            }
        }
        .calendar-area {
            .calendar-head {
                .month-select {
                    width: 100%;
                    justify-content: space-between;
                    .date {
                        font-size: 1.6rem;
                    }
                }
            }
            .calendar-group {
                .grid {
                    .row {
                        .line {
                            .line-g {
                                .line-cell {
                                    .schd-item {
                                        font-size: 1.1rem;
                                        height: 16px;
                                    }
                                }
                            }
                        }
                    }
                    .week {
                        line-height: 30px;
                        .week-cell {
                            font-size: 1.1rem;
                        }
                    }
                }
            }
        }
        .schedule-area {
            margin-top: 25px;
            .schd-title {
                padding: 10px 15px;
                .tit {
                    font-size: 1.4rem;
                    font-weight: 500;
                    &:after {
                        border-width: 5px;
                    }
                }
            }
            .schd-list {
                border-left: 1px solid var(--line-color);
                height: 300px;
                .schedule {
                    padding: 10px 10px 15px 15px;
                    .schd-row {
                        .head {
                            font-size: 1.2rem;
                            padding-bottom: 10px;
                            .schd-toggle-tit {
                                .total {
                                    font-size: 1.1rem;
                                }
                                .btn {
                                    font-size: 1rem;
                                }
                            }
                        }
                        .item {
                            .tit {
                                float: none;
                                width: 100%;
                                font-size: 1.3rem;
                                .label {
                                    font-size: 1rem;
                                }
                            }
                            .txt {
                                float: none;
                                width: 100%;
                                text-align: left;
                                padding-top: 5px;
                                line-height: 1.7;
                                font-size: 1.1rem;
                            }
                        }
                        &.schd-toggle-on {
                            .toggle-row {
                                height: 170px;
                            }
                        }
                    }
                }

                &.day-list {
                    .schedule {
                        .schd-row {
                            .item {
                                .txt {
                                    padding-top: 5px;
                                    &:last-child {
                                        padding-bottom: 5px;
                                    }
                                }
                            }
                            &.kpubic {
                                .item {
                                    .time-area {
                                        .time {
                                            width: 19%;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
