/* =============================================================
   cf7-reservation-calendar — architex テーマ側デザイン調整
   （プラグインは機能 CSS のみ提供、案件固有のデザインはここで上書き）
   ============================================================= */

/* --- wrapper 全体 --- */
.cf7rc-date-wrapper {
    display: block;
    text-align: center;
}
.cf7rc-date-wrapper .cf7rc-datepicker-display {
    display: block;
    width: 100%;
    /* max-width は指定しない → 他のテキスト入力と同じく dd 幅いっぱい */
    box-sizing: border-box;
    margin-top: 1em;
    padding: 0.9em 1.2em;
    background: #f5f5f5;
    border: none;
    font-size: 0.95em;
    color: #7a7a7a;
    cursor: default;
}

/* 時間プルダウン（他のフォーム入力と同じ幅・白背景に揃える）
   lower.css の .l-contact-dl dd select (特異度 0,2,1) に勝つため
   .l-contact-dl dd select.cf7rc-timepicker (0,3,1) で上書き
   モバイル時は lower.css の input[type=text] と同じ 100vw - 左マージン相殺で
   ビューポート全幅に揃える */
.cf7rc-date-wrapper .cf7rc-timepicker,
.l-contact-dl dd select.cf7rc-timepicker {
    display: block;
    /* width: 100vw; */
    height: 60px;
    box-sizing: border-box;
    margin: 1em 0 0 0;
    padding: 0 30px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
    font-size: 0.95em;
    color: #333;
    cursor: pointer;
    -webkit-appearance: auto;
       -moz-appearance: auto;
            appearance: auto;
}
@media screen and (min-width: 1000px) {
    .cf7rc-date-wrapper .cf7rc-timepicker,
    .l-contact-dl dd select.cf7rc-timepicker {
        width: 100%;
        height: 3.9vw;
        margin: 1em 0 0;
        padding: 0 10px;
    }
}

/* --- インラインカレンダー本体（中央寄せ） --- */
.cf7rc-datepicker-inline {
    display: inline-block;
    width: 100%;
    /* max-width: 440px; */
    margin: 0 auto;
    padding: 0;
    text-align: left;  /* カレンダー内部は左詰めに戻す */
}
@media screen and (min-width: 768px) {
    .cf7rc-datepicker-inline {
        width: 100%;
    }
}
.cf7rc-datepicker-inline .ui-datepicker.ui-widget-content {
    width: 100%;
    margin-bottom: 1rem;
    padding: 1em;
    border: none;
    background: #fff;
    font-family: 'Marcellus', 'Shippori Mincho', serif;
}
.cf7rc-datepicker-inline .ui-widget-header {
    background: transparent;
    border: none;
    color: inherit;
    font-weight: normal;
    padding: 1em 0 0.5em;
    position: relative;
}

/* --- ヘッダー：年月の縦並び表示 ---
   jQuery UI は title の <span> 間に &nbsp; テキストノードを挿入する。
   flex column 下では匿名 flex item になって独立行を作ってしまうため、
   親を font-size:0 にしてテキストノードを視覚的に消し、子 <span> は
   rem 単位で実サイズを再指定する。 */
.cf7rc-datepicker-inline .ui-datepicker-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-size: 0;
}
.cf7rc-datepicker-inline .ui-datepicker-month {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: #000;
    line-height: 0.6;
}
.cf7rc-datepicker-inline .ui-datepicker-year {
    font-size: 1.2rem;
    color: #333;
    border-top: 1px solid #333;
    padding-top: 1em;
    margin-top: 0.5em;
    min-width: 4em;
    text-align: center;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* --- 前月／翌月ボタン --- */
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-prev,
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.2em;
    height: 2.2em;
    cursor: pointer;
    background: none;
    border: none;
    text-align: center;
    padding: 0;
}
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-prev { left: 1em; }
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-next { right: 1em; }
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-prev .ui-icon,
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-next .ui-icon { display: none; }
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-prev::before,
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-next::before {
    font-size: 1.1em;
    color: #000;
    line-height: 2.2em;
}
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-prev::before { content: "◀"; }
.cf7rc-datepicker-inline .ui-datepicker .ui-datepicker-next::before { content: "▶"; }
.cf7rc-datepicker-inline .ui-datepicker-prev-hover,
.cf7rc-datepicker-inline .ui-datepicker-next-hover {
    background: none;
    border: none;
    top: 50%;
    left: 1em;
}
.cf7rc-datepicker-inline .ui-datepicker-next-hover { left: auto; right: 1em; }

/* --- 曜日ヘッダーは非表示（現行サイト踏襲） --- */
.cf7rc-datepicker-inline .ui-datepicker thead {
    display: none;
}

/* --- 日付グリッド --- */
.cf7rc-datepicker-inline .ui-datepicker-calendar {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0.5em 0.9em;
    margin: 0;
}
.cf7rc-datepicker-inline .ui-datepicker-calendar td {
    text-align: center;
    padding: 0;
    border: none;
    background: transparent;
}
.cf7rc-datepicker-inline .ui-datepicker-calendar td a,
.cf7rc-datepicker-inline .ui-datepicker-calendar td span {
    display: block;
    padding: 0.6em 0;
    border: none;
    background: transparent;
    font-family: 'Marcellus', serif;
    font-size: 1.3em;
    font-weight: 500;
    text-align: center;
    color: #111;
    text-decoration: none;
    transition: background 0.15s ease;
}

/* 土曜（列 6）= 青 / 日曜（列 0）= 赤。firstDay:0 前提 */
.cf7rc-datepicker-inline .ui-datepicker-calendar td:first-child a,
.cf7rc-datepicker-inline .ui-datepicker-calendar td:first-child span {
    color: #b52020;
}
.cf7rc-datepicker-inline .ui-datepicker-calendar td:last-child a,
.cf7rc-datepicker-inline .ui-datepicker-calendar td:last-child span {
    color: #1a4fa0;
}

/* 選択不可日（グレーアウト） */
.cf7rc-datepicker-inline .ui-datepicker-unselectable span,
.cf7rc-datepicker-inline .ui-datepicker-unselectable a {
    color: #6b6b6b !important;
    background: transparent !important;
    cursor: not-allowed;
}

/* 前月／翌月のはみ出し日もグレー */
.cf7rc-datepicker-inline .ui-datepicker-other-month span,
.cf7rc-datepicker-inline .ui-datepicker-other-month a {
    color: #a8a8a8 !important;
}

/* 今日（薄い黄色ハイライト）
   unselectable の background:transparent !important を打ち消すため !important を付ける */
.cf7rc-datepicker-inline .ui-datepicker-today a,
.cf7rc-datepicker-inline .ui-datepicker-today span {
    background: #fde6a6 !important;
}

/* ホバー（今日と同じ薄黄色） */
.cf7rc-datepicker-inline .ui-datepicker-calendar td a:hover,
.cf7rc-datepicker-inline .ui-state-hover {
    background: #fde6a6 !important;
    color: inherit !important;
    border: none !important;
}

/* 選択中（テーマアクセントカラー：ゴールド、文字は白抜き） */
.cf7rc-datepicker-inline .ui-state-active,
.cf7rc-datepicker-inline .ui-datepicker-calendar td a.ui-state-active {
    background: #c8b478 !important;
    color: #fff !important;
    border: none !important;
}

