/**
 * plan-search-ui.css
 * /plan/ 検索UI用スタイル
 * 全ルール #SearchBlock スコープにロック
 */

/* --- 検索可能セレクト --- */
#SearchBlock .psu-searchable-select {
  position: relative;
  margin-bottom: 8px;
}

#SearchBlock .psu-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}

#SearchBlock .psu-disabled .psu-search-input {
  border-color: #ccc;
  background: #f7f7f7;
  color: #bbb;
  cursor: default;
}

#SearchBlock .psu-search-input:focus {
  border-color: #e85298;
  outline: none;
  box-shadow: 0 0 0 2px rgba(232, 82, 152, 0.15);
}

/* 選択済みフィールド */
#SearchBlock .psu-has-value .psu-search-input {
  border-color: #e85298;
  background: #fff5f9;
  font-weight: bold;
  padding-right: 32px;
}

#SearchBlock .psu-field-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
  z-index: 10;
}

#SearchBlock .psu-field-clear:hover {
  color: #e85298;
}

/* 選択済み候補 */
#SearchBlock .psu-option-selected {
  background: #fff0f5;
  font-weight: bold;
}

/* 単一候補inferred: 明示選択より薄い表示 */
#SearchBlock .psu-inferred .psu-search-input {
  border-color: #ddd;
  background: #f9f9f9;
  color: #888;
  font-weight: normal;
  font-style: italic;
}

#SearchBlock .psu-option-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 0;
}

#SearchBlock .psu-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#SearchBlock .psu-option:hover {
  background: #fff0f5;
}

#SearchBlock .psu-option-count {
  color: #999;
  font-size: 12px;
  margin-left: 8px;
  white-space: nowrap;
}

/* --- セクションラベル --- */
#SearchBlock .psu-section-label {
  font-size: 110%;
  font-weight: normal;
  color: #333;
  margin-bottom: 4px;
}

/* --- チップ型トグル --- */
#SearchBlock .psu-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

#SearchBlock .psu-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #ddd;
  background: #fff;
  transition: all 0.15s ease;
}

#SearchBlock .psu-chip:hover {
  border-color: #e85298;
  background: #fff0f5;
}

#SearchBlock .psu-chip.active {
  background: #e85298;
  color: #fff;
  border-color: #e85298;
}

#SearchBlock .psu-chip-count {
  margin-left: 4px;
  font-size: 11px;
  opacity: 0.7;
}

#SearchBlock .psu-chip-clear {
  margin-left: 6px;
  font-size: 14px;
  opacity: 0.8;
}

#SearchBlock .psu-chip.active .psu-chip-clear:hover {
  opacity: 1;
}

/* コンパニオン種別の色分け */
#SearchBlock .psu-chip.comp-pink { border-color: #e85298; }
#SearchBlock .psu-chip.comp-pink.active { background: #e85298; }
#SearchBlock .psu-chip.comp-cosplay { border-color: #e88fc2; }
#SearchBlock .psu-chip.comp-cosplay.active { background: #e88fc2; }
#SearchBlock .psu-chip.comp-normal { border-color: #5b9bd5; }
#SearchBlock .psu-chip.comp-normal.active { background: #5b9bd5; }

/* 施設条件チップ */
#SearchBlock .psu-chip.facility { border-color: #8bc34a; }
#SearchBlock .psu-chip.facility.active { background: #8bc34a; color: #fff; border-color: #8bc34a; }

/* --- Active filter タグ --- */
/* --- Active Filter Tags --- */
.psu-active-filters {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.psu-active-tag {
  display: inline-flex;
  align-items: center;
  background: #fff1f6;
  border: 1px solid #e7b7c7;
  color: #333;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.psu-tag-remove {
  margin-left: 8px;
  color: #d4407e;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  font-weight: bold;
}

.psu-tag-remove:hover {
  color: #a82e62;
}



/* --- キーワード検索 --- */
#SearchBlock .psu-keyword-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  position: relative;
}

