/* 强制隐藏原生的 APP 推广区块（React动态渲染的各种可能容器） */
div[data-component="AppOmioPassTips"],
section[data-component="AppOmioPassTips"],
div[data-component="AppBanner"],
section[data-component="AppBanner"],
[class*="appBanner"],
[class*="AppBanner"],
.OurFreeApp_container,
[data-test="app-banner"] {
  display: none !important;
}

/* 覆盖顶部英雄横幅 (Hero Banner) 的背景图片 */
[data-component="Hero"],
[data-test="hero-banner"],
[data-testid="hero-banner-container"],
div[style*="hero.jpg"] {
  background-image: url('assets/背景图.png') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* 隐藏 Hero Banner 里的标题文案 ("Global travel all in one place" 及副标题) */
[data-testid="hero-banner-container"] h1,
[data-component="Hero"] h1,
[data-headline-type="main"] {
  display: none !important;
}

/* 针对有些可能用 img 标签或者伪元素实现背景的情况进行兜底隐藏（仅限顶部区块） */
[data-component="Hero"] > img[src*="hero"],
[data-test="hero-banner"] > img[src*="hero"] {
  display: none !important;
}

.custom-features-wrapper {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #425486;
}

.custom-features-wrapper h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #132968;
}

/* Left Side: Traditional Search */
.traditional-search-block {
  flex: 4;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.search-form-container {
  background-color: #f9f9fa;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.search-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.search-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-input-group label {
  font-size: 14px;
  font-weight: bold;
  color: #425486;
}

.search-input-group input,
.search-input-group select {
  padding: 12px 16px;
  border: 1px solid #dcdfe9;
  border-radius: 8px;
  font-size: 16px;
  color: #425486;
  outline: none;
  background-color: #fff;
  transition: all 0.2s;
}

.search-input-group input:focus,
.search-input-group select:focus {
  border-color: #fa6b6b;
  box-shadow: 0 0 0 3px rgba(250, 107, 107, 0.1);
}

.search-swap-icon {
  margin-top: 24px;
  width: 32px;
  height: 32px;
  background-color: #fff;
  border: 1px solid #dcdfe9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fa6b6b;
  cursor: pointer;
  flex-shrink: 0;
}

.search-action-row {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.transport-select {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #dcdfe9;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background-color: #fff;
}

.btn-primary-search {
  flex: 2;
  padding: 12px 24px;
  background-color: #fa6b6b;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary-search:hover {
  background-color: #e55a5a;
}

/* 搜索结果区域 */
.results-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  overflow-y: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  color: #717fa4;
  text-align: center;
  background-color: #f9f9fa;
  border-radius: 12px;
  border: 1px dashed #dcdfe9;
}

.search-results-header {
  font-size: 16px;
  font-weight: bold;
  color: #132968;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e9e9e9;
}

/* 全新设计的搜索结果卡片 */
.new-ticket-card {
  border: 1px solid #dcdfe9;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.new-ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #fa6b6b;
}

.ticket-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticket-company-logo {
  width: 48px;
  height: 48px;
  background-color: #f1f2f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #132968;
}

.ticket-time-block {
  display: flex;
  flex-direction: column;
}

.time-main {
  font-size: 20px;
  font-weight: bold;
  color: #132968;
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-divider {
  color: #a1a9c3;
  font-size: 14px;
}

.time-sub {
  font-size: 13px;
  color: #717fa4;
  margin-top: 4px;
}

.ticket-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ticket-duration {
  font-size: 14px;
  font-weight: bold;
  color: #425486;
}

.ticket-type {
  font-size: 12px;
  color: #717fa4;
  background-color: #f1f2f6;
  padding: 2px 8px;
  border-radius: 12px;
}

.ticket-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.ticket-price {
  font-size: 22px;
  font-weight: bold;
  color: #132968;
}

.btn-book-sm {
  padding: 8px 24px;
  background-color: #fa6b6b;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-book-sm:hover {
  background-color: #e55a5a;
}

.btn-book {
  padding: 12px 24px;
  background-color: #fa6b6b;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-book:hover {
  background-color: #e55a5a;
}

/* Right Side: AI Planner */
.ai-planner-block {
  flex: 6;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.ai-chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid #dcdfe9;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f9f9fa;
  min-height: 400px;
  max-height: 500px; /* 限制最大高度 */
}

.chat-history {
  flex: 1;
  padding: 16px;
  overflow-y: auto; /* 添加滚动条 */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.ai-msg {
  background-color: #fff;
  border: 1px solid #dcdfe9;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.user-msg {
  background-color: #e8f4fd;
  border: 1px solid #cce4f9;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-typing {
  color: #717fa4;
  font-style: italic;
}

.ai-itinerary-card {
  margin-top: 12px;
  border: 1px solid #dcdfe9;
  border-radius: 12px;
  padding: 0;
  background-color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  overflow: hidden;
}

.ai-itinerary-card h4 {
  margin: 0;
  padding: 16px 20px;
  color: #fff;
  background-color: #132968;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.itinerary-timeline {
  padding: 20px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

/* 左侧：时间和日期 */
.timeline-left {
  width: 80px;
  text-align: right;
  flex-shrink: 0;
  padding-top: 2px;
}

.timeline-time {
  font-weight: bold;
  color: #132968;
  font-size: 15px;
}

.timeline-date {
  font-size: 12px;
  color: #717fa4;
  margin-top: 4px;
}

/* 中间：时间轴、节点和图标 */
.timeline-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
  flex-shrink: 0;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  background-color: #132968;
  border-radius: 50%;
  margin: 6px 0;
}

.timeline-line {
  flex: 1;
  width: 2px;
  background-color: #dcdfe9;
  min-height: 20px;
}

.timeline-icon {
  width: 24px;
  height: 24px;
  background-color: #f1f2f6;
  color: #fa6b6b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin: 4px 0;
  box-shadow: 0 0 0 4px #fff;
  z-index: 1;
}

/* 右侧：地点和耗时 */
.timeline-right {
  flex: 1;
  padding-bottom: 24px;
}

.timeline-location {
  font-weight: bold;
  color: #425486;
  font-size: 16px;
}

.timeline-duration {
  font-size: 13px;
  color: #717fa4;
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f9f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
}

.timeline-note {
  font-size: 13px;
  color: #f7a600;
  margin-top: 8px;
  background-color: #fff8eb;
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 3px solid #f7a600;
}

/* 中转信息 */
.timeline-layover {
  margin: 0 0 24px 96px;
  padding: 8px 12px;
  background-color: #f1f2f6;
  color: #425486;
  font-size: 13px;
  font-weight: bold;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 底部结算区 */
.itinerary-footer {
  padding: 20px;
  background-color: #f9f9fa;
  border-top: 1px solid #dcdfe9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.itinerary-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  font-size: 13px;
  color: #717fa4;
}

.price-value {
  font-size: 24px;
  font-weight: bold;
  color: #132968;
}

.price-value small {
  font-size: 14px;
  color: #717fa4;
  font-weight: normal;
}

.ai-input-area {
  display: flex;
  padding: 12px;
  background-color: #fff;
  border-top: 1px solid #dcdfe9;
  gap: 12px;
}

.ai-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #dcdfe9;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}

.ai-input-area input:focus {
  border-color: #fa6b6b;
}

.ai-input-area button {
  padding: 0 24px;
  background-color: #132968;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.ai-input-area button:hover {
  background-color: #2a4185;
}

/* 响应式 */
@media (max-width: 768px) {
  .custom-features-wrapper {
    flex-direction: column;
  }
  
  .floating-app-download {
    display: none !important;
  }
}

/* Floating App Download Banner */
.floating-app-download {
  position: fixed;
  right: 20px;
  top: 40%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7); /* 更明显的半透明背景 */
  backdrop-filter: blur(12px); /* 加强毛玻璃效果 */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  width: auto; /* 宽度自适应内部内容 */
  transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.floating-app-download:hover {
  transform: translateY(-50%) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 0.85);
}

.app-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.app-logo img {
  width: 100%;
  max-width: 80px;
  object-fit: contain;
}

.app-logo span {
  font-size: 13px;
  font-weight: bold;
  color: #132968;
  text-align: center;
  letter-spacing: 0.5px;
}

.app-qr-code {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(220, 223, 233, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #132968;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.app-stores {
  display: flex;
  flex-direction: row; /* 横向排列 */
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.app-stores img {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
}

.app-stores img:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

/* Floating Advertisement Button */
.floating-ad-btn {
  position: fixed;
  right: -5px;
  top: 75%; /* 往下挪，避免与上方的 APP 悬浮窗重叠 */
  transform: translateY(-50%);
  background-color: #fa6b6b;
  color: #fff;
  padding: 12px 16px 12px 20px;
  border-radius: 24px 0 0 24px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  box-shadow: -2px 4px 12px rgba(250, 107, 107, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: right 0.3s, background-color 0.2s;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.floating-ad-btn i {
  transform: rotate(90deg);
}

.floating-ad-btn:hover {
  right: 0;
  background-color: #e55a5a;
}

/* Advertisement Modal */
.ad-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.ad-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  animation: modalPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPopIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ad-image {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
}

.close-ad-btn {
  position: absolute;
  top: -12px;
  left: -12px; /* 移动到左上角 */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.4); /* 透明度较低的黑色背景 */
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.6);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s, transform 0.2s;
  backdrop-filter: blur(2px);
}

.close-ad-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}