@charset "UTF-8";

/* =========================================================
   images.css（画像検索ページ専用：検索対象セグメントUI）
   ---------------------------------------------------------
   ✅ 目的
   - タブ構造を参考画像に寄せる
   - 非選択でも realistic タブは #21b6c7 の薄色で表示
   - 選択中タブはよりはっきりした色
   - 選択中タブとフォームが一体に見える
   - タブ間の背景はページ背景（薄グレー）
   ---------------------------------------------------------
   ✅ 前提
   - .image-search-box に data-style="all" / "illustration" / "realistic" が付く
   - 付かない場合でも「タブ自体の data-style」で色分けは効く
   ========================================================= */


/* -------------------------
   共通変数
-------------------------- */

.image-search-box{
  /* タブ間の隙間色（ページ背景の薄グレー） */
  --page-bg: #efefef;

  /* フォーム面（選択中タブと同じにしたい面色）
     ここは “現在選択中のテーマ” に連動させる */
  --surface: rgba(170,120,255,.08);          /* default = all */
  --surface-strong: rgba(170,120,255,.22);   /* 選択中タブの濃さ */

  /* 入力フォーカスリング（現在テーマ） */
  --ring: rgba(170,120,255,.22);

  /* text / border */
  --text: #111;
  --muted: #666;
  --border-weak: rgba(0,0,0,.06);
  --border: rgba(0,0,0,.10);

  /* radius */
  --radius: 14px;
  --radius-sm: 12px;
  --field-h: 46px;

  margin: 3em 0;

  /* 検索対象ボタンから検索フォームまでを1つの白いカードとして見せる */
  background: #181818;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,.24);
}

/* 選択テーマが illustration のとき（フォーム側の面色やリングを切り替える） */
.image-search-box[data-style="illustration"]{
  --surface: rgba(255,79,179,.08);
  --surface-strong: rgba(255,79,179,.22);
  --ring: rgba(255,79,179,.22);
}

/* 選択テーマが realistic のとき（フォーム側の面色やリングを切り替える） */
.image-search-box[data-style="realistic"]{
  --surface: rgba(33,182,199,.08);
  --surface-strong: rgba(33,182,199,.24);
  --ring: rgba(33,182,199,.20);
}

/* -------------------------
   検索対象セグメントUI
-------------------------- */

.image-search-box .image-search-target{
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 16px;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.image-search-box .image-search-target-label{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 9px 2px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
}

.image-search-box .image-search-target-label::before{
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #a878ff;
  box-shadow: 0 0 0 4px rgba(168,120,255,.13);
}

.image-search-box[data-style="illustration"] .image-search-target-label::before{
  background: #ff4fb3;
  box-shadow: 0 0 0 4px rgba(255,79,179,.13);
}

.image-search-box[data-style="realistic"] .image-search-target-label::before{
  background: #21b6c7;
  box-shadow: 0 0 0 4px rgba(33,182,199,.13);
}

.image-search-box .image-search-tabs{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border-radius: 16px;
  background: #181818;
  border: none;
}

/* タブのデフォルト：非選択は白背景 + 枠線で押せるボタンに見せる */
.image-search-box .image-search-tab{
  --tab-color: #a878ff;
  --tab-color-soft: rgba(168,120,255,.14);
  --tab-color-strong: #a878ff;

  min-width: 0;
  min-height: 48px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 7px;

  padding: 0 12px !important;
  appearance: none;
  cursor: pointer;
  user-select: none;
  text-decoration: none !important;

  border-radius: 13px;
  border: 1px solid rgba(0,0,0,.12) !important;
  background: #fff !important;
  color: rgba(0,0,0,.78) !important;

  font-weight: 900;
  font-size: 15px;
  letter-spacing: .02em;
  line-height: 1.2;

  box-shadow: 0 2px 0 rgba(0,0,0,.05), 0 6px 12px rgba(0,0,0,.05);
  position: relative;
  transform: translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease, color .12s ease, filter .12s ease;
}

.image-search-box .tab-label-sp{
  display: none;
}

.image-search-box .image-search-tab[data-style="illustration"]{
  --tab-color: #ff4fb3;
  --tab-color-soft: rgba(255,79,179,.14);
  --tab-color-strong: #ff4fb3;
}

.image-search-box .image-search-tab[data-style="realistic"]{
  --tab-color: #21b6c7;
  --tab-color-soft: rgba(33,182,199,.14);
  --tab-color-strong: #21b6c7;
}

.image-search-box .image-search-tab:hover{
  color: #000 !important;
  border-color: rgba(0,0,0,.22) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 0 rgba(0,0,0,.06), 0 10px 18px rgba(0,0,0,.08);
  filter: brightness(1.01);
}

.image-search-box .image-search-tab:active{
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 4px 10px rgba(0,0,0,.06);
}

/* 選択中タブ：チェック + 色面 + 白文字で現在地を明確化 */
.image-search-box .image-search-tab.is-active{
  background: var(--tab-color-strong) !important;
  border-color: var(--tab-color-strong) !important;
  color: #fff !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.14), 0 9px 18px var(--tab-color-soft);
  transform: translateY(0);
}

.image-search-box .image-search-tab.is-active::before{
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: var(--tab-color-strong);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.image-search-box .image-search-tab:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,0,0,.12), 0 3px 0 rgba(0,0,0,.06), 0 9px 18px rgba(0,0,0,.08);
}

