/* Mobile Search Button */
.gs-mobile-search-btn {
  display: none !important;
}
.gs-mobile-search-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100;
  margin-left: 15px;
  transition: all 0.3s ease;
}

.gs-mobile-search-btn:hover {
  color: #2c80ff;
  transform: scale(1.1);
}

/* Popup Overlay - Background with Blur */
.gs-search-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.gs-search-popup.active {
  visibility: visible;
  opacity: 1;
}

/* Blur Background */
.gs-search-popup::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Popup Content - Top se slide down */
.gs-search-popup-content {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}

.gs-search-popup.active .gs-search-popup-content {
  top: 0;
}

/* Close Button */
.gs-search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f8f9fa;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #333;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gs-search-close:hover {
  background: #2c80ff;
  color: white;
  transform: rotate(90deg);
}

/* Popup Body */
.gs-search-popup-body {
  padding: 80px 30px 30px;
}

/* Search Title */
.gs-search-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 30px;
  font-weight: 600;
  text-align: center;
}

/* Search Form Grid */
.gs-search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* Search Fields */
.gs-search-field {
  position: relative;
}

.gs-search-select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 15px;
  background: white;
  color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 16px;
  transition: all 0.3s ease;
}

.gs-search-select:focus {
  outline: none;
  border-color: #2c80ff;
  box-shadow: 0 5px 15px rgba(44, 128, 255, 0.1);
}

/* Submit Button */
.gs-search-submit {
  grid-column: 1 / -1;
  background: #f97316;
  color: white;
  border: none;
  padding: 18px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  max-width: 300px;
  margin: 10px auto 0;
}
/* .gs-search-field,
.gs-search-submit {
  opacity: 0;
  transform: translateY(-20px);
} */

.gs-search-field:has(#location_select_mobile) {
  animation: none !important;
  transform: none !important;
}

#location_select_mobile {
  animation: none !important;
}

.gs-search-field {
  animation: none !important;
}

.gs-search-popup.active .gs-search-field,
.gs-search-popup.active .gs-search-submit {
  animation: slideDown 0.45s ease forwards;
}

.gs-search-submit:hover {
  background: #cc661d;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(44, 128, 255, 0.2);
}

/* Search Footer */
.gs-search-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 14px;
}

/* Prevent body scroll */
body.gs-search-open {
  overflow: hidden;
}

/* Animation for form elements */
.gs-search-field,
.gs-search-submit {
  animation: slideDown 0.5s ease backwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animations */
.gs-search-field:nth-child(1) {
  animation-delay: 0.2s;
}
.gs-search-field:nth-child(2) {
  animation-delay: 0.3s;
}
.gs-search-field:nth-child(3) {
  animation-delay: 0.4s;
}
.gs-search-field:nth-child(4) {
  animation-delay: 0.5s;
}
.gs-search-submit {
  animation-delay: 0.6s;
}

/* Responsive */

@media (max-width: 992px) {
  .gs-mobile-search-btn {
    display: block !important;
  }
  .gharsetu-menu-toggle {
    order: 1;
  }
  .gharsetu-logo-modern {
    order: 2;
    margin: 0 auto;
  }
  .gs-mobile-search-btn {
    order: 3;
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .gs-search-form {
    grid-template-columns: 1fr;
  }

  .gs-search-popup-body {
    padding: 70px 20px 20px;
  }

  .gs-search-title {
    font-size: 22px;
  }
}
