/* ================================================
   ビジホJP 出張ホテル検索 - 共通スタイル
   ================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:   #1a2744;
  --navy2:  #243358;
  --red:    #e02020;
  --red2:   #c41a1a;
  --bg:     #ffffff;
  --white:  #ffffff;
  --gray1:  #f0f1f4;
  --gray2:  #e0e2ea;
  --gray3:  #b0b5c4;
  --gray4:  #70788a;
  --text:   #1e2533;
  --text2:  #4a5068;
  --green:  #1a7a3a;
  --yellow: #e8a000;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,.10);
  --transition: .18s ease;
}

html { font-size: 16px; }
body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ─── Layout ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

main { flex: 1; padding-bottom: 40px; }

/* ─── Header ──────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 16px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header a { color: var(--white); }
.header-icon { font-size: 1.5rem; }
.header-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.header-sub {
  font-size: .75rem;
  opacity: .75;
  margin-top: 2px;
}

/* ─── Footer ──────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 14px 16px;
  font-size: .8rem;
}
.site-footer a { color: rgba(255,255,255,.85); text-decoration: underline; }

/* ─── Section titles ──────────────────────────── */
.section-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--gray4);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ─── Form Card ───────────────────────────────── */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.form-card + .form-card { margin-top: 0; }

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

label.field-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

select, input[type="date"], input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray2);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2370788a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  transition: border-color var(--transition);
}
input[type="date"] { background-image: none; }
select:focus, input[type="date"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--navy);
}
select:disabled { background-color: var(--gray1); color: var(--gray3); }

/* ─── Date range (Flatpickr) ──────────────────── */
.date-range-wrapper { position: relative; }
.date-range-wrapper input {
  padding-right: 36px;
  cursor: pointer;
}
.date-range-wrapper::after {
  content: '📅';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1rem;
}
.date-range-fallback { display: flex; gap: 10px; }
.date-range-fallback > div { flex: 1; }

/* ─── Stepper ─────────────────────────────────── */
.stepper-row {
  display: flex;
  gap: 16px;
}
.stepper-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.stepper-group .field-label { margin-bottom: 6px; }
.stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray2);
  border-radius: 8px;
  overflow: hidden;
  height: 44px;
}
.stepper-btn {
  width: 44px;
  height: 100%;
  border: none;
  background: var(--gray1);
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.stepper-btn:hover:not(:disabled) { background: var(--gray2); }
.stepper-btn:disabled { color: var(--gray3); }
.stepper-value {
  flex: 1;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: none;
  pointer-events: none;
}

/* ─── Filter chips ────────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border: 1.5px solid var(--gray2);
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.chip input[type="checkbox"] { display: none; }

/* ─── Search button ───────────────────────────── */
.btn-search {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background var(--transition), opacity var(--transition);
  margin-top: 4px;
}
.btn-search:hover:not(:disabled) { background: var(--red2); }
.btn-search:disabled { background: var(--gray3); opacity: .6; cursor: not-allowed; }

.btn-secondary {
  padding: 10px 20px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  transition: background var(--transition);
}
.btn-secondary:hover { background: var(--navy2); }

/* ─── Page hero (index) ───────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  color: var(--white);
  padding: 32px 0 28px;
  text-align: center;
  margin-bottom: 24px;
}
.page-hero .hero-icon { font-size: 2.4rem; margin-bottom: 6px; }
.page-hero h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .03em;
  margin-bottom: 6px;
}
.page-hero p { font-size: .88rem; opacity: .8; }

/* ─── Breadcrumb ──────────────────────────────── */
.breadcrumb {
  padding: 12px 0 8px;
  font-size: .78rem;
  color: var(--gray4);
}
.breadcrumb a { color: var(--navy); text-decoration: underline; }
.breadcrumb span + span::before { content: ' › '; }

/* ─── Destination header card ─────────────────── */
.dest-header-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.dest-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--gray1);
  color: var(--text2);
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dest-header-card h1 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
}

