/*
=============================================================================
コンポーネント指定
=============================================================================
*/
:root {
  --color_cta: #ede302;
}

/*
=============================================================================
検索フォーム系
=============================================================================
*/

/* 検索フォーム全体（紫グラデーション背景、白文字） */
.hotel-search-form {
  background: var(--color_main);
  color: white;
  padding: 30px;
  border-radius: 4px;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 767px) {
  .hotel-search-form {
    padding: 20px 8px;
  }
}

.hotel-search-form .hotel-search-form {
  background: rgba(255, 255, 255, 0.2);
}

@media screen and (max-width: 767px) {
  .hotel-search-form .hotel-search-form {
    padding: 12px;
  }
}

/* 検索フォームのタイトル「🏨 ホテル検索」 */
.hotel-search-form h2 {
  margin: 0 0 25px 0;
  color: white;
  font-size: 1.8em;
  text-align: center;
}

/* 検索項目のグリッドレイアウト（最小280px幅で自動調整） */
.search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

@media screen and (max-width: 767px) {
  .search-grid {
    display: block;
  }
}

/* 各検索項目グループ（ラベル＋入力欄の縦並び） */
.search-group {
  display: flex;
  flex-direction: column;
}

@media screen and (max-width: 767px) {
  .search-group {
    display: block;
    width: 100%;
    margin-bottom: 20px;
  }
}

/* 検索項目のラベル（エリア、キーワードなど） */
.search-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
  font-size: 0.95em;
}

.accordion-content .search-group label,
.accordion-content .search-group .guest-inputs span {
  color: #333;
}

/* 検索フォームの入力欄とセレクトボックス */
.search-group input,
.search-group select {
  padding: 12px 15px;
  border: 1px solid #333;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  font-size: 14px;
  transition: all 0.3s ease;
}

@media screen and (max-width: 767px) {
  .date-group label,
  .date-group input,
  .guest-group label,
  .search-grid .search-group label,
  .search-grid .search-group select {
    display: block;
    width: 100%;
  }

  .search-grid .search-group select#area {
    width: 100%;
  }
}

/* 入力欄フォーカス時のエフェクト（白背景、光る枠、浮き上がり） */
.search-group input:focus,
.search-group select:focus {
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* ゲスト情報（大人・子供・部屋数）の3列グリッド */
.guest-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media screen and (max-width: 767px) {
  .guest-inputs {
    width: 100%;
  }
}

/* ゲスト情報の各項目（大人、子供、部屋数） */
.guest-inputs > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

@media screen and (max-width: 767px) {
  .guest-inputs > div span {
    width: 40px;
  }

  .guest-inputs select {
    width: calc(100% - 60px);
    text-align: center;
  }
}

/* ゲスト情報のラベル（大人、子供、部屋数の文字） */
.guest-inputs span {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.9);
}

/* ゲスト情報のセレクトボックス */
.guest-inputs select {
  width: 100%;
  text-align: center;
}

/* 楽天トラベル上の空き室状況 */
#search-date-rakuten {
  color: #333;
  font-size: 14px;
  padding: 8px;
  margin-bottom: 12px;
}

/*
=============================================================================
検索・リセットボタン系
=============================================================================
*/

/* 検索・リセットボタンの容器（中央配置、横並び） */
.search-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

@media screen and (max-width: 767px) {
  .search-buttons {
    display: block;
  }
}

/* 検索ボタンとリセットボタン共通スタイル */
.search-btn,
.reset-btn {
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s ease;
  min-width: 140px;
  text-align: center;
}

@media screen and (max-width: 767px) {
  .search-btn,
  .reset-btn {
    width: 100%;
    min-width: unset;
  }
}

/* 検索ボタン */
.search-btn {
  background: var(--color_cta);
  color: white;
}

@media screen and (max-width: 767px) {
  .search-btn {
    margin-bottom: 16px;
  }
}

/* 検索ボタンホバー時（濃い赤、浮き上がり、影付き） */
.search-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* リセットボタン（半透明白背景、白枠線） */
.reset-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* リセットボタンホバー時（少し濃く、浮き上がり） */
.reset-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ===================================
   アコーディオン検索フォーム専用CSS
   ================================== */

