/* ============================================
   검색 섹션
============================================ */
.search-section {
  background: #f5f6f8;
  padding: 2rem 0 2.4rem;
  margin-bottom: 3.2rem;
}

/* 탭 */
.trip-type-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.tab-btn {
  padding: 0.6rem 1.8rem;
  border-radius: 10rem;
  border: 0.15rem solid #e2e5ea;
  background: #ffffff;
  font-size: 1.4rem;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
}

.tab-btn.active {
  background: #4370FF;
  color: #ffffff;
  border-color: #4370FF;
  font-weight: 500;
}

/* 출발지/도착지 행 */
.route-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.route-row .custom-select-wrap {
  flex: 1;
}

/* 교체 버튼 */
.swap-btn {
  flex-shrink: 0;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  border: 0.15rem solid #e2e5ea;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


.swap-btn svg {
  width: 1.8rem;
  height: 1.8rem;
  color: #4b5563;
}

/* 날짜 입력 */
.date-row {
  position: relative;
  margin-bottom: 1.4rem;
}

.date-input {
  width: 100%;
  height: 5rem;
  border: 0.15rem solid #e2e5ea;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0 4.8rem 0 1.4rem;
  font-size: 1.4rem;
  color: #1a1d23;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
}

.date-label {
  position: absolute;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #333;
  pointer-events: none;
}

.date-input.is-empty::-webkit-datetime-edit {
  color: transparent;
  opacity: 0;
}
.date-input:not(.is-empty)::-webkit-datetime-edit {
  color: #1a1d23;
}
.date-label {
  display: block;
}
.date-input[value=""] + .date-label {
  opacity: 1;
}

.calendar-icon {
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.3rem;
  pointer-events: none;
}

.date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  width: 4rem;
  height: 100%;
  cursor: pointer;
}

/* ============================================
   공통 커스텀 셀렉트
============================================ */
.custom-select-wrap {
  position: relative;
}

.custom-select-wrap.flex-3 { flex: 3; }
.custom-select-wrap.flex-2 { flex: 2; }

.custom-select {
  position: relative;
  user-select: none;
}

.select-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  border: 0.15rem solid #e2e5ea;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0 1.2rem 0 1.4rem;
  cursor: pointer;
}

.custom-select.open .select-display {
  border-radius: 1rem;
}

.select-placeholder {
  font-size: 1.4rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-placeholder.selected {
  color: #1a1d23;
}

.arrow-icon {
  width: 1.8rem;
  height: 1.8rem;
  color: #9ca3af;
  flex-shrink: 0;
}

.custom-select.open .arrow-icon {
  transform: rotate(180deg);
}

.select-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: none;
  border-radius: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 20rem;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 0.4rem 1.6rem rgba(0,0,0,0.10);
}

.custom-select.open .select-dropdown {
  display: block;
}

.select-dropdown li {
  padding: 1.2rem 1.4rem;
  font-size: 1.4rem;
  color: #1a1d23;
  cursor: pointer;
}


.select-dropdown li.selected-item {
  color: #4370FF;
  font-weight: 600;
  background: #E5F3FF;
  border-radius: 1rem;
}

.select-dropdown::-webkit-scrollbar {
  width: 0.4rem;
}
.select-dropdown::-webkit-scrollbar-thumb {
  background: #e2e5ea;
  border-radius: 0.2rem;
}

/* ============================================
   공통 버튼
============================================ */
.primary-btn {
  width: 100%;
  height: 5.4rem;
  border-radius: 1rem;
  border: none;
  background: #4370FF;
  color: #ffffff;
  font-size: 1.7rem;
  cursor: pointer;
  letter-spacing: -0.02em;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================
   예매 취소 환불액 계산 섹션
============================================ */
.refund-section {
  padding: 0 0 3.2rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1d23;
  margin-bottom: 1.6rem;
  letter-spacing: -0.03em;
}

.text-input {
  width: 100%;
  height: 5rem;
  border: 0.15rem solid #e2e5ea;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0 1.4rem;
  font-size: 1.4rem;
  color: #1a1d23;
  box-sizing: border-box;
  outline: none;
  margin-bottom: 1.6rem;
}

.text-input::placeholder {
  color: #464646;
}

.text-input:focus {
  border-color: #e2e5ea;
  box-shadow: none;
  outline: none;
}

.datetime-group {
  margin-bottom: 1.6rem;
}

.datetime-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 0.8rem;
}

