/**
 * Search Bar Component Styles
 * VRBO-style search interface with overlays
 */
.hero-search-interface {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.search-section {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  max-width: 850px;
  margin: 0 auto;
}

.search-field {
  flex: 1;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 40px;
}
.search-field:hover {
  background: rgba(0, 0, 0, 0.05);
}
.search-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.search-field .search-input {
  font-size: 0.95rem;
  color: #666;
  font-weight: 500;
}
.search-field.location-field--locked {
  cursor: default;
}
.search-field.location-field--locked:hover {
  background: transparent;
}
.search-field.location-field--locked .search-input {
  color: #333;
  font-weight: 600;
}

.search-divider {
  width: 1px;
  height: 40px;
  background: #e0e0e0;
}

.search-button {
  background: #17a2b8;
  border: none;
  border-radius: 50px;
  padding: 16px 32px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
}
.search-button:hover {
  background: #138496;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(23, 162, 184, 0.5);
}
.search-button i {
  font-size: 1.1rem;
}

.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999991;
}

.search-overlay-content {
  position: fixed;
  background: white;
  color: #333;
  border-radius: 20px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  z-index: 99999992;
  max-width: 90%;
  max-height: 90vh;
  overflow: hidden;
}

.overlay-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.overlay-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333 !important;
  opacity: 1 !important;
}

.search-overlay .search-overlay-content .overlay-header h3 {
  color: #333 !important;
  opacity: 1 !important;
}

.overlay-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-close:hover {
  color: #000;
}

.overlay-body {
  padding: 24px;
  max-height: calc(90vh - 80px);
  overflow-y: auto;
}

#locationOverlay .search-overlay-content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
}

.resort-option {
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-bottom: 8px;
}
.resort-option:hover {
  background: rgba(23, 162, 184, 0.1);
}
.resort-option.selected {
  background: rgba(23, 162, 184, 0.2);
  border: 2px solid #17a2b8;
}
.resort-option h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
}
.resort-option p {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

#datesOverlay .search-overlay-content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
}

@media (min-width: 992px) {
  body:not(.page-home) #datesOverlay .search-overlay-content {
    top: 220px;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    max-height: none;
    overflow-y: visible;
  }
}
@media (min-width: 992px) {
  body:not(.page-home).header-scrolled #datesOverlay .search-overlay-content {
    top: 142px;
  }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 12px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  color: #333;
}
.calendar-day.header {
  font-weight: 600;
  cursor: default;
  color: #666;
}
.calendar-day.disabled {
  color: #ccc;
  cursor: not-allowed;
}
.calendar-day:not(.header):not(.disabled):hover {
  background: rgba(23, 162, 184, 0.1);
}
.calendar-day.selected {
  background: #17a2b8;
  color: white;
}
.calendar-day.in-range {
  background: rgba(23, 162, 184, 0.2);
}

.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.month-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.month-nav {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  color: #17a2b8;
}
.month-nav:hover {
  color: #138496;
}
.month-nav:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.two-month-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.date-mode-tabs {
  display: flex;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 1px solid #e0e0e0;
}

.date-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  top: 1px;
  margin-bottom: -1px;
  outline: none;
}
.date-tab:focus, .date-tab:focus-visible {
  outline: none;
}
.date-tab:first-child:hover:not(.active) {
  background: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
  border-color: rgba(23, 162, 184, 0.3);
}
.date-tab:first-child.active {
  background: #17a2b8;
  color: white;
  border-color: #0f6674 !important;
}
.date-tab:first-child.active:hover {
  border-color: #0c525d !important;
}
.date-tab:first-child.active + .date-tab:not(.active) {
  background: rgba(243, 156, 18, 0.15);
  border-color: rgba(243, 156, 18, 0.3);
  color: #c87f0a;
}
.date-tab:first-child.active + .date-tab:not(.active):hover {
  background: rgba(243, 156, 18, 0.25);
  border-color: rgba(243, 156, 18, 0.5);
}
.date-tab:last-child:hover:not(.active) {
  background: rgba(243, 156, 18, 0.15);
  color: #c87f0a;
  border-color: rgba(243, 156, 18, 0.3);
}
.date-tab:last-child.active {
  background: #f39c12;
  color: white;
  border-color: #b06f09 !important;
}
.date-tab:last-child.active:hover {
  border-color: #976008 !important;
}

.flexible-options h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.stay-duration {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.duration-btn {
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 24px;
  background: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.duration-btn:hover {
  border-color: #17a2b8;
  background: rgba(23, 162, 184, 0.05);
}
.duration-btn.active {
  background: #17a2b8;
  color: white;
  border-color: #17a2b8;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.month-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  color: #333;
}
.month-card:hover {
  border-color: #17a2b8;
  background: rgba(23, 162, 184, 0.05);
}
.month-card.selected {
  background: #17a2b8;
  color: white;
  border-color: #17a2b8;
}
.month-card i {
  font-size: 1.5rem;
  margin-bottom: 8px;
  display: block;
  color: #17a2b8;
}
.month-card.selected i {
  color: white;
}
.month-card .month-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.month-card .month-year {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 4px;
}

#guestsOverlay .search-overlay-content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
}

.guest-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
}
.guest-counter:last-of-type {
  border-bottom: none;
}