/* アコーディオンセクション */
.accordion-section {
  margin: 1.5rem 0;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-color, #ffffff);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* アコーディオンヘッダー */
.accordion-header {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--surface-color, #ffffff);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #2c3e50);
  transition: all 0.3s ease;
  text-align: left;
}

.accordion-header:hover {
  background: var(--surface-hover, #f8f9fa);
  color: var(--primary-color, #3498db);
}

.accordion-header.active {
  background: var(--surface-active, #f0f8ff);
  color: var(--primary-color, #3498db);
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

/* アコーディオンタイトル */
.accordion-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.accordion-title i {
  font-size: 1.1rem;
  color: var(--primary-color, #3498db);
}

/* アコーディオンアイコン */
.accordion-icon {
  transition: transform 0.3s ease;
  color: var(--text-secondary, #7f8c8d);
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary-color, #3498db);
}

.accordion-icon i {
  font-size: 1.2rem;
}

/* アコーディオンコンテンツ */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface-color, #ffffff);
}

.accordion-content.open {
  opacity: 1;
  max-height: none;
}

/* アコーディオン内部のパディング */
.accordion-content .search-grid {
  padding: 1.5rem;
  padding-top: 1rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .accordion-header {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .accordion-title i {
    font-size: 1rem;
  }

  .accordion-icon i {
    font-size: 1.1rem;
  }

  .accordion-content .search-grid {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .accordion-header {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .accordion-content .search-grid {
    padding: 0.75rem;
  }

  .accordion-content .search-notice {
    margin: 0.5rem 0.75rem 0.25rem 0.75rem;
    padding: 0.625rem;
  }
}

/* アニメーション効果の強化 */
.accordion-header {
  position: relative;
}

.accordion-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color, #3498db) 0%,
    transparent 100%
  );
  transition: width 0.3s ease;
  opacity: 0.1;
}

.accordion-header:hover::before,
.accordion-header.active::before {
  width: 4px;
}

/* フォーカス状態の改善 */
.accordion-header:focus {
  outline: 2px solid var(--primary-color, #3498db);
  outline-offset: -2px;
}

/* アクセシビリティ向上 */
@media (prefers-reduced-motion: reduce) {
  .accordion-header,
  .accordion-icon,
  .accordion-content,
  .accordion-header::before {
    transition: none;
  }
}

/* ダークモード対応（オプション） */
@media (prefers-color-scheme: dark) {
  .accordion-section {
    border-color: #404040;
    background: #2a2a2a;
  }

  .accordion-header {
    background: #2a2a2a;
    color: #e0e0e0;
  }

  .accordion-header:hover {
    background: #353535;
  }

  .accordion-header.active {
    background: #1a2332;
    border-bottom-color: #404040;
  }

  .accordion-content {
    background: #2a2a2a;
  }

  .accordion-content .search-notice {
    background: linear-gradient(135deg, #4a3728 0%, #3d2f20 100%);
    border-color: #8b6914;
    color: #ffd93d;
  }
}

/*
=============================================================================
注意・メッセージ系
=============================================================================
*/

/* 楽天API利用条件の注意メッセージ（黄色グラデーション） */
.search-notice {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 15px;
  margin: 15px 0;
  color: #856404;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

/*
=============================================================================
検索結果セクション系
=============================================================================
*/

/* 検索結果の各セクション（楽天API結果、DB結果など） */
.search-results-section {
  margin-bottom: 50px;
}

/* 検索結果セクションのタイトル（左側に色付き線） */
.search-results-section h2 {
  color: #333;
  border-left: 5px solid var(--color_main);
  padding-left: 20px;
  margin-bottom: 25px;
  font-size: 1.6em;
}

/* 検索タイプ表示エリア（エリア名、宿泊期間など） */
.search-type-indicator {
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 25px;
  border-left: 5px solid;
}

/* 楽天API検索の表示エリア（黄色グラデーション、オレンジ左線） */
.api-search {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-left-color: #ff6b35;
}

/* データベース検索の表示エリア（水色グラデーション、青左線） */
.database-search {
  background: linear-gradient(135deg, #d1ecf1, #b8daff);
  border-left-color: #667eea;
}

/*
=============================================================================
結果表示・状態系
=============================================================================
*/

/* 楽天API・DB検索の結果件数表示（グレーグラデーション、中央寄せ） */
.api-results-count,
.database-results-count {
  font-size: 18px;
  margin-bottom: 0;
  color: #333;
  font-weight: 600;
}

.database-results-count p {
  margin: 0;
  font-size: 1.1em;
}

/* 検索結果なしの表示（中央寄せ、点線枠、大きな内側余白） */
.no-api-results,
.no-database-results {
  text-align: center;
  padding: 60px 30px;
  color: #666;
  background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
  border-radius: 4px;
  border: 2px dashed #ddd;
}

/* 検索結果なしのタイトル（少し薄いグレー、大きめ文字） */
.no-api-results h3,
.no-database-results h3 {
  color: #888;
  margin-bottom: 15px;
  font-size: 1.3em;
}

/* API利用不可の通知エリア（グレーグラデーション、枠線） */
.api-unavailable-notice {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 2px solid #dee2e6;
  border-radius: 4px;
  padding: 25px;
  margin: 25px 0;
}

/* API利用不可通知のタイトル */
.api-unavailable-notice h3 {
  color: #495057;
  margin-top: 0;
  margin-bottom: 15px;
}

/* API利用不可通知のリスト */
.api-unavailable-notice ul {
  margin: 20px 0;
  padding-left: 25px;
}

/* API利用不可通知のリスト項目 */
.api-unavailable-notice li {
  margin: 10px 0;
}
