/* ============================================ */
/* HOMEPAGE SEARCH COMPONENT STYLES */
/* Reusing listings page styles but scoped to homepage */
/* ============================================ */

.homepage-search-wrapper {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  width: 100%;
}

/* ============================================ */
/* DESKTOP SEARCH BAR */
/* ============================================ */
.homepage-search-desktop {
  display: block;
  width: 100%;
}

.homepage-search-bar {
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  height: 63px;
  width: 100%;
}

.homepage-search-field {
  flex: 1;
  position: relative;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.2s;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: auto;
}

.homepage-search-field.active {
  z-index: 1001;
}

.homepage-search-field:first-child {
  border-radius: 20px 0 0 20px;
}

.homepage-search-field:hover {
  background: rgba(0,0,0,0.02);
}

.homepage-search-field-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.homepage-search-field-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.homepage-search-label {
  font-size: 11px;
  font-weight: 600;
  color: #0F2C3A;
  display: block;
  line-height: 1;
}

.homepage-search-input {
  width: 100%;
  border: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: #0F2C3A;
  outline: none;
  padding: 0;
  line-height: 1.2;
}

.homepage-search-input::placeholder {
  color: #8b98a5;
}

.homepage-location-clear-btn {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-left: 4px;
}

.homepage-location-clear-btn:hover {
  color: #0F2C3A;
}

.homepage-location-clear-btn svg {
  display: block;
}

.homepage-search-btn {
  background: #0F2C3A;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0 32px;
  height: 43px;
  margin: 10px 10px 10px 0;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 100px;
}

.homepage-search-btn:hover {
  background: #16A8EE;
}

/* ============================================ */
/* MOBILE TRIGGER BUTTON */
/* ============================================ */
.homepage-search-mobile {
  display: none;
}

.homepage-mobile-search-trigger {
  width: 100%;
  background: white;
  border: none;
  border-radius: 30px;
  padding: 14px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  font-size: 15px;
  color: #6b7280;
  cursor: pointer;
}

.homepage-mobile-search-trigger svg {
  width: 20px;
  height: 20px;
  color: #0F2C3A;
  flex-shrink: 0;
}

/* ============================================ */
/* MOBILE OVERLAY */
/* ============================================ */
.homepage-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: none;
  align-items: flex-end;
}

.homepage-mobile-overlay.active {
  display: flex;
}

.homepage-mobile-panel {
  background: white;
  width: 100%;
  max-height: 65vh;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.homepage-mobile-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.homepage-mobile-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.homepage-mobile-close {
  background: none;
  border: none;
  font-size: 24px;
  padding: 8px;
  cursor: pointer;
  line-height: 1;
  color: #0F2C3A;
}

.homepage-mobile-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.homepage-mobile-field-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.homepage-mobile-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #0F2C3A;
}

.homepage-mobile-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  text-align: left;
}

.homepage-mobile-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.homepage-mobile-calendar {
  display: none;
  margin-bottom: 20px;
}

.homepage-mobile-calendar.active {
  display: block;
}

.homepage-guest-popup {
  display: none;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
}

.homepage-guest-popup.active {
  display: block;
}

.homepage-guest-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.homepage-guest-label {
  font-size: 15px;
  font-weight: 500;
  color: #0F2C3A;
}

.homepage-guest-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.homepage-guest-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: white;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.homepage-guest-btn:hover {
  border-color: #0F2C3A;
  background: #f3f4f6;
}

.homepage-guest-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.homepage-guest-number {
  font-size: 16px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.homepage-mobile-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5e7eb;
  background: white;
  flex-shrink: 0;
}

.homepage-mobile-search-btn {
  width: 100%;
  background: #0F2C3A;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================ */
/* LOCATION DROPDOWN */
/* ============================================ */
.homepage-location-dropdown {
  position: fixed;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 99999;
  display: none;
}

.homepage-location-dropdown.active {
  display: block;
}

.homepage-location-option {
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  transition: background 0.15s;
}

.homepage-location-option:hover {
  background: #f5f5f5;
}

.homepage-location-option:last-child {
  border-bottom: none;
}

/* ============================================ */
/* DATE PICKER POPUP */
/* ============================================ */
.homepage-date-picker-popup {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 20px;
  z-index: 1000;
  width: 320px;
  display: none;
}

.homepage-date-picker-popup.active {
  display: block;
}

.homepage-calendar-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: white;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.homepage-calendar-nav:hover {
  background: #f3f4f6;
}

.homepage-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.homepage-calendar-day.available {
  color: #0F2C3A;
}

.homepage-calendar-day.available:hover {
  background: #f3f4f6;
}

.homepage-calendar-day.past {
  color: #d1d5db;
  cursor: not-allowed;
}

.homepage-calendar-day.selected {
  background: #0F2C3A;
  color: white;
  font-weight: 600;
}

/* ============================================ */
/* GUEST PICKER POPUP */
/* ============================================ */
.homepage-guest-picker-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 20px;
  z-index: 1000;
  min-width: 250px;
  display: none;
}

.homepage-guest-picker-popup.active {
  display: block;
}

/* ============================================ */
/* MOBILE RESPONSIVE */
/* ============================================ */
@media (max-width: 768px) {
  .homepage-search-desktop {
    display: none;
  }
  
  .homepage-search-mobile {
    display: block;
  }
  
  /* Mobile date picker - center on screen */
  .homepage-date-picker-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    max-width: 90vw;
    z-index: 10001;
  }
  
  /* Mobile guest picker - center on screen */
  .homepage-guest-picker-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 280px;
    z-index: 10001;
  }
  
  /* Prevent iOS zoom on input focus */
  .homepage-mobile-overlay input,
  .homepage-mobile-overlay select,
  .homepage-mobile-overlay textarea {
    font-size: 16px !important;
  }
}