.guest-info h4 {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 600;
}
.guest-info p {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

.counter-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.counter-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}
.counter-btn:hover:not(:disabled) {
  border-color: #17a2b8;
  color: #17a2b8;
}
.counter-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.counter-value {
  font-size: 1rem;
  font-weight: 600;
  min-width: 32px;
  text-align: center;
}

.search-overlay-submit-btn {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 12px 48px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
  transition: all 0.3s ease;
}
.search-overlay-submit-btn i {
  margin-right: 8px;
}
.search-overlay-submit-btn:hover {
  background: #138496;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
}

@media (max-width: 991px) and (min-width: 768px) {
  .search-section {
    max-width: 700px;
    padding: 6px 6px 6px 20px;
  }
  .search-field {
    padding: 10px 12px;
  }
  .search-field label {
    font-size: 0.7rem;
  }
  .search-field .search-input {
    font-size: 0.875rem;
  }
  .search-button {
    padding: 14px 24px;
    font-size: 0.95rem;
  }
}
@media (max-width: 767px) {
  .hero-search-interface {
    padding: 0 15px;
    margin-top: 1.5rem;
  }
  .search-section {
    flex-direction: column;
    border-radius: 20px;
    padding: 16px;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }
  .search-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
  }
  .search-divider {
    display: none;
  }
  .search-button {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
    padding: 16px;
  }
  #datesOverlay .search-overlay-content,
#locationOverlay .search-overlay-content {
    width: 95%;
    max-width: 95%;
  }
  .two-month-grid {
    grid-template-columns: 1fr;
  }
  .month-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #guestsOverlay .search-overlay-content,
#fullSearchOverlay .search-overlay-content {
    width: 95%;
    max-width: 95%;
  }
}
#fullSearchOverlay .search-overlay-content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 500px;
}
@media (min-width: 992px) {
  #fullSearchOverlay .search-overlay-content {
    top: 220px;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    max-height: none;
    overflow-y: auto;
  }
  body.header-scrolled #fullSearchOverlay .search-overlay-content {
    top: 142px;
  }
}

.full-search-content {
  overflow: visible;
  max-height: none;
}
.full-search-content .overlay-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}
.full-search-content .overlay-body {
  padding: 24px;
  max-height: none;
  overflow: visible;
}
@media (min-width: 992px) {
  .full-search-content .overlay-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
  }
}

.full-search-field {
  margin-bottom: 24px;
}
.full-search-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.full-search-dropdown {
  position: relative;
}

.full-search-select-input {
  width: 100%;
  padding: 16px;
  background: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.full-search-select-input:focus {
  outline: none;
  border-color: #17a2b8;
  background-color: #fff;
}

.full-search-dates-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.full-search-dates-toggle:hover {
  background: #f0f0f0;
  border-color: #ccc;
}
.full-search-dates-toggle i:first-child {
  color: #17a2b8;
  font-size: 1.1rem;
}
.full-search-dates-toggle span {
  flex: 1;
  color: #333;
}
.full-search-dates-toggle i:last-child {
  color: #999;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.full-search-dates-panel {
  margin-top: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}
.full-search-dates-panel .date-mode-tabs {
  border-radius: 12px 12px 0 0;
}
.full-search-dates-panel .date-mode-content {
  padding: 16px;
}
.full-search-dates-panel .flexible-options h4 {
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.full-search-dates-panel .stay-duration {
  flex-wrap: wrap;
}
.full-search-dates-panel .duration-btn {
  font-size: 0.8rem;
  padding: 8px 12px;
}
.full-search-dates-panel .month-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.full-search-dates-panel .month-option {
  padding: 12px 8px;
}
.full-search-dates-panel .month-option .month-icon {
  font-size: 1rem;
}
.full-search-dates-panel .month-option .month-name {
  font-size: 0.8rem;
}
.full-search-dates-panel .month-option .month-year {
  font-size: 0.7rem;
}

.full-search-guests {
  background: #f7f7f7;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
}

.guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.guest-row:not(:last-child) {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 16px;
  margin-bottom: 8px;
}
.guest-row span {
  font-weight: 500;
  color: #333;
}

.full-search-submit {
  width: 100%;
  padding: 16px 24px;
  background: #17a2b8;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease;
}
.full-search-submit:hover {
  background: #117a8b;
}
.full-search-submit i {
  font-size: 1rem;
}