/* Hotelipp – Admin Styles */

.hotelipp-admin-wrap h1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hotelipp-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
  flex-wrap: wrap;
}

.hotelipp-search-form input[type="text"] {
  min-width: 260px;
}

#hotelipp-search-results {
  margin-top: 20px;
}

.hotelipp-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.hotelipp-result-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.hotelipp-result-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.hotelipp-result-info {
  padding: 10px 12px;
}

.hotelipp-result-name {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
}

.hotelipp-result-address,
.hotelipp-result-price {
  font-size: 12px;
  color: #666;
  margin: 2px 0;
}

.hotelipp-result-actions {
  padding: 8px 12px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 8px;
}

.hotelipp-searching {
  text-align: center;
  padding: 30px;
  color: #666;
}

.hotelipp-refresh-btn {
  color: #0073aa;
  cursor: pointer;
  text-decoration: underline;
}

.hotelipp-refresh-btn:hover {
  color: #005177;
}

#hotelipp-save-result {
  color: #46b450;
  font-weight: 600;
}

.hotelipp-admin-wrap .form-table th {
  width: 220px;
}

/* ─── 設定画面：サービス情報ボックス ────────── */
.hotelipp-setting-service-info {
  background: #fff;
  border-left: 4px solid #0073aa;
  padding: 10px 14px;
  margin: 6px 0 12px;
  font-size: 13px;
  line-height: 1.8;
  border-radius: 0 4px 4px 0;
}

.hotelipp-setting-service-info a {
  color: #0073aa;
  text-decoration: underline;
}

.hotelipp-setting-service-info a:hover {
  color: #005177;
}

.hotelipp-setting-service-info .description {
  color: #666;
  font-size: 12px;
}

/* バッジ（例: 楽天トラベル経由）*/
.hotelipp-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: normal;
  background: #e8f4fd;
  color: #0073aa;
  border: 1px solid #b3d9f5;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 新API移行バッジ */
.hotelipp-badge-new {
  background: #fff3cd;
  color: #856404;
  border-color: #ffc107;
}

/* アクセスキー未設定警告 */
.hotelipp-api-migration-notice {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 0 4px 4px 0;
  color: #856404;
  font-size: 13px;
}

