/* Custom Search Form Styling */
.realestatepro-search-form {
  margin: 2rem 0;
}

.search-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--re-border, #e1e5ee);
  border-radius: 50px;
  padding: 0.25rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.search-input-group:focus-within {
  border-color: var(--re-primary, #c62828);
  box-shadow: 0 8px 25px rgba(198, 40, 40, 0.15);
  transform: translateY(-2px);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--re-text-muted, #6b7280);
  z-index: 1;
  transition: color 0.2s ease;
}

.search-input-group:focus-within .search-icon {
  color: var(--re-primary, #c62828);
}

.search-field {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 1rem 1rem 3.5rem;
  font-size: 1.05rem;
  background: transparent;
  border-radius: 50px;
  color: var(--re-dark);
}

.search-field::placeholder {
  color: var(--re-text-muted, #6b7280);
  font-weight: 400;
}

.search-submit {
  background: linear-gradient(135deg, var(--re-primary, #c62828) 0%, #a91e1e 100%);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
  white-space: nowrap;
}

.search-submit:hover {
  background: linear-gradient(135deg, #a91e1e 0%, var(--re-primary, #c62828) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(198, 40, 40, 0.4);
}

.search-submit:active {
  transform: translateY(0);
}

.search-help-text {
  font-size: 0.9rem;
  color: var(--re-text-muted, #6b7280);
  margin: 0;
  font-style: italic;
}

/* 404 Page Specific Styling */
.error-404 .realestatepro-search-form {
  background: #fff;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--re-border, #e1e5ee);
  margin: 2.5rem 0;
}

.error-404 .search-form-wrapper::before {
  content: "🔍";
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.error-404 .search-form-wrapper {
  position: relative;
}

.error-404 .search-form-wrapper::after {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--re-primary, #c62828), #ff6b6b);
  border-radius: 2px;
}

/* Enhanced focus and hover states */
.search-field:focus {
  color: var(--re-dark);
}

.search-field:focus::placeholder {
  opacity: 0.5;
}

/* Animation for search submit button */
@keyframes searchPulse {
  0% { box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3); }
  50% { box-shadow: 0 6px 20px rgba(198, 40, 40, 0.4); }
  100% { box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3); }
}

.search-submit:focus {
  animation: searchPulse 1.5s infinite;
  outline: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-input-group {
    flex-direction: column;
    border-radius: 16px;
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .search-field {
    padding: 1rem;
    text-align: center;
    margin: 0;
  }
  
  .search-icon {
    position: static;
    order: -1;
  }
  
  .search-submit {
    width: 100%;
    border-radius: 12px;
    margin: 0;
  }
  
  .error-404 .realestatepro-search-form {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .search-form-wrapper::before {
    font-size: 2rem !important;
  }
}

@media (max-width: 480px) {
  .error-404 .realestatepro-search-form {
    padding: 1rem;
    border-radius: 16px;
  }
  
  .search-field {
    font-size: 1rem;
  }
  
  .search-submit {
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
  }
}

/* Loading state (optional for future use) */
.search-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.search-submit.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