/* ─── Refine form (search.php) ────────────────── */
.refine-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.refine-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.refine-row:last-child { margin-bottom: 0; }
.refine-row .form-group { flex: 1; margin-bottom: 0; }
.refine-row .date-fields { display: flex; gap: 8px; flex: 2; }
.refine-row .date-fields .form-group { flex: 1; }
.refine-row .stepper-group { flex: 1; }
.refine-row .stepper { height: 40px; }
.refine-row select, .refine-row input[type="date"] { font-size: .88rem; padding: 8px 10px; }

/* ─── Sort bar ────────────────────────────────── */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.sort-bar label { font-size: .82rem; color: var(--gray4); font-weight: 600; }
.sort-bar select {
  width: auto;
  padding: 6px 32px 6px 10px;
  font-size: .85rem;
  background-size: 8px;
}

/* ─── Hotel Card ──────────────────────────────── */
/* hotel-card-group がシャドウ・角丸・overflow を一括管理 */
.hotel-card-group {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}
.hotel-card {
  display: block;
  background: var(--white);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  overflow: hidden;
  transition: background var(--transition);
  color: var(--text);
  outline: none;
}
.hotel-card:hover { background: #fafbff; }
.hotel-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.hotel-card:focus { box-shadow: 0 0 0 3px var(--navy); }

.hotel-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--gray1);
}
.hotel-thumb-placeholder {
  width: 100%;
  height: 190px;
  background: var(--gray2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gray3);
}


.hotel-body { padding: 14px 16px 16px; }

.hotel-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.hotel-distance {
  font-size: .78rem;
  color: var(--gray4);
  margin-bottom: 6px;
}

.hotel-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.stars { color: var(--yellow); font-size: .95rem; letter-spacing: -.05em; }
.rating-num { font-size: .9rem; font-weight: 700; color: var(--text); }
.rating-count { font-size: .78rem; color: var(--gray4); }

.hotel-info-list { margin-bottom: 8px; }
.hotel-info-item {
  display: flex;
  gap: 6px;
  font-size: .82rem;
  color: var(--text2);
  margin-bottom: 4px;
  line-height: 1.4;
}
.hotel-info-icon { flex-shrink: 0; width: 18px; }
.hotel-info-text {
  flex: 1;
  overflow: hidden;
}
.hotel-info-text.clamp2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hotel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: .73rem;
  font-weight: 700;
}
.badge-breakfast { background: #fff3e0; color: #b85c00; }
.badge-dinner    { background: #fce4ec; color: #b0003a; }
.badge-parking-free { background: #e8f5e9; color: var(--green); }
.badge-parking   { background: var(--gray1); color: var(--gray4); }

.hotel-review {
  font-size: .82rem;
  color: var(--text2);
  background: var(--gray1);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  line-height: 1.55;
  font-style: italic;
}
.hotel-review::before { content: '"'; }
.hotel-review::after  { content: '"'; }

.hotel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--gray2);
  padding-top: 10px;
}
.hotel-price {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--red);
}
.hotel-price .price-unit {
  font-size: .78rem;
  font-weight: 400;
  color: var(--gray4);
}
.hotel-price-na { font-size: .9rem; color: var(--gray4); }
.btn-detail {
  display: inline-block;
  padding: 8px 16px;
  background: var(--red);
  color: var(--white);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--transition);
}
.hotel-card:hover .btn-detail { background: var(--red2); }

/* ─── Pagination ──────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid var(--gray2);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { background: var(--gray1); }
.page-btn.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.page-info { font-size: .82rem; color: var(--gray4); padding: 0 6px; }

/* ─── Empty / Error states ────────────────────── */
.state-empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.state-empty .state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.state-empty h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.state-empty p { font-size: .88rem; color: var(--text2); }

.alert-error {
  background: #fff0f0;
  border: 2px solid #e02020;
  border-radius: 8px;
  padding: 14px 16px;
  color: #b00000;
  font-size: .88rem;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}