#SearchBlock .psu-keyword-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

#SearchBlock .psu-keyword-input:focus {
  border-color: #e85298;
  outline: none;
}

#SearchBlock .psu-keyword-btn {
  padding: 8px 16px;
  background: #e85298;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
}

#SearchBlock .psu-keyword-btn:hover {
  background: #d4407e;
}

#SearchBlock .psu-keyword-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 4px 0 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e7b7c7;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  list-style: none;
}

#SearchBlock .psu-keyword-suggestions[hidden] {
  display: none;
}

#SearchBlock .psu-keyword-suggestions li {
  margin: 0;
  padding: 0;
}

#SearchBlock .psu-keyword-suggestions a {
  display: block;
  padding: 9px 12px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f3d7e1;
}

#SearchBlock .psu-keyword-empty {
  padding: 9px 12px;
  color: #777;
}

#SearchBlock .psu-keyword-suggestions a:hover {
  background: #fff1f6;
  color: #d4407e;
}

/* --- 全体レイアウト --- */
#SearchBlock .psu-search-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

#SearchBlock .psu-search-grid > div {
  flex: 1;
  min-width: 0;
}

/* 候補なしフィールドは無効化表示 */
#SearchBlock .psu-search-grid > div.psu-empty .psu-search-input,
#SearchBlock .psu-search-grid > div .psu-disabled .psu-search-input,
#SearchBlock .psu-search-grid .psu-search-input:disabled {
  color: #c9c9c9;
  background: #f9f9f9;
  cursor: not-allowed;
}

#SearchBlock .psu-search-grid > div {
  flex: 1;
}

/* 非表示フィールドを除いた残りで均等分割（削除） */

@media (max-width: 768px) {
  #SearchBlock .psu-search-grid {
    flex-direction: column;
  }
}

/* SP: body.S_Phone 配下での調整 */
.S_Phone #SearchBlock .psu-search-grid {
  flex-direction: column;
}

.S_Phone #SearchBlock .psu-search-input {
  font-size: 16px; /* iOS zoom防止 */
}

.S_Phone #SearchBlock .psu-keyword-input {
  font-size: 16px;
}

.S_Phone #SearchBlock .psu-chip {
  font-size: 12px;
  padding: 4px 10px;
}

.S_Phone #SearchBlock .psu-chip-count {
  font-size: 10px;
}

.S_Phone #SearchBlock .psu-option {
  padding: 10px 12px; /* タップ領域を広く */
}

.S_Phone #SearchBlock .psu-option-list {
  max-height: 200px;
}

.S_Phone .psu-active-tag {
  font-size: 12px;
  padding: 4px 10px;
}

/* PC/SP共通の見出しアイコン */
#SearchBlock .psu-section-label {
  display: block;
  font-size: 110%;
  font-weight: normal;
  color: #333;
  margin: 0;
  background-repeat: no-repeat;
  background-position: left center;
}

#SearchBlock .psu-search-grid > div:nth-child(1) .psu-section-label {
  background-image: url(/img/common/icon/icon-search01.png);
}

#SearchBlock .psu-search-grid > div:nth-child(2) .psu-section-label {
  background-image: url(/img/common/icon/icon-search02.png);
}

#SearchBlock .psu-search-grid > div:nth-child(3) .psu-section-label {
  background-image: url(/img/common/icon/icon-search03.png);
}

#SearchBlock .psu-plan-label {
  background-image: url(/img/common/icon/icon-search04.png);
}

#SearchBlock .psu-facility-label {
  background-image: url(/img/common/icon/icon-search06.png);
  margin-top: 24px;
}

#SearchBlock .psu-keyword-label {
  background-image: url(/img/common/icon/icon-search05.png);
  padding-left: 28px;
  background-repeat: no-repeat;
  background-position: left center;
  margin-top: 24px;
}

