/* Custom styles not available in the main CSS */
body {
  background-image: url(/common/img/background.webp);
  background-position: center;
}

/* ▼ select 初期値をグレーに */
select {
  color: #000;
}
select:invalid {
  color: #aaa;
}

/* ▼ number input の初期色を明示（デフォルトでは黒） */
input[type="number"] {
  color: #000;
}

/* ▼ 初期値 0 ならグレーにしたい場合（optional）*/
input[type="number"][value="0"] {
  color: #aaa;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 0;
}

.page-title {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  color: var(--color-primary);
  letter-spacing: 3.6px;
  font-weight: 600;
}

header {
  text-align: center;
  margin: 24px 0 24px 0;
}

header img {
  width: 300px;
}

.airport p {
  margin: 5px 0 0;
  font-size: var(--spacing-md);
  font-weight: 200;
  color: #000000;
  letter-spacing: 1px;
  line-height: 155%;
}

.transfer-container {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 40px;
  background-color: white;
}

.transfer-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  padding: 15px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

.transfer-icon {
  width: 60px;
  height: 60px;
  font-size: var(--spacing-xl);

  background-color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 8px;
}

.transfer-icon img {
  width: 80%;
}

.transfer-title {
  text-align: center;
}

.transfer-title h2 {
  margin: 0;
  font-size: 20px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.transfer-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
}

.tab {
  padding: 12px 20px;
  background-color: #f9f9f9;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  flex: 1;
  text-align: center;
}

.tab.active {
  background-color: #fff;
  border-bottom-color: #ef2828;
  font-weight: bold;
}

.tab-content {
  display: none;
  padding: 20px;
  background-color: #fff;
}

.tab-content.active {
  display: block;
}

.section {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px dotted #ddd;
}
img.icon {
    width: 17px;
    margin-right: 8px;
}

.section:last-child {
  border-bottom: none;
}

.section h3 {
  font-size: var(--spacing-md);
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  display: flex;
  align-items: center;
  text-align: left;
}

.section h3 span {
  margin-right: 8px;
}

.section-content {
  padding-left: 25px;
}

.info-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
  line-height: 155%;
  font-size: var(--spacing-md);
}

.info-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-bg-dark);
}

.note-box {
  background-color: #f8f9fa;
  border-left: 4px solid #ffc107;
  padding: 10px 15px;
  margin: 15px 0;
  font-size: var(--spacing-md);
  letter-spacing: 1px;
  line-height: 155%;
}

.request-btn {
  background-color: #404244;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
  margin-top: 15px;
}

.request-btn:hover {
  background-color: var(--color-hover);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: bold;
}

.flight-info-section .form-group label,
.flight-info-section .form-group label {
  text-align: center;
}

.form-control {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  height: 45px;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.flight-info-content .form-row {
  margin-bottom: 0px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.rates-info {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  background-color: #f5f5f5;
  margin-top: 15px;
}

.flight-info-section {
  margin-bottom: 20px;
}

.flight-info-header {
  background-color: #f5f5f5;
  padding: 15px;
  font-weight: bold;
  border: 1px solid #ddd;
  border-radius: 4px 4px 0 0;
  text-align: center;
}

.flight-info-content {
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  padding: 20px;
  display: block;
}

.quantity-input {
  display: flex;
  align-items: center;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

.quantity-btn:hover {
  background-color: #e0e0e0;
}

.quantity-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.quantity-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.quantity-input input {
  width: 50px;
  height: 36px;
  text-align: center;
  border: 1px solid #ddd;
  border-left: none;
  border-right: none;
  font-size: 14px;
  padding: 0 5px;
}

/* Remove number input arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

input[type=number] {
  -moz-appearance: textfield;
}

.passenger-section {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}

.passenger-group {
  flex: 1;
  min-width: 200px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
}

.passenger-group h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 15px;
  text-align: center;
}

.baggage-section {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.baggage-group {
  flex: 1;
  min-width: 200px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
}

.baggage-group h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 15px;
  text-align: center;
}

.phone-input-container {
  display: flex;
  gap: 5px;
}

.country-code {
  width: 44%;
  padding: 12px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  height: 45px;
  background-color: #fff;
}

.phone-number {
  flex: 1;
}

.baggage-section .quantity-input,
.passenger-group .quantity-input {
  justify-content: center;
}

.annotation {
  font-size: var(--spacing-sm);
}

/* Added styles for passenger list */
.passenger-list-section {
  margin-top: 20px;
}

.passenger-list-container {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
}

.passenger-list-container h4 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 15px;
  text-align: center;
}

.passenger-list-area {
  width: -webkit-fill-available;
  width: -moz-available;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
}

/* 時間選択用のスタイル */
.time-select-container {
  display: flex;
  align-items: center;
}

.time-select {
  flex: 1;
  padding: 8px 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 45px;
  background-color: #fff;
}

.time-separator {
  margin: 0 5px;
  font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .time-select-container {
    flex-direction: row;
  }
  
  .time-select {
    flex: 1;
  }
}

/* Responsive styles */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .transfer-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .tab {
    padding: 10px;
    font-size: 14px;
  }
  
  .passenger-group,
  .baggage-group {
    flex: 100%;
  }
  
  .phone-input-container {
    flex-direction: column;
    gap: 10px;
  }
  
  .country-code {
    width: 100%;
  }
  
  .section-content {
    padding-left: 0px;
  }
  .section h3 {
    display: block;
    text-align: center;
  }
  img.icon {
    vertical-align: sub;
    margin-right: 0px;
  }
}

/* Thank you popup message */
#thankYouPopup {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.7); 
  z-index: 1000;
}

