/* =========================
   common.css（検索TOP/一覧/詳細共通）
   ========================= */

/* 検索バー（宿泊プラン内） */
.searchbar {
    padding: 14px;
    border-radius: 8px;
    background: #fff;
    margin: 0 0 24px;
}
@media (max-width: 1024px) {
    .searchbar {
        /* PCと同様 */
    }
}
@media (max-width: 767px) {
    .searchbar {
        padding: 12px;
    }
}

/* ▼ 検索バー：共通（既存スタイルはそのまま） */
/* =========================
   検索バー（横一列仕様）
   ========================= */

#searchbar {
    padding: 16px; /* ご指定 */
    background: #fff;
    border-radius: 0;
}
/* Tablet */
@media (max-width: 1024px) {
    #searchbar {
        /* ご指定 */
    }
}
/* iPhone (〜767) */
@media (max-width: 767px) {
    #searchbar {
        /* SP時は後で別途対応予定 */
    }
}

/* 1行で横並び */
#searchbar #js-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap; /* 横一列固定 */
}

/* 各ブロック（ラベル＋フォーム） */
.sb-row {
    display: inline-flex;
    align-items: center;
    gap: 0; /* ラベルとフォームはぴったり接続 */
}

/* ラベル仕様（高さ34 / 背景 / 枠 / 8pxパディング / 12px） */
.sb-label {
    height: 34px;
    line-height: 34px;
    padding: 0 8px;            /* ご指定：padding 8px（左右） */
    background: var(--color-form-th-bg); /* #F5F5F5 */
    border: 1px solid var(--color-form-border); /* #818494 */
    border-radius: 0;
    font-size: 12px;           /* ご指定 */
    color: var(--color-text);
    white-space: nowrap;
}

/* フィールド枠（高さ34 / 枠 / 8pxパディング / 角丸なし） */
.sb-field {
    height: 34px;
    border: 1px solid var(--color-form-border);
    border-left: 0;            /* ラベルと一体化 */
    border-radius: 0;
    display: flex;
    align-items: center;
    padding: 0 8px;            /* ご指定：padding 8px */
    background: #fff;
}

/* 内部の input/select/button は親幅にフィット */
.sb-field input[type="text"],
.sb-field select,
.guest-trigger {
    width: 100%;
    height: 32px;              /* 親が34px・上下8pxパディングだと狭いので、ここは32で中央揃え */
    border: 0;                 /* 外枠は .sb-field が持つ */
    outline: none;
    font-size: 12px;           /* ご指定 */
    border-radius: 0;          /* 角丸なし */
    padding: 0;                /* 余計な左右パディングは親に任せる */
    background: transparent;
    color: var(--color-text);
}

/* カレンダー/ドロップアイコンは一旦消す（幅指定に影響するため） */
.sb-ico,
.guest-trigger::after {
    display: none;
}

/* ▼ 横幅指定（ご指定値） */
.sb-row--checkin .sb-label { width: 104px; }
.sb-row--checkin .sb-field { width: 145px; }

@media (max-width: 1024px) {
    .sb-row--checkin .sb-label { width: 104px; }
    .sb-row--checkin .sb-field { width: 145px; }
}
@media (max-width: 767px) {
    .sb-row--checkin .sb-label { width: 104px; }
    .sb-row--checkin .sb-field { width: 145px; }
}

.sb-row--checkout .sb-label { width: 112px; }
.sb-row--checkout .sb-field { width: 145px; }

@media (max-width: 1024px) {
    .sb-row--checkout .sb-label { width: 112px; }
    .sb-row--checkout .sb-field { width: 145px; }
}
@media (max-width: 767px) {
    .sb-row--checkout .sb-label { width: 112px; }
    .sb-row--checkout .sb-field { width: 145px; }
}

.sb-row--rooms .sb-label { width: 55px; }
.sb-row--rooms .sb-field { width: 65px; }

@media (max-width: 1024px) {
    .sb-row--rooms .sb-label { width: 55px; }
    .sb-row--rooms .sb-field { width: 65px; }
}
@media (max-width: 767px) {
    .sb-row--rooms .sb-label { width: 55px; }
    .sb-row--rooms .sb-field { width: 65px; }
}

.sb-row--guests .sb-label { width: 56px; }
.sb-row--guests .sb-field { width: 137px; }

@media (max-width: 1024px) {
    .sb-row--guests .sb-label { width: 56px; }
    .sb-row--guests .sb-field { width: 137px; }
}
@media (max-width: 767px) {
    .sb-row--guests .sb-label { width: 56px; }
    .sb-row--guests .sb-field { width: 137px; }
}

/* ラッパーを基準にする */
.date-field {
    position: relative;
    display: inline-block;
    width: 100%;             /* 必要に応じて幅を調整 */
}

/* 入力欄 */
.date-field .date-input {
    width: 100%;
    height: 34px;
    padding: 0 32px 0 8px;   /* 右にアイコン分の余白 */
    background: #fff;
    border-left: none;
}

/* 右端のカレンダーアイコン */
.date-field .icon-calendar {
    position: absolute;
    right: 10px;             /* 右端からの距離 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #aaaaaa;          /* アイコン色 */
    pointer-events: none;    /* クリックを邪魔しない */
}

/* 再検索ボタン（横96 / 高さ34 / 角丸なし） */
.sb-row--submit .btn-primary {
    width: 96px;
    height: 34px;
    border-radius: 0;
    font-size: 12px;       /* ご指定に合わせる */
    padding: 0;
    line-height: 34px;     /* テキスト縦中央 */
    text-align: center;
}

/* ラベルとフォームボックスの間の外側余白（各ブロック間の間隔） */
.sb-row + .sb-row {
    margin-left: 8px;
}

/* ▼ 人数トリガー */
.guest-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
}
.guest-trigger::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    width: 10px;
    height: 6px;
    transform: translateY(-50%);
    /* ▼ 任意のドロップダウン矢印 */
    /* background: url('/img/icons/chev-down.svg') no-repeat center / contain; */
    opacity: .6;
}

/* ▼ ポップオーバー（人数） */
.popover {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 340px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    padding: 16px;
    z-index: 20;
    display: none; /* 初期は非表示 */
}
@media (max-width: 767px) {
    .popover {
        min-width: 280px;
        right: 0;
        left: auto;
    }
}

.popover.is-open {
    display: block;
}

.gp-section + .gp-section {
    margin-top: 16px;
}

.gp-title {
    font-size: 12px;
    color: #333333;
    margin-bottom: 6px;
}

/* － ［数値］ ＋ */
.stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.stepper-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
}
.stepper input {
    width: 44px;
    text-align: center;
    border: 1px solid var(--color-border);
    height: 32px;
    border-radius: 4px;
    background: #fff;
}

/* 子供の年齢セレクト */
.gp-ages {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 767px) {
    .gp-ages {
        grid-template-columns: 1fr;
    }
}
.gp-ages .age-row {
    display: grid;
    grid-template-columns: 40px 1fr 24px;
    align-items: center;
    gap: 6px;
}
.gp-ages .age-row label {
    font-size: 12px;
    color: #666666;
}
.gp-ages select {
    height: 36px;
    border: 1px solid var(--color-form-border);
    border-radius: 6px;
    padding: 0 10px;
}
/* ▼ Pikaday：範囲選択の見た目 */
.pika-single td.is-range-start a,
.pika-single td.is-range-end a {
    background: #338CD5;
    color: #fff;
    border-radius: 4px;
}

.pika-single td.is-in-range a {
    background: #E0EEF9;
    color: #000;
    border-radius: 0;
}