
/* =====================================================
   VACATIONAPPLY.CSS - 휴가 신청 페이지

   - 대시보드 공통 스타일 이후 로드
   - vacationapply.js 연동 ID / 클래스 유지
   - PC / 태블릿 / 모바일 반응형
   ===================================================== */


/* =====================================================
   1. 페이지 기본 레이아웃
   ===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body:has(.dashboard-sidebar) {
    margin: 0;
    min-height: 100vh;
    background: #eff8ff !important;
    color: #17243c;
}

body:has(.dashboard-sidebar) .page_wrap {
    display: block;
    width: 100%;
    min-height: calc(100vh - 78px);
    margin: 0;
}

/* 관리자 메뉴의 hidden 속성 보호 */
body:has(.dashboard-sidebar) #adminMenu[hidden] {
    display: none !important;
}


/* =====================================================
   2. 휴가 신청 카드
   ===================================================== */

.vacation_area {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 44px 24px 70px;
}

.vacation_box {
    width: min(100%, 660px);
    padding: 36px 42px 34px;

    background: #ffffff;
    border: 1px solid #dce7f3;
    border-radius: 18px;

    box-shadow: 0 8px 28px rgba(29, 53, 90, 0.055);
}

.vacation_heading {
    margin-bottom: 32px;
    text-align: center;
}

.vacation_kicker {
    color: #6986b2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.vacation_title {
    margin: 8px 0;

    color: #17243c;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.35;
}

.vacation_description {
    margin: 0;
    color: #7b8aa1;
    font-size: 13px;
}


/* =====================================================
   3. 입력 항목
   ===================================================== */

.vacation_box .input_group {
    width: 100%;
    margin-bottom: 23px;
}

.vacation_box .input_group > label,
.vacation_box .input_group > .vacation_period_label {
    display: block;
    margin-bottom: 9px;

    color: #2a3d5a;
    font-size: 15px;
    font-weight: 700;
}

.vacation_box .input_group input,
.vacation_box .input_group select,
.vacation_box .input_group textarea {
    width: 100%;
    max-width: 100%;

    border: 1px solid #d5e1ee;
    border-radius: 10px;
    outline: none;

    background: #f9fbff;
    color: #243852;

    font-family: inherit;
    font-size: 15px;

    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}

.vacation_box .input_group input,
.vacation_box .input_group select {
    height: 49px;
    padding: 0 14px;
}

.vacation_box .input_group textarea {
    min-height: 112px;
    padding: 13px 14px;

    resize: vertical;
    line-height: 1.5;
}

.vacation_box .input_group input:focus,
.vacation_box .input_group select:focus,
.vacation_box .input_group textarea:focus {
    border-color: #6c98e7;

    box-shadow:
        0 0 0 3px rgba(100, 150, 230, 0.13);
}

.vacation_box #applicant,
.vacation_box input:disabled {
    background: #edf2f8;
    color: #66778f;
    cursor: not-allowed;
}

/* 기타 사유는 vacationapply.js에서 표시 상태 변경 */
#otherReasonGroup {
    display: none;
}


/* =====================================================
   4. 휴가 날짜 선택
   ===================================================== */

.date_period_box {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        30px
        minmax(0, 1fr);

    align-items: end;
    gap: 10px;
    width: 100%;
}

.date_item {
    width: 100%;
    min-width: 0;
}

.vacation_box .date_item .date_item_title {
    display: block;
    margin-bottom: 8px;

    color: #64758f;
    font-size: 13px;
    font-weight: 600;
}

.vacation_box .date_item .date_input {
    display: block;

    width: 100%;
    min-width: 0;
    height: 49px;

    margin: 0;
    padding: 0 11px;

    font-size: 15px;
}

.date_arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 49px;

    color: #7890b1;
    font-size: 23px;
}

.validation_message {
    display: block;
    min-height: 18px;
    margin-top: 8px;

    color: #cf4056;
    font-size: 13px;
}


/* =====================================================
   5. 선택 기간
   ===================================================== */