/* -------------------------
   フォーム（選択中タブと同じ面）
-------------------------- */

.image-search-box .image-search-form{
  background: var(--surface-strong);

  border: 1px solid var(--border-weak);
  border-top: 1px solid var(--border-weak);
  border-radius: 14px;

  margin-top: 12px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  position: relative;
  z-index: 1;
}

/* -------------------------
   フォーム内部
-------------------------- */

.image-search-box .image-search-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.image-search-box .image-search-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.image-search-box .image-search-label{
  font-weight: 900;
  color: var(--text);
  font-size: 13px;
}

/* 入力：白（薄い面の上でも読みやすい） */
.image-search-box .image-search-input,
.image-search-box .image-search-select{
  width: 100%;
  height: var(--field-h);
  padding: 10px 12px;
  font-size: 14px;
  color: #222;

  background: #fff;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: var(--radius-sm);

  box-shadow: 0 2px 0 rgba(0,0,0,.02);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.image-search-box .image-search-input:hover,
.image-search-box .image-search-select:hover{
  border-color: rgba(0,0,0,.22);
}

.image-search-box .image-search-input:focus,
.image-search-box .image-search-select:focus{
  outline: none;
  /* ここは「現在テーマ」の色でリング */
  border-color: rgba(0,0,0,.20);
  box-shadow: 0 0 0 4px var(--ring);
}

/* select矢印 */
.image-search-box .image-search-select{
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* -------------------------
   ボタン（検索/クリア）
-------------------------- */

.image-search-box .image-search-actions{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.image-search-box .image-search-submit,
.image-search-box .image-search-clear{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.image-search-box .image-search-submit .fa,
.image-search-box .image-search-clear .fa{
  line-height: 1;
  position: relative;
  top: 1px;
}

/* 検索：現在テーマの色（illustration/realisticで変えたいならJSで box[data-style] 切替） */
.image-search-box .image-search-submit{
  height: 52px;
  border-radius: 12px;

  border: 1px solid rgba(0,0,0,.06) !important;
  background: #a878ff !important; /* default（all） */
  color: #000 !important;

  font-weight: 900;
  font-size: 16px;
  letter-spacing: .02em;
  transition: filter .12s ease, transform .12s ease;
}

/* illustration のとき検索ボタンをピンクに */
.image-search-box[data-style="illustration"] .image-search-submit{
  background: #ff4fb3 !important;
}

/* realistic のとき検索ボタンを青緑に */
.image-search-box[data-style="realistic"] .image-search-submit{
  background: #21b6c7 !important;
}

.image-search-box .image-search-submit:hover{
  filter: brightness(1.01);
  transform: translateY(-1px);
}
.image-search-box .image-search-submit:active{
  transform: translateY(0);
}

/* クリア：控えめ */
.image-search-box .image-search-clear{
  height: 52px;
  border-radius: 12px;

  border: 1px solid rgba(0,0,0,.12) !important;
  background: rgba(255,255,255,.78) !important;
  color: #000 !important;

  font-weight: 900;
  font-size: 15px;
}

.image-search-box .image-search-clear:hover{
  background: rgba(255,255,255,.90) !important;
}

/* -------------------------
   レスポンシブ
-------------------------- */

@media screen and (max-width:768px){
  .image-search-box{
    padding: 14px;
    border-radius: 18px;
  }
  .image-search-box .image-search-target{
    padding: 0 0 14px;
    border-radius: 0;
  }
  .image-search-box .image-search-target-label{
    margin-bottom: 8px;
    font-size: 12px;
  }
  .image-search-box .image-search-tabs{
    gap: 6px;
    padding: 0;
    border-radius: 14px;
  }
  .image-search-box .image-search-tab{
    min-height: 42px;
    font-size: 13px;
    padding: 0 6px !important;
    letter-spacing: 0;
    gap: 4px;
  }
  .image-search-box .image-search-tab.is-active::before{
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .image-search-box .tab-label-pc{
    display: none;
  }
  .image-search-box .tab-label-sp{
    display: inline;
  }
  .image-search-box .image-search-grid{
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .image-search-box .image-search-actions{
    grid-template-columns: 1fr;
    bottom: 0;
    padding-top: 10px;
    z-index: 5;
    padding-bottom: env(safe-area-inset-bottom);
  }
}


.image-search-error{
    margin: 8em 1em;
    text-align: center;
}


/* =========================================================
   オールブラック統一版
   ---------------------------------------------------------
   外側・タブ周辺・フォーム本体をすべて同系色の黒で統一。
   アクセントはサイト基調のピンクのみ使用。
   ========================================================= */

.image-search-box{
  --ring: rgba(255,79,179,.34);
  background: #141414 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.34) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.image-search-box .image-search-target{
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.image-search-box .image-search-target-label{
  color: #f7f4fb !important;
}

.image-search-box .image-search-target-label::before,
.image-search-box[data-style="illustration"] .image-search-target-label::before,
.image-search-box[data-style="realistic"] .image-search-target-label::before{
  background: #ff4fb3 !important;
  box-shadow: 0 0 0 4px rgba(255,79,179,.16) !important;
}

.image-search-box .image-search-tabs{
  background: #141414 !important;
  border: none !important;
  padding: 0 !important;
}

.image-search-box .image-search-tab,
.image-search-box .image-search-tab[data-style="illustration"],
.image-search-box .image-search-tab[data-style="realistic"]{
  background: #1f1f1f !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 2px 0 rgba(0,0,0,.24), 0 8px 16px rgba(0,0,0,.22) !important;
}

.image-search-box .image-search-tab:hover{
  background: #272727 !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.20) !important;
}

.image-search-box .image-search-tab.is-active{
  background: #ff4fb3 !important;
  color: #fff !important;
  border-color: #ff4fb3 !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.26), 0 10px 18px rgba(255,79,179,.22) !important;
}

.image-search-box .image-search-tab.is-active::before{
  background: rgba(255,255,255,.96) !important;
  color: #ff4fb3 !important;
}

.image-search-box .image-search-form,
.image-search-box[data-style="illustration"] .image-search-form,
.image-search-box[data-style="realistic"] .image-search-form{
  background: #141414 !important;
  border: none !important;
  border-top: none !important;
  border-radius: 0 0 18px 18px !important;
  margin-top: 0 !important;
  padding: 14px !important;
  box-shadow: none !important;
}

.image-search-box .image-search-label{
  color: #f7f4fb !important;
}

/* 入力欄・セレクトもダーク寄りで統一 */
.image-search-box .image-search-input,
.image-search-box .image-search-select{
  background: #f3f3f3 !important;
  color: #111 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-input:hover,
.image-search-box .image-search-select:hover{
  border-color: rgba(255,79,179,.42) !important;
}

.image-search-box .image-search-input:focus,
.image-search-box .image-search-select:focus{
  border-color: rgba(255,79,179,.60) !important;
  box-shadow: 0 0 0 4px rgba(255,79,179,.24) !important;
}

.image-search-box .image-search-submit,
.image-search-box[data-style="illustration"] .image-search-submit,
.image-search-box[data-style="realistic"] .image-search-submit{
  background: #ff4fb3 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.22), 0 10px 18px rgba(255,79,179,.22) !important;
}

.image-search-box .image-search-clear{
  background: #242424 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-clear:hover{
  background: #2b2b2b !important;
}

@media screen and (max-width:768px){
  .image-search-box .image-search-target{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}


/* =========================================================
   Images dark theme phase 2
   ========================================================= */

.image-search-box{
  --ring: rgba(255,79,179,.34);
  --text: #f7f4fb;
  --muted: #b8b8b8;
  background: #141414 !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.34) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.image-search-box .image-search-target{
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.image-search-box .image-search-target-label{
  color: #f7f4fb !important;
}

.image-search-box .image-search-target-label::before,
.image-search-box[data-style="illustration"] .image-search-target-label::before,
.image-search-box[data-style="realistic"] .image-search-target-label::before{
  background: #ff4fb3 !important;
  box-shadow: 0 0 0 4px rgba(255,79,179,.16) !important;
}

.image-search-box .image-search-tabs{
  background: #141414 !important;
  border: none !important;
  padding: 0 !important;
}

.image-search-box .image-search-tab,
.image-search-box .image-search-tab[data-style="illustration"],
.image-search-box .image-search-tab[data-style="realistic"]{
  --tab-color: #ff4fb3;
  --tab-color-soft: rgba(255,79,179,.22);
  --tab-color-strong: #ff4fb3;
  background: #1b1b1b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,79,179,.42) !important;
  box-shadow: 0 2px 0 rgba(0,0,0,.24), 0 8px 16px rgba(0,0,0,.22) !important;
}

.image-search-box .image-search-tab:hover{
  background: #252525 !important;
  color: #fff !important;
  border-color: #ff4fb3 !important;
}

.image-search-box .image-search-tab.is-active{
  background: #ff4fb3 !important;
  color: #fff !important;
  border-color: #ff4fb3 !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.26), 0 10px 18px rgba(255,79,179,.22) !important;
}

.image-search-box .image-search-tab.is-active::before{
  background: rgba(255,255,255,.96) !important;
  color: #ff4fb3 !important;
}

.image-search-box .image-search-form,
.image-search-box[data-style="illustration"] .image-search-form,
.image-search-box[data-style="realistic"] .image-search-form{
  background: #141414 !important;
  border: none !important;
  border-top: none !important;
  border-radius: 0 0 18px 18px !important;
  margin-top: 0 !important;
  padding: 14px !important;
  box-shadow: none !important;
}

.image-search-box .image-search-label{
  color: #f7f4fb !important;
}

.image-search-box .image-search-input,
.image-search-box .image-search-select{
  background: #f3f3f3 !important;
  color: #111 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-input:hover,
.image-search-box .image-search-select:hover{
  border-color: rgba(255,79,179,.42) !important;
}

.image-search-box .image-search-input:focus,
.image-search-box .image-search-select:focus{
  border-color: rgba(255,79,179,.60) !important;
  box-shadow: 0 0 0 4px rgba(255,79,179,.24) !important;
}

.image-search-box .image-search-submit,
.image-search-box[data-style="illustration"] .image-search-submit,
.image-search-box[data-style="realistic"] .image-search-submit{
  background: #ff4fb3 !important;
  color: #fff !important;
  border: 1px solid #ff4fb3 !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.22), 0 10px 18px rgba(255,79,179,.22) !important;
}

.image-search-box .image-search-clear{
  background: #1b1b1b !important;
  color: #fff !important;
  border: 1px solid rgba(255,79,179,.42) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-clear:hover{
  background: #252525 !important;
  border-color: #ff4fb3 !important;
}

@media screen and (max-width:768px){
  .image-search-box .image-search-target{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}


/* =========================================================
   Images dark theme phase 3
   ========================================================= */

.image-search-box{
  background: #141414 !important;
  border: none !important;
  box-shadow: none !important;
}

/* 検索対象ラベル周りも枠線を控えめに */
.image-search-box .image-search-target{
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

/* タブは黒ベース、選択中だけピンク */
.image-search-box .image-search-tab,
.image-search-box .image-search-tab[data-style="illustration"],
.image-search-box .image-search-tab[data-style="realistic"]{
  background: #1b1b1b !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-tab:hover{
  background: #252525 !important;
  border-color: rgba(255,79,179,.60) !important;
}

.image-search-box .image-search-tab.is-active{
  background: #ff4fb3 !important;
  color: #fff !important;
  border-color: #ff4fb3 !important;
  box-shadow: none !important;
}

/* フォームも黒基調。枠線は外し、入力欄とボタンだけ目立たせる */
.image-search-box .image-search-form,
.image-search-box[data-style="illustration"] .image-search-form,
.image-search-box[data-style="realistic"] .image-search-form{
  background: #141414 !important;
  border: none !important;
  box-shadow: none !important;
}

.image-search-box .image-search-submit,
.image-search-box[data-style="illustration"] .image-search-submit,
.image-search-box[data-style="realistic"] .image-search-submit{
  background: #ff4fb3 !important;
  border: 1px solid #ff4fb3 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.image-search-box .image-search-clear{
  background: #1b1b1b !important;
  color: #fff !important;
  border: 1px solid rgba(255,79,179,.50) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-clear:hover{
  background: #252525 !important;
  border-color: #ff4fb3 !important;
}


/* =========================================================
   Images dark theme phase 4
   検索フォームもボタン・入力欄以外は背景なし
   ========================================================= */

.image-search-box,
.image-search-box .image-search-target,
.image-search-box .image-search-tabs,
.image-search-box .image-search-form,
.image-search-box[data-style="illustration"] .image-search-form,
.image-search-box[data-style="realistic"] .image-search-form{
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.image-search-box{
  border: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.image-search-box .image-search-target{
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

.image-search-box .image-search-form,
.image-search-box[data-style="illustration"] .image-search-form,
.image-search-box[data-style="realistic"] .image-search-form{
  border: none !important;
}

.image-search-box .image-search-tab,
.image-search-box .image-search-tab[data-style="illustration"],
.image-search-box .image-search-tab[data-style="realistic"]{
  background: #1b1b1b !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-tab:hover{
  background: #252525 !important;
  border-color: rgba(255,79,179,.60) !important;
}

.image-search-box .image-search-tab.is-active{
  background: #ff4fb3 !important;
  color: #fff !important;
  border-color: #ff4fb3 !important;
}

.image-search-box .image-search-submit,
.image-search-box[data-style="illustration"] .image-search-submit,
.image-search-box[data-style="realistic"] .image-search-submit{
  background: #ff4fb3 !important;
  border: 1px solid #ff4fb3 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.image-search-box .image-search-clear{
  background: #1b1b1b !important;
  color: #fff !important;
  border: 1px solid rgba(255,79,179,.50) !important;
  box-shadow: none !important;
}

.image-search-box .image-search-clear:hover{
  background: #252525 !important;
  border-color: #ff4fb3 !important;
}

.image-search-box .image-search-input,
.image-search-box .image-search-select{
  background: #f3f3f3 !important;
  color: #111 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}