.popup-content {
  position: absolute; 
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  background-color: white; 
  padding: 30px; 
  border-radius: 8px; 
  text-align: center; 
  max-width: 400px; 
  width: 90%;
}

.popup-content h3 {
  margin-top: 0; 
  color: #0056b3;
}

.popup-close {
  background-color: #4285f4; 
  color: white; 
  border: none; 
  padding: 10px 20px; 
  border-radius: 4px; 
  cursor: pointer; 
  margin-top: 15px;
}
/* CSS for disabled form fields */
.disabled-field {
  background-color: #f2f2f2 !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  pointer-events: none;
}

.disabled-button {
  background-color: #cccccc !important;
  color: #666666 !important;
  cursor: not-allowed !important;
}

.disabled-btn {
  background-color: #e0e0e0 !important;
  color: #aaa !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Make the trip type dropdown stand out when nothing is selected */
#tripType:invalid {
  border: 2px solid #ef2828;
  background-color: #fff9f9;
}

/* Add a subtle hint to show users they need to select trip type first */
.form-inactive-message {
  display: none;
  text-align: center;
  color: #ef2828;
  font-size: 14px;
  margin: 10px 0;
  padding: 10px;
  background-color: #fff9f9;
  border: 1px solid #ffe6e6;
  border-radius: 4px;
}

/* Show the message when form is inactive */
.form-inactive .form-inactive-message {
  display: block;
}

#transferForm input::placeholder,
#transferForm textarea::placeholder {
  color: #aaa;
}

#transferForm input,
#transferForm textarea {
  color: #000;
}

/* 日付入力のスタイル調整 */
input[type="date"] {
  color: #000; /* 入力済み時の文字色 */
}

/* 空の状態（未入力時）のスタイル */
input[type="date"]:not(:valid),
input[type="date"]:not(:focus):invalid {
  color: #aaa;
}

/* Webkit系ブラウザ向けの日付エディタ部分のスタイル */
input[type="date"]::-webkit-datetime-edit {
  color: #aaa;
}

input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit {
  color: #aaa;
}

input[type="date"]:focus::-webkit-datetime-edit,
input[type="date"]:valid::-webkit-datetime-edit {
  color: #000;
}

/* エラー状態のフォームフィールド */
.passenger-list-area.error,
.form-control.error,
.time-select-container.error .time-select,
.quantity-input.error input {
  border: 1px solid #e53935 !important;
  background-color: #ffebee !important;
}

/* ツールチップスタイル */
.tooltip {
  position: relative;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: #e53935;
  color: white;
  text-align: center;
  border-radius: 4px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #e53935 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* エラーメッセージコンテナ */
.error-container {
  margin-top: 5px;
  color: #e53935;
  font-size: 12px;
  display: none;
  padding: 4px 8px;
  background-color: #ffebee;
  border-left: 3px solid #e53935;
  border-radius: 0 4px 4px 0;
}

/* フォーム内のエラーメッセージ表示用の拡張 */
.form-group.has-error .error-container,
.passenger-group.has-error .error-container,
.passenger-list-container.has-error .error-container,
.time-select-container.has-error .error-container {
  display: block;
}

/* 特殊なコンテナ用のエラースタイル */
.passenger-group.has-error,
.passenger-list-container.has-error {
  border-color: #e53935;
  background-color: #ffebee;
}

/* エラーメッセージがフォーム要素直下に表示される場合のスタイル */
.form-control + .error-container,
.time-select-container + .error-container,
.quantity-input + .error-container,
.passenger-list-area + .error-container {
  margin-top: 5px;
  display: block;
}


/* フォーム送信時に最初のエラー要素にスクロールするためのスタイル */
.scroll-to-error {
  scroll-margin-top: 100px;
}

/* Safari対応のselect要素スタイル修正 */

/* 全てのselect要素に共通の基本スタイルを適用 */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: #000;
  box-sizing: border-box;
  /* カスタム矢印アイコンを追加 */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px; /* 矢印のスペースを確保 */
}

/* フォーカス時のスタイル */
select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* 無効状態のスタイル */
select:invalid {
  color: #aaa;
}

/* 特定のselect要素への個別調整 */

/* 旅行タイプ選択 */
#tripType {
  width: 100%;
  padding: 12px 40px 12px 10px;
  height: 45px;
}

/* 国番号選択 */
.country-code {
  width: 44%;
  padding: 12px 40px 12px 10px;
  height: 45px;
}

/* 時間選択（時・分） */
.time-select {
  flex: 1;
  padding: 8px 30px 8px 5px;
  height: 45px;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 25px;
}

/* Safari専用の追加修正 */
@supports (-webkit-appearance: none) {
  select {
    /* Safariでのフォント調整 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Safariでのpadding調整 */
    padding-top: 12px;
    padding-bottom: 12px;
  }
  
  /* 時間選択のSafari専用調整 */
  .time-select {
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 14px;
  }
  
  /* 国番号選択のSafari専用調整 */
  .country-code {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  
  /* 旅行タイプ選択のSafari専用調整 */
  #tripType {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  select {
    font-size: 16px; /* iOS Safariでのズーム防止 */
  }
  
  .time-select {
    background-size: 12px;
  }
}

/* 既存のスタイルとの統合 */
.form-control[type="select"],
.form-control select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* エラー状態の調整 */
select.error {
  border-color: #e53935 !important;
  background-color: #ffebee !important;
}

/* ホバー効果 */
select:hover:not(:disabled) {
  border-color: #999;
}

/* 選択済み状態 */
select:valid {
  color: #000;
}