/* ── Shared Search Bar ──────────────────────────────────────────────────────── */

/* Container */
.tf-search-wrapper { width: 100%; }
.tf-search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Search box card */
.tf-search-bar-card {
  display: flex;
  align-items: stretch;
  border: 2px solid #FEBB02;
  border-radius: 6px;
  background: white;
  overflow: visible !important;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tf-search-bar-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* Individual fields */
.bk-search-field {
  flex: 1;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid var(--bk-border);
  min-width: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.bk-search-field:last-of-type { border-right: none; }
.bk-search-field:hover { background: var(--bk-blue-light); }
.bk-search-field i { color: var(--bk-text-sec); font-size: 16px; flex-shrink: 0; }

.sf-icon { display: flex; align-items: center; justify-content: center; }
.sf-text { flex: 1; min-width: 0; }
.sf-label {
  font-size: 11px;
  color: var(--bk-text-sec);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.sf-value {
  font-size: 14px;
  color: var(--bk-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-value.placeholder { color: #999; font-weight: 400; }
.sf-chevron {
  color: var(--bk-text-sec);
  font-size: 12px;
  margin-left: 4px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

/* Destination dropdown */
.bk-dest-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 99999;
  background: white;
  border: 1px solid var(--bk-border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.06);
  width: 380px;
  max-width: 90vw;
  overflow: hidden;
  box-sizing: border-box;
}
.bk-dest-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--bk-border);
}
.bk-dest-input-wrap i { color: var(--bk-text-sec); font-size: 14px; }
.bk-dest-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 4px 0;
  background: transparent;
  font-family: inherit;
}
.bk-dest-section { padding: 8px 0; }
.bk-dest-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--bk-text-sec);
  padding: 6px 16px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bk-dest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s;
}
.bk-dest-item:hover { background: var(--bk-blue-light); }
.bk-dest-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.bk-dest-item-icon.location {
  background: var(--bk-blue-light);
  color: var(--bk-teal);
}
.bk-dest-item-icon.hotel {
  background: #FEE2E2;
  color: #DC2626;
}
.bk-dest-item-icon.history {
  background: #F3F4F6;
  color: var(--bk-text-sec);
}
.bk-dest-item-text { flex: 1; min-width: 0; }
.bk-dest-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--bk-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-dest-item-sub {
  font-size: 12px;
  color: var(--bk-text-sec);
  margin-top: 1px;
}
.bk-dest-show-more {
  display: block;
  width: 100%;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--bk-teal);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}
.bk-dest-show-more:hover { text-decoration: underline; }
.bk-dest-empty {
  padding: 20px 16px;
  font-size: 14px;
  color: var(--bk-text-sec);
  text-align: center;
}

/* Calendar dropdown */
.bk-cal-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 99999;
  background: white;
  border: 1px solid var(--bk-border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.06);
  width: 640px;
  max-width: 90vw;
  overflow: hidden;
  box-sizing: border-box;
}
.bk-cal-tabs {
  display: flex;
  border-bottom: 1px solid var(--bk-border);
}
.bk-cal-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bk-text-sec);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.bk-cal-tab.active {
  color: var(--bk-teal);
  border-bottom-color: var(--bk-teal);
}
.bk-cal-body { padding: 16px; }
.bk-cal-months { display: flex; gap: 12px; }
.bk-cal-month { flex: 1; min-width: 0; }
.bk-cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.bk-cal-nav {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bk-text-sec);
  font-size: 12px;
  padding: 2px 6px;
}
.bk-cal-nav:hover { color: var(--bk-teal); }
.bk-cal-month-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--bk-text);
}
.bk-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.bk-cal-weekday {
  font-size: 11px;
  font-weight: 700;
  color: var(--bk-text-sec);
  text-align: center;
  padding: 4px 0;
}
.bk-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.bk-cal-day {
  aspect-ratio: 1;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--bk-text);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.bk-cal-day.empty { cursor: default; }
