/* カレンダーのスタイル */
.jq-button {
    margin: 10px 0px;
    color: #fff;
    background-color: #3476b7;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

.jq-control-group {
    margin-bottom: 15px;
}

.jq-label {
    font-weight: bold;
    color: #333;
}

.jq-input-small {
    width: 100px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.jq-input-mini {
    width: 50px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.date-picker {
    display: none;
    width: 150px;
    cursor: pointer;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding: 5px;
}

.ui-datepicker {
    display: none !important;
    max-width: 340px !important;
    font-size: 12px !important;
    background: #f2f2f2!important;
    border: 1px solid #ddd;
    padding: 5px 10px;
}

.ui-datepicker-row-break {
    width: 0px;
}

.ui-datepicker td {
    border: 0;
    padding: 0px;
}

.ui-datepicker td span, .ui-datepicker td a {
    font-size: 14px !important;
}

/* 通常の日付 */
.ui-datepicker-calendar tbody td .ui-state-default {
    background: #fff;
    color: #0066cc;
    font-weight: bold;
}

/* 選択された日付 */
.highlight-date a {
    background-color: #9f9 !important;
    color: #f11 !important;
    font-weight: bold;
    border: 1px solid #c5c5c5 !important;
}

/* 日曜日（赤色の背景） */
.ui-datepicker-calendar tbody td:nth-child(1) .ui-state-default {
    background-color: #fcf;
}

/* 土曜日（青色の背景） */
.ui-datepicker-calendar tbody td:nth-child(7) .ui-state-default {
    background-color: #cff;
}

/* 無効な日付（他の月） */
.ui-datepicker-other-month a {
    background: #e0e0e0 !important;
    color: #a6a6a6 !important;
    cursor: not-allowed;
    opacity: 0.5;
}

/* 複数月表示時に横並びにする */
.ui-datepicker-multi {
    display: flex !important;  /* 横並びにする */
    justify-content: space-between; /* 均等配置 */
}

/* 1か月分のカレンダーの幅を160pxに調整 */
.ui-datepicker-multi .ui-datepicker-group {
    width: 170px !important;  /* 1か月分のカレンダーの幅を160px */
    padding-right: 2px;
    margin-right: 2px;
}

/* 最後の月には境界線を適用しない */
.ui-datepicker-multi .ui-datepicker-group-last {
    border-right: none;
    margin-right: 0;
}

.ui-datepicker-header {
    background: #fff;
    height: 18px !important;
}

/* ✅ カレンダーのヘッダーエリア（2か月分の上部全体を覆う） */
.ui-datepicker-header-container {
    width: 100%;  /* カレンダーの全幅に合わせる */
    height: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: url(../img/sprite.png);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border: 1px solid #ccc;
    position: absolute;  /* ✅ カレンダーの上部に固定配置 */
    top: -30px;  /* ✅ カレンダーの上に浮かせる */
    left: 0;
    padding: 5px 10px;
    box-sizing: border-box;
    z-index: 200;
}

/* ✅ `×` ボタンのデザイン（右端に固定配置） */
.ui-datepicker-close-btn {
    font-size: 12px;
    color: black;
    background-color: #fff;
    padding: 0px 6px;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    position: absolute;
    right: 10px;
}

/* ✅ `ui-datepicker` の位置調整（2か月表示用） */
.ui-datepicker {
    width: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0px 0px 8px 8px;
    padding: 5px 10px;
    position: absolute !important;
    margin-top: 3px;  /* ✅ カレンダーを少し下にずらして `×` ボタンのスペースを確保 */
    left: 50%;
    transform: translateX(-45%);
}

.date-picker-container {
    position: relative;
    display: inline-block;
}

.calendar-icon {
    cursor: pointer;
    vertical-align: middle;
    padding: 0px 4px;
}