/* PC専用の見出し・レイアウト調整 */
@media (min-width: 769px) {
  .SearchArea .SearchBlock {
    margin: 0px auto 10px;
  }

  #SearchBlock .psu-section-label {
    min-height: 24px;
    padding-left: 28px;
    background-size: 24px auto;
    margin-bottom: 6px;
  }

  #SearchBlock .psu-horizontal-row {
    display: flex;
    align-items: flex-start;
    border-top: 1px solid #ccc;
    padding-top: 15px;
    margin-top: 15px;
  }

  #SearchBlock .psu-horizontal-row .psu-section-label {
    flex: 0 0 160px;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 32px;
  }

  #SearchBlock .psu-horizontal-row .psu-chip-group,
  #SearchBlock .psu-horizontal-row .psu-facility-details,
  #SearchBlock .psu-horizontal-row .psu-keyword-row {
    flex: 1;
    margin-top: 0;
  }

  #SearchBlock .psu-horizontal-row.psu-keyword-form {
    padding-bottom: 15px;
  }
}

/* SP current-template alignment for added PoC controls. */
.S_Phone #SearchBlock .psu-section-label {
  float: left;
  width: 95px;
  min-height: 35px;
  padding: 13px 0 0 38px;
  background-position: 5px 50%;
  background-size: 30px;
  font-size: 110%;
  box-sizing: content-box;
}

.S_Phone #SearchBlock .psu-search-grid > div:nth-child(1) .psu-section-label {
  background-image: url(/sp/img/common/icon/icon-search01.png);
}

.S_Phone #SearchBlock .psu-search-grid > div:nth-child(2) .psu-section-label {
  background-image: url(/sp/img/common/icon/icon-search02.png);
}

.S_Phone #SearchBlock .psu-search-grid > div:nth-child(3) .psu-section-label {
  background-image: url(/sp/img/common/icon/icon-search03.png);
}

.S_Phone #SearchBlock .psu-plan-label {
  float: none;
  clear: both;
  width: auto;
  border-top: 1px solid #ccc;
  background-image: url(/sp/img/common/icon/icon-search04.png);
  background-size: 28px auto;
}

.S_Phone #SearchBlock .psu-facility-label {
  background-image: url(/sp/img/common/icon/icon-search05.png);
}

.S_Phone #SearchBlock .psu-search-grid {
  display: block;
  margin: 0;
}

.S_Phone #SearchBlock .psu-search-grid > div {
  clear: both;
  min-height: 49px;
  border-top: 1px solid #ccc;
}

.S_Phone #SearchBlock .psu-search-grid > div:first-child {
  border-top: 0;
}

.S_Phone #SearchBlock .psu-search-grid .psu-searchable-select {
  display: block;
  min-height: 43px;
  margin: 0 0 0 133px;
  padding-top: 6px;
}

.S_Phone #SearchBlock .psu-search-grid .psu-search-input {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #333;
  font-size: 110%;
}

.S_Phone #SearchBlock .psu-search-grid .psu-disabled .psu-search-input {
  color: #c9c9c9;
}

.S_Phone #SearchBlock .psu-plan-label + .psu-chip-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin: 0 0 0 0;
  padding: 0 5px 8px 5px;
  box-sizing: border-box;
}

.S_Phone #SearchBlock .psu-plan-label + .psu-chip-group .psu-chip {
  flex: 1 1 0;
  min-width: 0;
  margin: 1%;
  padding: 2%;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 90%;
  line-height: 1.3;
  white-space: normal;
}

.S_Phone #SearchBlock .psu-facility-row {
  clear: both;
  min-height: 48px;
  border-top: 1px solid #ccc;
}

.S_Phone #SearchBlock .SearchTitle01.facility {
  background-image: url(/sp/img/common/icon/icon-search06.png);
  margin-top: 10px;
}

.S_Phone #SearchBlock .SearchTitle01.keyword {
  clear: both;
  background-image: url(/sp/img/common/icon/icon-search05.png);
  margin-top: 10px;
}

.S_Phone #SearchBlock .psu-facility-details {
  margin-left: 133px;
  padding-top: 10px;
}

