/* =========================================================
   CSW Schedule
========================================================= */

.csw-schedule {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 40px;
    box-sizing: border-box;
    color: #222;
}


/* =========================================================
   Header
========================================================= */

.csw-schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}


.csw-schedule-heading h1 {
    margin: 0 0 7px;
    padding: 0;
    font-size: 28px;
    line-height: 1.4;
    font-weight: 700;
}


.csw-schedule-heading p {
    margin: 0;
    color: #777;
    font-size: 14px;
}


.schedule-add-button {
    flex-shrink: 0;
    appearance: none;
    border: 0;
    border-radius: 6px;
    padding: 13px 21px;
    background: #173b78;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}


.schedule-add-button:hover {
    opacity: .86;
}


/* =========================================================
   Legend
========================================================= */

.schedule-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #f7f8fa;
    border: 1px solid #eceef1;
    border-radius: 7px;
}


.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}


.legend-symbol {
    font-size: 16px;
    line-height: 1;
}


.legend-meeting .legend-symbol {
    color: #3daa78;
}


.legend-training .legend-symbol {
    color: #4a9ad6;
}


.legend-office .legend-symbol {
    color: #e9a23b;
}


.legend-pr .legend-symbol {
    color: #9a62cc;
}


.legend-important .legend-symbol {
    color: #e76565;
}


/* =========================================================
   Layout
========================================================= */

.schedule-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        360px;
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    overflow: hidden;
}


.schedule-calendar-area {
    min-width: 0;
    padding: 28px;
}


/* =========================================================
   Detail
========================================================= */

.schedule-detail {
    position: relative;
    padding: 28px;
    background: #fafbfc;
    border-left: 1px solid #e4e7eb;
}


.schedule-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    min-height: 32px;
}


.detail-category {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #eef1f4;
    color: #444;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 600;
}


.schedule-detail-close {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: #777;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}


.schedule-detail h2 {
    margin: 15px 0 25px;
    padding: 0;
    color: #222;
    font-size: 23px;
    line-height: 1.45;
    font-weight: 700;
}


.detail-row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #e9ebee;
    color: #444;
    font-size: 13px;
    line-height: 1.7;
}


.detail-label {
    color: #777;
    font-weight: 600;
}


.detail-description {
    margin-top: 24px;
}


.detail-description .detail-label {
    display: block;
    margin-bottom: 8px;
}


.detail-description p {
    margin: 0;
    color: #444;
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
}


.schedule-detail-footer {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #e4e7eb;
}


.schedule-reset-button {
    appearance: none;
    border: 1px solid #d9dde2;
    border-radius: 5px;
    padding: 9px 12px;
    background: #fff;
    color: #777;
    font-size: 11px;
    cursor: pointer;
}


.schedule-reset-button:hover {
    background: #f2f3f5;
}


.schedule-sample-note {
    margin: 12px 0 0;
    color: #999;
    font-size: 11px;
}


/* =========================================================
   FullCalendar
========================================================= */

#calendar {
    width: 100%;
}


.csw-schedule .fc {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Helvetica Neue",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        "Meiryo",
        sans-serif;
}


.csw-schedule .fc .fc-toolbar {
    gap: 12px;
    margin-bottom: 22px;
}


.csw-schedule .fc .fc-toolbar-title {
    color: #222;
    font-size: 21px;
    font-weight: 700;
}


.csw-schedule .fc .fc-button {
    border-radius: 5px;
    box-shadow: none;
    font-size: 12px;
}


.csw-schedule .fc .fc-button-primary {
    border-color: #d9dde2;
    background: #fff;
    color: #555;
}


.csw-schedule .fc .fc-button-primary:hover {
    border-color: #173b78;
    background: #f4f7fb;
    color: #173b78;
}


.csw-schedule .fc .fc-button-primary:not(:disabled).fc-button-active,
.csw-schedule .fc .fc-button-primary:not(:disabled):active {
    border-color: #173b78;
    background: #173b78;
    color: #fff;
}


.csw-schedule .fc .fc-col-header-cell {
    background: #f9fafb;
}


.csw-schedule .fc .fc-col-header-cell-cushion {
    padding: 10px 5px;
    color: #666;
    font-size: 12px;
    text-decoration: none;
}


.csw-schedule .fc .fc-daygrid-day-number {
    padding: 7px 9px;
    color: #444;
    font-size: 12px;
    text-decoration: none;
}