.datetime-row {
  display: flex;
  gap: 0.8rem;
}

.calc-btn {
  margin-top: 0.4rem;
}

.date-display-overlay{display: none;}

/* ============================================
   안내 카드 그리드 섹션
============================================ */
.info-grid-section {
  padding: 0 0 1.6rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.info-card {
  background: #ffffff;
  border-radius: 1.2rem;
  padding: 2rem 3rem;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 13rem;
  cursor: pointer;
}

.info-card-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.info-card-icon {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  height: 4.8rem;
}

.info-card-icon img {
  width: 3.5em;
  object-fit: contain;
}

/* ============================================
   FAQ 섹션
============================================ */
.faq-section {
  padding: 0 0 4rem;
}

.faq-banner {
  background: #E5F3FF;
  border-radius: 1.2rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  display: block;
}

.faq-sub {
  font-size: 1.4rem;
  color: #4b5563;
  margin-bottom: 0.8rem;
}

.faq-main {
  font-size: 1.7rem;
  color: #1a1d23;
  letter-spacing: -0.02em;
  font-weight: 500;
}

/* ============================================
   출발지/도착지 선택 레이어
============================================ */
.location-layer {
  /* display: none; 제거 */
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: -1; /* 뒤로 숨기기 */
  visibility: hidden;
  flex-direction: column;
  display: flex; /* 항상 flex 유지 */
}

.location-layer.active {
  z-index: 9000;
  visibility: visible;
}

.location-layer-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 2rem;
}

.location-back-btn {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.location-layer-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1d23;
  letter-spacing: -0.03em;
}

.location-search-wrap {
  position: relative;
  padding: 1.6rem;
  padding-top: 0;
}

.location-search-input {
  width: 100%;
  height: 5rem;
  border: 0.15rem solid #e2e5ea;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0 4.8rem 0 1.4rem;
  font-size: 1.4rem;
  color: #1a1d23;
  box-sizing: border-box;
  outline: none;
}

.location-search-input::placeholder {
  color: #1a1d23;
}

.location-search-icon {
  position: absolute;
  right: 2.8rem;
  top: 40%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  color: #9ca3af;
  pointer-events: none;
}

.location-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
}

.location-list li {
  padding: 1.8rem 1.6rem;
  margin: 0 1.6rem;
  font-size: 1.5rem;
  color: #4b5563;
  cursor: pointer;
  border-bottom: 0.1rem solid #f5f6f8;
}

.location-list li.selected-location {
  background: #E5F3FF;
  color: #4370FF;
  font-weight: 600;
  border-radius: 1rem;
}

.location-footer {
  padding: 1.6rem;
}

/* schedule */

/* 페이지 타이틀 */

.page-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 2rem 0;
  position: relative;
}

.back-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  margin-right: 1rem;
}

.back-btn svg { width: 2.4rem; height: 2.4rem; color: #1a1d23; }

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1d23;
  letter-spacing: -0.03em;
}

/* 시간표 */
.schedule-section { padding: 0 0 2.4rem; }
.schedule-block { margin-bottom: 3.2rem; }

