/* 検索カレンダー（.ui-datepicker.history-dp）専用テーマ */
.ui-datepicker.history-dp {
    z-index: 9999 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ui-datepicker.history-dp table {
    border-spacing: 0;
    border-collapse: collapse;
}

.ui-datepicker.history-dp th {
    font-weight: bold;
}

/* 日曜=赤 */
.ui-datepicker.history-dp thead th:first-child {
    color: #e53935;
}

.ui-datepicker.history-dp td {
    padding: 0;
    border: none;
}

/* 通常の日 */
.ui-datepicker.history-dp td a,
.ui-datepicker.history-dp td span {
    display: block;
    margin: 0;
    background: #f5f5f5;
    color: #333;
    font-weight: bold;
}

/* hover */
.ui-datepicker.history-dp td a.ui-state-hover,
.ui-datepicker.history-dp td a:hover {
    background: #333;
    color: #fff;
}

/* 今日 */
.ui-datepicker.history-dp td.ui-datepicker-today a,
.ui-datepicker.history-dp td a.ui-state-highlight {
    background: #f5f5f5;
    color: #333;
    font-weight: bold;
}

/* 入力済みの該当日＝背景黒・文字白 */
.ui-datepicker.history-dp td.ui-datepicker-current-day a,
.ui-datepicker.history-dp td a.ui-state-active {
    background: #000 !important;
    color: white !important;
    font-weight: bold;
}

/* 選択済みの hover */
.ui-datepicker.history-dp td.ui-datepicker-current-day a:hover {
    background: #555 !important;
    color: white !important;
}

/* ヘッダー（暗色） */
.ui-datepicker.history-dp .ui-datepicker-header {
    background-color: #333333;
    border-color: #333333;
}

.ui-datepicker.history-dp .ui-datepicker-title {
    color: #ffffff;
}

.ui-datepicker.history-dp .ui-datepicker-prev,
.ui-datepicker.history-dp .ui-datepicker-next {
    cursor: pointer;
}

/* ボタンパネル：今日ボタンは非表示・閉じるは残す */
.ui-datepicker.history-dp .ui-datepicker-buttonpane button.ui-datepicker-current {
    display: none;
}

.ui-datepicker.history-dp .ui-datepicker-buttonpane button {
    cursor: pointer;
    padding: 5px 10px;
    font-size: 13px;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    color: #333333;
}

.ui-datepicker.history-dp .ui-datepicker-buttonpane button:hover {
    background-color: #e0e0e0;
    border-color: #999999;
}

.ui-datepicker.history-dp .ui-datepicker-buttonpane button:focus {
    outline: none;
    background-color: #e0e0e0;
}

@media screen and (max-width: 768px) {
    .ui-datepicker.history-dp {
        font-size: 16px;
        width: 320px !important;
    }

    .ui-datepicker.history-dp .ui-datepicker-title {
        font-size: 17px;
    }

    .ui-datepicker.history-dp .ui-datepicker-prev,
    .ui-datepicker.history-dp .ui-datepicker-next {
        width: 36px;
        height: 36px;
        top: 50%;
        transform: translateY(-50%);
    }

    .ui-datepicker.history-dp thead th {
        padding: 6px 0;
        font-size: 14px;
    }

    .ui-datepicker.history-dp td a,
    .ui-datepicker.history-dp td span {
        padding: 8px 4px;
        text-align: center;
        font-size: 15px;
    }

    .ui-datepicker.history-dp .ui-datepicker-buttonpane button {
        padding: 10px 18px;
        font-size: 15px;
    }
}
