/**
 * ADRA Search Overlay Styles
 */

/* Overlay container */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Dark semi-transparent backdrop */
.search-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Content box */
.search-overlay-content {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 680px;
  padding: 40px 35px 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(-30px);
  transition: transform 0.3s ease;
}

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

/* Close button */
.search-overlay-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 32px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.search-overlay-close:hover {
  color: #333;
  background-color: #f0f0f0;
}

/* Title */
.search-overlay-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #2c5530;
  margin: 0 0 20px;
  text-align: center;
}

/* Form */
.search-overlay-form {
  width: 100%;
}

/* Input wrapper */
.search-input-wrapper {
  display: flex;
  align-items: center;
  border: 2px solid #2c5530;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-wrapper:focus-within {
  border-color: #03a61c;
  box-shadow: 0 0 0 3px rgba(3, 166, 28, 0.15);
}

/* Input field */
.search-overlay-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 18px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  color: #333;
  background: transparent;
}

.search-overlay-input::placeholder {
  color: #999;
}

.search-overlay-input.search-input-error {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Search button */
.search-overlay-btn {
  background: #2c5530;
  border: none;
  padding: 14px 18px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.search-overlay-btn:hover {
  background: #03a61c;
}

.search-overlay-btn svg {
  width: 22px;
  height: 22px;
}

/* Hint links */
.search-overlay-hints {
  margin-top: 18px;
  text-align: center;
}

.search-overlay-hints p {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: #888;
  margin: 0;
}

.search-overlay-hints a {
  color: #2c5530;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.search-overlay-hints a:hover {
  color: #03a61c;
  text-decoration: underline;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .search-overlay {
    padding-top: 8vh;
  }

  .search-overlay-content {
    width: 95%;
    padding: 30px 20px 25px;
  }

  .search-overlay-title {
    font-size: 18px;
  }

  .search-overlay-input {
    padding: 12px 14px;
    font-size: 15px;
  }

  .search-overlay-btn {
    padding: 12px 14px;
  }
}

@media screen and (max-width: 480px) {
  .search-overlay-content {
    padding: 25px 15px 20px;
  }

  .search-overlay-title {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .search-overlay-input {
    padding: 10px 12px;
    font-size: 14px;
  }
}