.schedule-route-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.route-from, .route-to { font-size: 2rem; font-weight: 700; color: #1a1d23; letter-spacing: -0.03em; }
.route-arrow { font-size: 1.8rem; color: #4b5563; }

.schedule-date { font-size: 1.3rem; color: #9ca3af; margin-bottom: 1.6rem; }

.schedule-table-wrap {
  border-radius: 1rem;
  overflow: hidden;
  border: 0.1rem solid #e2e5ea;
}

.schedule-table { width: 100%; border-collapse: collapse; table-layout: fixed; }

.schedule-table thead tr { background: #f5f6f8; }

.schedule-table th {
  padding: 1.2rem 0.8rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #4b5563;
  text-align: center;
  border-bottom: 0.1rem solid #e2e5ea;
}

.schedule-table td {
  padding: 1.4rem 0.8rem;
  font-size: 1.4rem;
  color: #1a1d23;
  text-align: center;
  border-bottom: 0.1rem solid #f0f2f5;
}

.schedule-table tbody tr:last-child td { border-bottom: none; }

/* 정보 버튼 */
.info-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: #4370ff;
  color: #ffffff;
  border: none;
  border-radius: 10rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
}


/* 빈 결과 */
.schedule-empty { text-align: center; padding: 4rem 0; font-size: 1.4rem; color: #9ca3af; line-height: 1.6; }

/* 홈으로 이동 */
.home-btn-section { padding: 0 0 4rem; }

/* bus info */
/* ============================================
   bus-info.php 전용
============================================ */
.page-subtitle {
  font-size: 1.4rem;
  color: #9ca3af;
  position: absolute;
  top: 73%;
  left: 8%;
}

.bus-info-section {
  padding: 3rem 0;
}

.info-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.info-row-label {
  flex-shrink: 0;
  width: 6rem;
  font-size: 1.4rem;
  color: #9ca3af;
  padding-top: 1.4rem;
}

.info-row-value {
  flex: 1;
  background: #f5f6f8;
  border-radius: 1rem;
  padding: 1.4rem 1.6rem;
  font-size: 1.5rem;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.5;
}

/* ============================================
   refund.php 전용
============================================ */
.refund-calc-section {
  padding: 0 0 4rem;
}

.refund-result {
  margin: 2.4rem 0 2rem;
  padding: 2rem 0 0;
}

.refund-result-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 0.6rem;
}

.refund-result-amount {
  font-size: 3.2rem;
  font-weight: 700;
  color: #4370ff;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.refund-result-notice {
  font-size: 1.2rem;
  color: #9ca3af;
  line-height: 1.6;
}

/* 본문 내용들 */

.ticket-info-section{padding-bottom: 3rem;}
.ticket-info-block{border-bottom: 1px solid #ddd;padding-bottom: 2rem;padding-top: 2rem;}
.ticket-info-block:last-of-type {border-bottom: none;}
.ticket-info-subtitle{font-size: 1.6rem;color: #4370FF;font-weight: 500;margin-bottom: 1rem;}
.ticket-info-content{font-size: 1.3rem;color: #989696;line-height: 1.6;}
.ticket-info-strong{font-size: 1.3rem;margin-bottom: 0.2rem;}

/* faq상세 */
.faq-detail-section{padding-top: 2rem;padding-bottom: 2rem;}
.faq-detail-section .container{display: flex;gap:3rem;flex-direction: column;}
.faq-detail-question{display: flex;flex-direction: column;align-items: center;}
.faq-detail-section .faq-badge{color: #fff;background: #4370FF;border-radius: 2rem;padding: 0.5rem 1rem;font-size: 1.3rem;display: inline-block;margin-bottom: 1.5rem;}
.faq-detail-q-text{font-size: 1.6rem;text-align: center;line-height: 1.6;}
.faq-detail-answer{background: #F4F3F3;min-height: 15rem;padding: 2.5rem 1.5rem 5rem 1.5rem;}
.faq-detail-answer p{font-size: 1.6rem;color: #585858;line-height: 1.6;}

.faq-list-section{padding-bottom: 2rem;}
.faq-item:last-child{border: none;}
.faq-item{border-bottom: 1px solid #ddd;}
.faq-item-inner{display: flex;align-items: center;justify-content: space-between;padding-bottom: 2rem;padding-top: 2rem;}
.faq-list-section .faq-badge{color: #fff;background: #4370FF;border-radius: 2rem;padding: 0.5rem 1rem;font-size: 1.3rem;display: inline-block;margin-bottom: 1rem;}
.faq-question{font-size: 1.6rem;max-width: 32rem;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}

.select-value{font-size: 1.4rem;}
.select-item.active{  color: #4370FF;
  font-weight: 600;
  background: #E5F3FF;
  border-radius: 1rem;}

  /* 버스 회사 안내 */
  .company-list-section{padding-bottom: 2rem;}
  .company-item{display: flex;background: #F4F3F3;padding: 2rem;border-radius: 1rem;margin-bottom: 2rem;gap: 2rem;flex-direction: column;}
  .company-name{font-size: 1.6rem;font-weight: 500;}
  .company-address{font-size: 1.4rem;color: #989696;margin-bottom: 0.7rem;}
  .company-tel{font-size: 1.4rem;color: #989696;}
  .company-filter-section .select-display{margin-bottom: 1.2rem;}
  .company-filter-section .location-search-wrap{padding: 0;margin-bottom: 1.5rem;}
  .company-filter-section  .location-search-icon{top: 46%;right: 1.2rem;}