.bk-cal-day.disabled { color: #ccc; cursor: not-allowed; }
.bk-cal-day.today { font-weight: 700; color: var(--bk-teal); }
.bk-cal-day:not(.disabled):not(.empty):hover { background: var(--bk-blue-light); }
.bk-cal-day.range-start,
.bk-cal-day.range-end {
  background: var(--bk-teal) !important;
  color: white !important;
  font-weight: 700;
}
.bk-cal-day.in-range {
  background: var(--bk-blue-light);
  color: var(--bk-blue);
}
.bk-cal-flex {
  border-top: 1px solid var(--bk-border);
  padding: 16px;
  background: var(--bk-gray-bg);
}
.bk-cal-flex-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--bk-text);
  margin-bottom: 12px;
}
.bk-cal-flex-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bk-cal-flex-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bk-text-sec);
  background: white;
  border: 1px solid var(--bk-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.bk-cal-flex-btn:hover { border-color: var(--bk-teal); color: var(--bk-teal); }
.bk-cal-flex-btn.active {
  background: var(--bk-teal);
  color: white;
  border-color: var(--bk-teal);
}

/* Occupancy dropdown */
.bk-occ-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 99999;
  background: white;
  border: 1px solid var(--bk-border);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.06);
  width: 320px;
  max-width: 340px;
  padding: 14px 16px 10px;
  box-sizing: border-box;
}
.bk-occ-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.bk-occ-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--bk-text);
}
.bk-occ-sub {
  font-size: 12px;
  color: var(--bk-text-sec);
}
.bk-occ-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bk-occ-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--bk-border);
  background: white;
  color: var(--bk-text);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.bk-occ-btn:hover:not(:disabled) { background: var(--bk-blue-light); border-color: var(--bk-teal); color: var(--bk-teal); }
.bk-occ-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.bk-occ-val {
  font-size: 15px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: var(--bk-text);
}
.bk-occ-divider {
  height: 1px;
  background: var(--bk-border);
  margin: 8px 0;
}
.bk-occ-done {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px;
  background: var(--bk-teal);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.bk-occ-done:hover { background: #0d9488; }

/* Search button */
.tf-search-btn,
.bk-search-btn {
  background: linear-gradient(135deg, rgb(245, 158, 11) 0%, rgb(217, 119, 6) 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  flex-shrink: 0;
  margin: 4px;
}
.tf-search-btn:hover,
.bk-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgb(217, 119, 6) 0%, rgb(180, 83, 9) 100%);
}
.tf-search-btn:active,
.bk-search-btn:active {
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .tf-search-container { padding: 0 16px; }
  .tf-search-bar-card {
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
    padding: 8px;
    gap: 4px;
  }
  .tf-search-bar-card > div {
    width: 100% !important;
    flex: none !important;
  }
  .bk-search-field {
    border-right: none !important;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 10px 14px;
    width: 100% !important;
    flex: none !important;
    box-sizing: border-box;
  }
  .bk-search-field:last-of-type { border-bottom: none; }
  .sf-chevron {
    display: none !important;
  }
  .tf-search-btn,
  .bk-search-btn {
    width: 100%;
    margin: 4px 0 0 0;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 15px;
  }
  .bk-dest-dropdown,
  .bk-cal-dropdown,
  .bk-occ-dropdown {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transform: none !important;
    box-sizing: border-box !important;
    z-index: 99999 !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(15,23,42,0.2) !important;
    max-height: min(80vh, 520px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .bk-cal-body {
    padding: 12px 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .bk-cal-months {
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }
  .bk-cal-month {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .bk-cal-month-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 8px !important;
    padding: 0 4px !important;
  }
  .bk-cal-weekdays {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
    margin-bottom: 4px !important;
  }
  .bk-cal-weekday {
    text-align: center !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 0 !important;
  }
  .bk-cal-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
  }
  .bk-cal-day {
    aspect-ratio: 1 !important;
    max-height: 40px !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    padding: 0 !important;
  }
}

@media (max-width: 576px) {
  .tf-search-container { padding: 0 12px; }
  .tf-search-bar-card { padding: 6px; }
  .bk-search-field { padding: 9px 10px; gap: 8px; }
  .sf-icon { width: 34px; height: 34px; font-size: 14px; }
  .sf-label { font-size: 10.5px; }
  .sf-value { font-size: 13px; }
  .tf-search-btn,
  .bk-search-btn { padding: 11px 16px; font-size: 14px; }
}