/* ─── Result count ────────────────────────────── */
.result-meta {
  font-size: .82rem;
  color: var(--gray4);
  margin-bottom: 8px;
}

/* ─── Onsite Coverage ─────────────────────────── */
/* セクション全体が <a> タグでクリッカブル */
.onsite-coverage {
  display: block;
  background: #eef1fb;
  border: 10px solid #ffffff;
  padding: 12px 16px 14px;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}
.onsite-coverage:hover { background: #e4e9f8; }
.onsite-coverage-title {
  font-size: .78rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.onsite-coverage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  margin-bottom: 12px;
}
.onsite-coverage-table th,
.onsite-coverage-table td {
  padding: 4px 6px;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 1px solid #d0d6ee;
  color: var(--text2);
}
.onsite-coverage-table th {
  font-weight: 600;
  white-space: nowrap;
  width: 38%;
}
.onsite-coverage-table td {
  color: var(--text);
  font-weight: 400;
}
.onsite-coverage-table tr:last-child th,
.onsite-coverage-table tr:last-child td {
  border-bottom: none;
}
.btn-article {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 700;
  transition: background var(--transition);
}
.onsite-coverage:hover .btn-article { background: var(--navy2); }

/* ─── Flatpickr z-index & clear button ───────── */
.flatpickr-calendar { z-index: 9999 !important; }
.fp-clear-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 8px 8px 4px;
  padding: 7px 12px;
  background: var(--gray1);
  color: var(--text2);
  border: 1.5px solid var(--gray2);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition);
}
.fp-clear-btn:hover { background: var(--gray2); }

/* ─── Internal Link Corner ────────────────────── */
.internal-links {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray2);
}
.internal-links-pref {
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.internal-links-pref:hover {
  border-color: var(--gray2);
}
.internal-links-pref summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text2);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.internal-links-pref summary::-webkit-details-marker { display: none; }
.internal-links-pref summary::after {
  content: '▶';
  font-size: .72rem;
  color: var(--gray4);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 8px;
}
.internal-links-pref[open] > summary::after {
  transform: rotate(90deg);
}
.internal-links-pref-body {
  padding: 4px 10px 10px;
}
.internal-links-factory {
  margin-bottom: 10px;
  padding-left: 8px;
}
.internal-links-factory-title {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.internal-links-factory-title a {
  color: var(--navy);
  text-decoration: underline;
}
.internal-links-company-list {
  list-style: none;
  padding-left: 12px;
}
.internal-links-company-list li {
  font-size: .82rem;
  margin-bottom: 2px;
}
.internal-links-company-list a {
  color: var(--text2);
  text-decoration: underline;
}

/* ─── Refine form toggle ──────────────────────── */
details.refine-card {
  padding: 0;
}
details.refine-card > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  user-select: none;
}
details.refine-card > summary::-webkit-details-marker { display: none; }
.refine-summary-text {
  flex: 1;
  font-size: .82rem;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.refine-summary-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
}
.refine-summary-icon {
  font-size: .72rem;
  color: var(--navy);
  transition: transform var(--transition);
}
details.refine-card[open] > summary .refine-summary-icon {
  transform: rotate(90deg);
}
details.refine-card > form {
  padding: 0 20px 16px;
  border-top: 1px solid var(--gray2);
}

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 480px) {
  .refine-row { flex-direction: column; }
  .stepper-row { gap: 10px; }
  .hotel-thumb, .hotel-thumb-placeholder { height: 160px; }
  .hotel-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .btn-detail { width: 100%; text-align: center; }
}
@media (min-width: 600px) {
  .hotel-card { display: flex; flex-direction: row; }
  .hotel-thumb, .hotel-thumb-placeholder { width: 200px; height: auto; min-height: 180px; flex-shrink: 0; }
  .hotel-body { flex: 1; }
  .onsite-coverage { padding: 12px 20px 16px; border:10px sollid #ffffff }
}