/* ── Inline Edit Panel ── */
.hip-inline-edit {
  margin-top: 16px;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 6px;
  overflow: hidden;
}
.hip-inline-edit__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #f0f6e8;
  border-bottom: 1px solid #c3d9a8;
}
.hip-inline-edit__check {
  font-weight: 700;
  color: #3a8a2a;
  white-space: nowrap;
}
.hip-inline-edit__name {
  font-size: 14px;
  color: #1e1e1e;
}
.hip-inline-edit__code {
  font-family: monospace;
  font-size: 12px;
  background: #e8f4d4;
  padding: 2px 8px;
  border-radius: 3px;
  color: #3a7a2a;
}
.hip-inline-edit__fulllink {
  margin-left: auto;
  font-size: 12px;
  color: #2271b1;
  text-decoration: none;
  white-space: nowrap;
}
.hip-inline-edit__form {
  padding: 0;
}
.hip-ie-section {
  border-bottom: 1px solid #f0f0f0;
}
.hip-ie-section:last-of-type {
  border-bottom: none;
}
.hip-ie-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #1e1e1e;
  cursor: pointer;
  user-select: none;
  background: #fafafa;
}
.hip-ie-section__title:hover {
  background: #f5f5f5;
}
.hip-ie-arrow {
  font-size: 11px;
  color: #888;
}
.hip-ie-section__body {
  padding: 12px 16px;
  background: #fff;
}
.hip-ie-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hip-ie-row label {
  min-width: 180px;
  font-size: 12px;
  color: #444;
}
.hip-ie-input {
  flex: 1;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  background: #fff !important;
  box-sizing: border-box;
}
.hip-ie-input:focus {
  border-color: #007cba;
  outline: 2px solid rgba(0,124,186,.2);
}
.hip-ie-row-group {
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 8px;
}
.hip-ie-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hip-ie-chk {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  min-width: 0;
}
.hip-ie-note {
  font-size: 11px;
  color: #888;
  margin: 0 0 8px;
}
.hip-ie-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}
.hip-inline-save-result {
  font-size: 13px;
  font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════
   管理画面 設定ページ（ポチップ準拠デザイン）
   h2 = サービス名 → 下線のみ
   h3 = 入力グループ → 左バー（重要箇所）
   .hotelipp-input-card = 入力フォームカード（薄グレー＋影）
   リンク行 = 背景なし・プレーンテキスト
═══════════════════════════════════════════════════════════ */

/* ── ページ全体 ─────────────────────────────────────── */
.hotelipp-settings-wrap {
  max-width: 860px;
  font-size: 14px;
}

/* ── タブヘッダー ────────────────────────────────────── */
.hotelipp-tab-header {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 16px -4px rgba(0,0,0,.1);
  padding: 0 16px;
  margin-top: 16px;
  margin-bottom: 0;
}

.hotelipp-tab-logo {
  padding: 12px 20px 12px 4px;
  border-right: 1px solid #ebebeb;
  margin-right: 6px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.hotelipp-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  flex: 1;
}

.hotelipp-tab {
  display: inline-block;
  padding: 16px 16px;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  border-left: 1px solid rgba(50,50,50,.1);
}

.hotelipp-tab:last-child {
  border-right: 1px solid rgba(50,50,50,.1);
}

.hotelipp-tab::before {
  position: absolute;
  bottom: -2px;
  left: 0;
  display: block;
  width: 100%;
  height: 4px;
  background-color: transparent;
  content: "";
  transition: background-color .15s;
}

.hotelipp-tab:hover {
  color: #2271b1;
  text-decoration: none;
}

.hotelipp-tab:hover::before,
.hotelipp-tab.is-active::before {
  background-color: currentColor;
}

.hotelipp-tab.is-active {
  color: #2271b1;
}

/* ── タブパネル ──────────────────────────────────────── */
.hotelipp-tab-panel {
  display: none;
}

.hotelipp-tab-panel.is-active {
  display: block;
}

/* ── 設定本文エリア ───────────────────────────────────── */
.hotelipp-settings-body {
  margin-top: 1em;
}

/* ── h2: サービス名見出し（ポチップ h2 準拠） ───────────
   下線のみ。左バーなし。背景なし。                       */
.hotelipp-section-title {
  margin: 2em 0 1em !important;
  padding: 8px 4px !important;
  font-size: 1.4em !important;
  font-weight: 700 !important;
  color: #1e1e1e !important;
  border-bottom: 2px solid #333 !important;
  background: transparent !important;
}

.hotelipp-tab-panel > .hotelipp-section-title:first-child,
.hotelipp-settings-body > .hotelipp-section-title:first-child {
  margin-top: 1em !important;
}

/* ── h3: 入力グループ見出し（ポチップ pchpp-setting__h3 準拠） ──
   左バーあり。重要な入力セクションに使用。               */
.hotelipp-input-title {
  margin: 1.75em 0 .75em;
  padding: 8px 16px;
  font-size: 1.15em;
  font-weight: 700;
  color: #1e1e1e;
  border-left: 3px solid #333;
}

/* ── 入力カード（ポチップ .pchpp-setting__div 準拠） ──── */
.hotelipp-input-card {
  padding: 16px;
  background: #fcfcfc;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,0,0,.08);
  margin-bottom: .5em;
}

/* form-table 内スタイル */
.hotelipp-form-table {
  display: block;
  margin: 0 !important;
}

.hotelipp-form-table > tbody {
  display: block;
}

.hotelipp-form-table > tbody > tr {
  display: block;
  margin-bottom: 16px;
}

.hotelipp-form-table > tbody > tr:last-child {
  margin-bottom: 0;
}

.hotelipp-form-table > tbody > tr > th {
  display: block;
  font-weight: 700;
  font-size: 13px;
  padding: 0 0 4px !important;
  width: auto !important;
}

.hotelipp-form-table > tbody > tr > td {
  display: block;
  padding: 0 !important;
}

/* PC幅では横並び */
@media screen and (min-width: 783px) {
  .hotelipp-form-table > tbody > tr {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 20px;
  }

  .hotelipp-form-table > tbody > tr > th {
    flex-basis: 200px;
    flex-shrink: 0;
    padding-top: 4px !important;
  }

  .hotelipp-form-table > tbody > tr > td {
    flex: 1 1 auto;
  }
}

.hotelipp-form-table input[type="text"],
.hotelipp-form-table input[type="url"],
.hotelipp-form-table input[type="number"] {
  background: #fff !important;
}

/* colspan行（PIDグループヘッダー等） */
.hotelipp-form-table tr.hotelipp-group-header th {
  font-size: 13px;
  padding-top: 16px !important;
  padding-bottom: 4px !important;
  color: #444;
  border-bottom: 1px solid #eee;
  margin-bottom: 8px;
}

/* ── 公式サイト・利用規約リンク行（背景なし） ─────────
   ポチップの pchpp-setting__p / pchpp-setting__p-caption 準拠 */
.hotelipp-service-links {
  margin: -.5em 0 1em;
  padding-left: 2px;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
}

.hotelipp-service-links a {
  color: #0073aa;
  text-decoration: underline;
}

.hotelipp-service-links a:hover {
  color: #005177;
}

/* ── 説明テキスト（description）────────────────────── */
.hotelipp-form-table .description {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* ── バッジ ──────────────────────────────────────────── */
.hotelipp-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: normal;
  background: #e8f4fd;
  color: #0073aa;
  border: 1px solid #b3d9f5;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.hotelipp-badge-new {
  background: #fff3cd;
  color: #856404;
  border-color: #ffc107;
}

/* アクセスキー警告 */
.hotelipp-api-migration-notice {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 0 4px 4px 0;
  color: #856404;
  font-size: 13px;
}

/* ── ボタン表示順・グローバル非表示リスト ────────────── */
.hotelipp-sortable-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 560px;
}