.S_Phone #SearchBlock .psu-facility-summary {
  cursor: pointer;
  font-size: 90%;
  color: #666;
}

.S_Phone #SearchBlock .psu-facility-details .psu-chip-group {
  margin-top: 8px;
}

.S_Phone #SearchBlock .psu-keyword-label {
  clear: both;
  background-image: url(/sp/img/common/icon/icon-search05.png);
  margin-top: 10px;
}

.S_Phone #SearchBlock .psu-keyword-row {
  clear: none;
  margin: 0 0 0 133px;
  padding: 8px 5px 20px 5px;
  position: relative;
}

.S_Phone #SearchBlock .psu-keyword-input {
  width: 100%;
  box-sizing: border-box;
}

.S_Phone #SearchBlock .psu-keyword-btn {
  display: none;
}

/* SP legacy SearchBlock renderer alignment. */
.S_Phone #SearchBlock .AreaBox > .SearchTitle01.prefectures,
.S_Phone #SearchBlock .OnsenNameBox,
.S_Phone #SearchBlock .ManiAreaBox,
.S_Phone #SearchBlock .SearchTitle01.plan,
.S_Phone #SearchBlock .FacilityConditionBox,
.S_Phone #SearchBlock .SearchTitle01.keyword {
  clear: both;
}

.S_Phone #SearchBlock .OnsenNameBox,
.S_Phone #SearchBlock .ManiAreaBox,
.S_Phone #SearchBlock .FacilityConditionBox,
.S_Phone #SearchBlock .KeywordBox {
  min-height: 48px;
}

.S_Phone #SearchBlock .OnsenNameBox .SearchTitle01,
.S_Phone #SearchBlock .ManiAreaBox .SearchTitle01,
.S_Phone #SearchBlock .FacilityConditionBox .SearchTitle01,
.S_Phone #SearchBlock .SearchTitle01.keyword {
  margin-left: 0;
}

.S_Phone #SearchBlock .PrefName,
.S_Phone #SearchBlock .SpaName,
.S_Phone #SearchBlock .ManiName {
  display: flex;
  align-items: center;
  width: auto;
  margin-left: 133px;
  padding-top: 13px;
  padding-right: 8px;
  font-size: 110%;
  box-sizing: border-box;
}

.S_Phone #SearchBlock .psu-sp-field-text {
  flex: 1 1 auto;
  min-width: 0;
}

#SearchBlock .psu-sp-field-clear {
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid #e7b7c7;
  border-radius: 999px;
  background: #fff;
  color: #d4407e;
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}

#SearchBlock .psu-sp-field-clear:hover {
  background: #fff1f6;
}

.S_Phone #SearchBlock .PrefName.disable .psu-sp-field-clear,
.S_Phone #SearchBlock .SpaName.disable .psu-sp-field-clear,
.S_Phone #SearchBlock .ManiName.disable .psu-sp-field-clear {
  display: none;
}

.S_Phone #SearchBlock .PlanKeywordBox.psu-comp-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  clear: both;
  margin: 0;
  padding: 0 5px 8px 5px;
  box-sizing: border-box;
}

.S_Phone #SearchBlock .PlanKeywordBox.psu-comp-chips > li {
  float: none;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  margin: 1%;
  padding: 2%;
  box-sizing: border-box;
}

.S_Phone #SearchBlock .PlanKeywordBox.psu-comp-chips .CLabel02 {
  font-size: 100%;
  line-height: 1.3;
}

.S_Phone #SearchBlock .KeywordBox.KeywordSearchBox {
  clear: none;
  margin: 0 0 15px 133px;
  padding-top: 8px;
  border-top: 1px solid #ccc;
}

.S_Phone #SearchBlock .KeywordSearch {
  position: relative;
}

.S_Phone #SearchBlock .KeywordSearch .psu-keyword-suggestions {
  top: 34px;
}

.S_Phone #SearchBlock .KeywordSearch .InputSearchBox {
  float: none;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
