@charset "utf-8";
/* CSS Document */
/* OCANSV3-1831 カスタムdatepicker スタイル */

/* オーバーレイ背景（PC/スマホ共通） */
.fps-datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 10000;
}

/* PC表示 */
.fps-datepicker-popup {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 10px;
    font-size: 14px;
    box-sizing: border-box;
    z-index: 10001;
}

.fps-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    gap: 5px;
}

.fps-datepicker-prev,
.fps-datepicker-next {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 1;
}

.fps-datepicker-prev:hover,
.fps-datepicker-next:hover {
    background: #e0e0e0;
}

.fps-datepicker-year,
.fps-datepicker-month {
    padding: 5px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.fps-datepicker-table {
    border-collapse: collapse;
    width: 100%;
}

.fps-datepicker-table th,
.fps-datepicker-table td {
    text-align: center;
    padding: 8px;
    min-width: 32px;
    box-sizing: border-box;
}

.fps-datepicker-table th {
    font-weight: bold;
    color: #666;
}

.fps-datepicker-day {
    cursor: pointer;
    border-radius: 3px;
}

.fps-datepicker-day:hover {
    background: #e8f4fc;
}

.fps-datepicker-selected {
    background: #007bff !important;
    color: #fff !important;
}

.fps-datepicker-today {
    border: 1px solid #007bff;
}

.fps-day-sun,
th.fps-day-sun {
    color: #d00;
}

.fps-day-sat,
th.fps-day-sat {
    color: #00d;
}

.fps-datepicker-day.fps-day-sun:not(.fps-datepicker-selected) {
    color: #d00;
}

.fps-datepicker-day.fps-day-sat:not(.fps-datepicker-selected) {
    color: #00d;
}

.fps-datepicker-empty {
    background: #f9f9f9;
}

/* クリアボタン付きinputラッパー */
.fps-datepicker-input-wrap {
    position: relative;
    display: inline-block;
}

.fps-datepicker-input-wrap input {
    padding-right: 24px;
}

/* クリアボタン（〇の中に×） */
.fps-datepicker-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-color: #999;
    border-radius: 50%;
    cursor: pointer;
    display: none;
}

.fps-datepicker-clear:hover {
    background-color: #666;
}

/* ×マーク（縦線） */
.fps-datepicker-clear::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 10px;
    background-color: #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* ×マーク（横線） */
.fps-datepicker-clear::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 10px;
    background-color: #fff;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* inputにdisabledクラスがある場合はクリアボタンを非表示 */
.fps-datepicker-input-wrap input.disabled + .fps-datepicker-clear {
    display: none !important;
}

/* スマホ表示 (767px以下) */
@media only screen and (max-width: 767px) {
    .fps-datepicker-overlay {
        background-color: rgba(0, 0, 0, 0.35);
    }

    .fps-datepicker-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
        width: calc(100vw - 6vw);
        max-width: 94vw;
        padding: 3vw;
        font-size: 4vw;
        border-radius: 2vw;
        box-shadow: 0 1vw 4vw rgba(0, 0, 0, 0.2);
    }

    .fps-datepicker-header {
        margin-bottom: 3vw;
        gap: 2vw;
    }

    .fps-datepicker-prev,
    .fps-datepicker-next {
        padding: 2.5vw 4vw;
        font-size: 4.5vw;
        border-radius: 1.5vw;
    }

    .fps-datepicker-year,
    .fps-datepicker-month {
        padding: 2vw;
        font-size: 4vw;
        border-radius: 1.5vw;
    }

    .fps-datepicker-table th,
    .fps-datepicker-table td {
        padding: 2.5vw 1vw;
        min-width: 10vw;
        font-size: 4vw;
    }

    .fps-datepicker-table th {
        font-size: 3.5vw;
    }

    .fps-datepicker-day {
        border-radius: 1.5vw;
    }

    .fps-datepicker-today {
        border-width: 0.5vw;
    }

    /* クリアボタン スマホ用 */
    .fps-datepicker-input-wrap input {
        padding-right: 7vw;
    }

    .fps-datepicker-clear {
        right: 1vw;
        width: 5vw;
        height: 5vw;
    }

    .fps-datepicker-clear::before,
    .fps-datepicker-clear::after {
        width: 0.5vw;
        height: 2.8vw;
    }
}