.hotelipp-sort-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 4px;
  cursor: default;
  user-select: none;
}

.hotelipp-sort-item:hover { background: #f8f8f8; }
.ui-sortable-helper { box-shadow: 0 4px 12px rgba(0,0,0,.15); background: #fff !important; }
.hotelipp-sort-placeholder { visibility: visible !important; background: #f0f6fc; border: 2px dashed #2271b1; border-radius: 5px; height: 40px; }
.hotelipp-sort-handle { color: #bbb; cursor: grab; font-size: 20px; flex-shrink: 0; }
.hotelipp-sort-handle:active { cursor: grabbing; }
.hotelipp-sort-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.hotelipp-sort-label { flex: 1; font-size: 13px; }
.hotelipp-sort-hide-label { font-size: 12px; color: #555; flex-shrink: 0; }
.hotelipp-sort-hide-label input { margin-right: 3px; }
.hotelipp-sortable-compact .hotelipp-sort-item { padding: 6px 10px; }
.hotelipp-sortable-compact .hotelipp-sort-label { font-size: 12px; }


/* ── カラー入力行 ────────────────────────────────────── */
.hotelipp-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hotelipp-color-input {
  width: 48px !important;
  height: 32px !important;
  padding: 2px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  cursor: pointer;
}

.hotelipp-color-code {
  font-size: 11px;
  color: #999;
  background: transparent;
}

.hotelipp-subsection-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8e8e8;
}

/* ── 保存ボタン行 ────────────────────────────────────── */
.hotelipp-submit-row {
  margin-top: 1.5em !important;
  padding: 16px 0 !important;
  border-top: 1px solid #e0e0e0;
}

/* ── 検索ページ 楽天ラベル ──────────────────────────── */
.hotelipp-search-section-label {
  margin-bottom: 8px;
}

.hotelipp-search-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: #fff3f3;
  border: 1px solid #ffb3b3;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #bf0000;
}

/* ── セール設定UI（セール情報タブ）────────────────────────── */
.hip-sale-row {
  padding: 14px 0 10px;
}
.hip-sale-row + .hip-sale-row {
  border-top: 1px solid #dcdcdc;
  padding-top: 14px;
}
.hip-sale-row__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.hip-sale-row__label {
  font-weight: 700;
  font-size: 13px;
  color: #1e1e1e;
}
.hip-sale-remover {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 24px !important;
  min-height: 0 !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  background-color: #eee !important;
  border-radius: 40px !important;
  border: 1px solid #ddd !important;
  box-shadow: none !important;
  cursor: pointer;
}
.hip-sale-remover:hover {
  background-color: #ddd !important;
}
.hip-sale-row__field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
  max-width: 100%;   /* 親に合わせて収める */
}
.hip-sale-row__field + .hip-sale-row__field {
  margin-top: 8px;
}
.hip-sale-row__field.-time {
  flex-wrap: nowrap;
  width: 100%;
}
.hip-sale-row__key {
  min-width: 2.75em;
  font-size: 13px;
  flex-shrink: 0;
}
.hip-nami {
  display: inline-block;
  padding: 4px 6px;
  font-size: 13px;
  flex-shrink: 0;
}
.hip-sale-row__field.-time input[type="datetime-local"] {
  flex: 1;
  min-width: 0;
  max-width: 180px;   /* 表示テキスト欄と左右端が揃う幅に縮小 */
}
.hotelipp-campaign-wrap {
  padding: 12px 8px 4px;
  border-top: 1px solid #eee;
  margin-top: 8px;
}

/* ── ホテリップ専用テーブル（WordPress .form-table干渉を回避） ── */
.hip-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.hip-table th,
.hip-table td {
  /* WordPress .form-table の display:block を上書き */
  display: table-cell !important;
  float: none !important;
  padding: 8px 10px 8px 0 !important;
  vertical-align: middle !important;
}
.hip-table thead tr {
  border-bottom: 1px solid #ddd;
}
.hip-table thead th {
  font-size: 11px !important;
  color: #555 !important;
  font-weight: 500 !important;
  padding-bottom: 8px !important;
}
.hip-table tbody tr + tr td {
  border-top: 1px solid #f0f0f0;
}
.hip-table tbody td {
  font-size: 13px;
}
/* ホテルID設定テーブル */
.hip-table.hip-table--id th:nth-child(1),
.hip-table.hip-table--id td:nth-child(1) { width: 160px; }
.hip-table.hip-table--id th:nth-child(3),
.hip-table.hip-table--id td:nth-child(3) { width: 150px; white-space: nowrap; }
/* カスタムリンクテーブル */
.hip-table.hip-table--custom th:nth-child(1),
.hip-table.hip-table--custom td:nth-child(1) { width: 80px; }

/* ── ホテルID設定テーブル：input/button を td 幅いっぱいに ── */
.hip-table.hip-table--id td:nth-child(2) input,
.hip-table.hip-table--id td:nth-child(3) a.button {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: center;
}

/* ── セール情報 個別上書きUI（右端揃え） ──────────────────── */
.hip-sale-edit-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.hip-sale-edit-row:last-child { border-bottom: none; }
.hip-sale-edit-label {
  flex: 0 0 130px;
  font-size: 13px;
  font-weight: 600;
  padding-top: 8px;
  color: #1e1e1e;
}
.hip-sale-edit-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hip-sale-edit-text {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}
.hip-sale-edit-period {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.hip-sale-edit-dt {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}
.hip-sale-edit-wave {
  flex-shrink: 0;
  color: #999;
  font-size: 13px;
}

/* ── ホテルID設定：入力欄のテキストを左寄せに ── */
.hip-table.hip-table--id td input {
  text-align: left !important;
}