.period_box {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    min-height: 76px;

    margin-top: 4px;
    padding: 16px 20px;

    background: #edf5ff;
    border: 1px solid #d8e7f9;
    border-radius: 12px;
}

.period_title {
    color: #3b567a;
    font-size: 17px;
    font-weight: 700;
}

.period_value {
    color: #2c65bf;
    font-size: 25px;
    font-weight: 800;
}


/* =====================================================
   6. 신청 / 재설정 버튼
   ===================================================== */

.button_group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.apply_button,
.reset_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 1 1 0;
    min-width: 0;
    height: 49px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 750;

    cursor: pointer;

    transition:
        background 0.15s,
        transform 0.15s;
}

.apply_button {
    border: 1px solid #aac7ef;
    background: #cbdcf5;
    color: #244b80;
}

.reset_button {
    border: 1px solid #d5e1ee;
    background: #f2f6fb;
    color: #526985;
}

.apply_button:hover {
    background: #b8d1f3;
    transform: translateY(-1px);
}

.reset_button:hover {
    background: #e5edf7;
    transform: translateY(-1px);
}

.apply_button:focus-visible,
.reset_button:focus-visible,
.back_home a:focus-visible {
    outline: 3px solid #77a2eb;
    outline-offset: 3px;
}


/* =====================================================
   7. 메인으로 돌아가기
   ===================================================== */

.back_home {
    margin-top: 26px;
    text-align: center;
}

.back_home a {
    color: #657b99;
    font-size: 14px;
    text-decoration: none;
}

.back_home a:hover {
    color: #2d62b2;
}


/* =====================================================
   8. 태블릿 / 모바일
   ===================================================== */

@media (max-width: 767px) {

    /* 페이지 및 카드 */

    .vacation_area {
        padding: 26px 16px 52px;
    }

    .vacation_box {
        width: min(100%, 560px);
        padding: 28px 25px;
    }

    .vacation_title {
        font-size: 25px;
    }


    /* =================================================
       모바일 날짜 선택

       - 시작일 / 종료일 세로 배치
       - iPhone Safari 날짜 입력 크기 보정
       ================================================= */

    .date_period_box {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .date_item {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .date_arrow {
        width: 100%;
        height: 32px;

        transform: rotate(90deg);
        font-size: 20px;
    }

    .vacation_box .date_item .date_input {
        display: block;

        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 49px;

        margin: 0;
        padding: 0 14px;

        border: 1px solid #d5e1ee;
        border-radius: 10px;

        background: #f9fbff;
        color: #243852;

        font-family: inherit;
        font-size: 16px;

        -webkit-appearance: none;
        appearance: none;
    }

    .date_input::-webkit-date-and-time-value {
        display: flex;
        align-items: center;

        width: 100%;
        height: 100%;
        min-height: 1.2em;

        margin: 0;
        text-align: left;
    }

    .date_input::-webkit-datetime-edit {
        display: flex;
        align-items: center;

        height: 100%;
        padding: 0;
    }

    .date_input::-webkit-datetime-edit-fields-wrapper {
        padding: 0;
    }
}


/* =====================================================
   9. 작은 모바일 화면
   ===================================================== */

@media (max-width: 480px) {

    .vacation_area {
        padding: 18px 12px 42px;
    }

    .vacation_box {
        width: 100%;
        padding: 25px 18px;
        border-radius: 15px;
    }

    .vacation_heading {
        margin-bottom: 25px;
    }

    .vacation_title {
        font-size: 23px;
    }

    .vacation_box .input_group {
        margin-bottom: 20px;
    }

    .period_box {
        min-height: 70px;
        padding: 14px 16px;
    }

    .period_title {
        font-size: 15px;
    }

    .period_value {
        font-size: 23px;
    }

    .button_group {
        gap: 10px;
        margin-top: 25px;
    }

    .apply_button,
    .reset_button {
        height: 47px;
        font-size: 14px;
    }
}


/* =====================================================
   10. 모바일 상단 헤더 높이 대응
   ===================================================== */

@media (max-width: 650px) {

    body:has(.dashboard-sidebar) .page_wrap {
        min-height: calc(100vh - 56px);
    }
}