.csw-schedule .fc .fc-day-today {
    background: #f8fbff !important;
}


.csw-schedule .fc .fc-daygrid-event {
    margin: 2px 3px;
    padding: 3px 5px;
    border-radius: 4px;
    cursor: pointer;
}


.schedule-event-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}


.schedule-symbol {
    flex: 0 0 auto;
    font-size: 10px;
}


.schedule-time {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 600;
}


.schedule-title {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.csw-schedule .fc .fc-more-link {
    color: #173b78;
    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   Dialog
========================================================= */

.csw-schedule-dialog {
    width: calc(100% - 40px);
    max-width: 580px;

    max-height: calc(100vh - 40px);

    margin: auto;
    padding: 0;

    border: 0;
    border-radius: 10px;

    background: #fff;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, .25);

    overflow: hidden;
}


.csw-schedule-dialog::backdrop {
    background: rgba(17, 25, 39, .55);
}


.csw-dialog-inner {
    position: relative;

    max-height: calc(100vh - 40px);

    padding: 35px;

    box-sizing: border-box;

    overflow-y: auto;

    background: #fff;
}


.csw-dialog-heading {
    margin-bottom: 28px;
    padding-right: 40px;
}


.csw-dialog-heading h2 {
    margin: 0 0 7px;
    padding: 0;
    color: #222;
    font-size: 23px;
    line-height: 1.4;
}


.csw-dialog-heading p {
    margin: 0;
    color: #888;
    font-size: 12px;
}


.csw-dialog-close {
    position: absolute;

    top: 15px;
    right: 18px;

    z-index: 5;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;

    background: transparent;

    color: #777;

    font-size: 26px;
    line-height: 36px;

    cursor: pointer;
}


/* =========================================================
   Form
========================================================= */

.schedule-form-group {
    margin-bottom: 18px;
}


.schedule-form-group label {
    display: block;
    margin-bottom: 7px;
    color: #444;
    font-size: 12px;
    font-weight: 600;
}


.required {
    display: inline-block;
    margin-left: 4px;
    color: #d64a4a;
    font-size: 9px;
}


.csw-schedule-dialog input,
.csw-schedule-dialog select,
.csw-schedule-dialog textarea {

    display: block;

    width: 100%;

    box-sizing: border-box;

    margin: 0;

    padding: 11px 12px;

    border: 1px solid #d7dce1;
    border-radius: 5px;

    outline: none;

    background: #fff;

    color: #222;

    font-family: inherit;
    font-size: 14px;

    opacity: 1;

    pointer-events: auto;
}


.csw-schedule-dialog input:focus,
.csw-schedule-dialog select:focus,
.csw-schedule-dialog textarea:focus {

    border-color: #173b78;

    box-shadow:
        0 0 0 3px rgba(23, 59, 120, .1);
}


.csw-schedule-dialog textarea {
    min-height: 110px;
    resize: vertical;
}


.schedule-time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}


.schedule-submit-button {
    display: block;

    width: 100%;

    margin-top: 28px;

    padding: 14px;

    appearance: none;

    border: 0;
    border-radius: 6px;

    background: #173b78;

    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}


.schedule-submit-button:hover {
    opacity: .88;
}


/* =========================================================
   Tablet
========================================================= */

@media screen and (max-width: 1100px) {

    .csw-schedule {
        padding: 30px 20px;
    }


    .schedule-layout {
        grid-template-columns:
            minmax(0, 1fr)
            300px;
    }

}


/* =========================================================
   Mobile
========================================================= */

@media screen and (max-width: 800px) {

    .csw-schedule {
        padding: 24px 15px;
    }


    .csw-schedule-header {
        display: block;
    }


    .schedule-add-button {
        width: 100%;
        margin-top: 18px;
    }


    .schedule-legend {
        gap: 8px 14px;
        padding: 12px;
    }


    .legend-item {
        font-size: 11px;
    }


    .schedule-layout {
        display: block;
    }


    .schedule-calendar-area {
        padding: 12px;
    }


    .schedule-detail {
        border-top: 1px solid #e4e7eb;
        border-left: 0;
    }


    .csw-schedule .fc .fc-toolbar {
        flex-wrap: wrap;
    }


    .schedule-time {
        display: none;
    }

}


@media screen and (max-width: 600px) {

    .csw-schedule-dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }


    .csw-dialog-inner {
        max-height: calc(100vh - 20px);
        padding: 28px 20px;
    }


    .schedule-time-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}