/**
 * 部入道予約フォーム — jQuery UI datepicker 表示拡大
 * body の clamp フォントより小さく見えないよう、ポップアップ側を固定で読みやすくする。
 */

#ui-datepicker-div {
    z-index: 10 !important;
}

body .ui-datepicker {
    font-size: 17px;
    width: auto;
    min-width: 19em;
}

body .ui-datepicker .ui-datepicker-header {
    padding: 0.5em 0.2em;
    font-size: 1.05em;
}

body .ui-datepicker table {
    width: 100%;
    font-size: 1em;
    border-collapse: collapse;
    margin: 0 0 0.4em;
}

body .ui-datepicker th {
    padding: 0.55em 0.35em;
    font-weight: 500;
}

body .ui-datepicker td {
    padding: 1px;
}

body .ui-datepicker td span,
body .ui-datepicker td a {
    padding: 0.5em 0.4em;
    text-align: center;
    display: block;
    box-sizing: border-box;
    min-width: 2.4em;
}

body .ui-datepicker .ui-datepicker-prev,
body .ui-datepicker .ui-datepicker-next {
    width: 2em;
    height: 2em;
    top: 50%;
    margin-top: -1em;
}

body .ui-datepicker .ui-datepicker-title {
    line-height: 2em;
    margin: 0 2.5em;
}

/* 狭い画面で min-width がはみ出し、横に見切れるのを防ぐ */
@media screen and (max-width: 480px) {
    #ui-datepicker-div {
        max-width: calc(100vw - 16px);
        box-sizing: border-box;
    }

    body .ui-datepicker {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* 来場日：入力欄右端の ✕（未選択時は無効） */
.preferred-day-field {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
}

.preferred-day-field .preferred-day {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 44px;
}

button.preferred-day-clear {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 42px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}

button.preferred-day-clear:hover:not(:disabled) {
    color: #000;
    background: rgba(0, 0, 0, 0.04);
}

button.preferred-day-clear:focus-visible {
    outline: 2px solid #333;
    outline-offset: -2px;
}

button.preferred-day-clear:disabled {
    opacity: 0;
    pointer-events: none;
}
