/**
 * Assemblée Nationale de Madagascar - Search Popup Styles
 * Professional search popup implementation following the theme guidelines
 */

/* Search Popup Container */
.theme-search-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.theme-search-popup.active {
  display: flex;
  opacity: 1;
  animation: searchFadeIn 0.3s ease forwards;
}

@keyframes searchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Search Popup Content */
.theme-search-content {
  width: 90%;
  max-width: 800px;
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  position: relative;
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

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

/* Search Form */
.theme-search-form {
  display: flex;
  width: 100%;
  position: relative;
}

.theme-search-input {
  flex: 1;
  border: 2px solid var(--border-gray);
  background-color: var(--white);
  padding: 20px 70px 20px 25px;
  font-size: 1.2rem;
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  outline: none;
  width: 100%;
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-search-input:hover {
  border-color: var(--medium-gray);
}

.theme-search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(14, 128, 64, 0.2);
}

.theme-search-input::placeholder {
  color: var(--medium-gray);
  opacity: 0.7;
}

/* Search Button */
.theme-search-button {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 70px;
  background-color: var(--green);
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.theme-search-button:hover {
  background-color: var(--dark-green);
}

/* Close Button */
.theme-search-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background-color: var(--green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  font-size: 1.2rem;
}

.theme-search-close:hover {
  background-color: var(--dark-green);
  transform: rotate(90deg);
}

/* Search Popup Header */
.theme-search-header {
  padding: 20px 25px 0;
  display: flex;
  align-items: center;
}

.theme-search-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green);
  display: inline-block;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .theme-search-content {
    width: 95%;
  }

  .theme-search-input {
    padding: 15px 60px 15px 20px;
    font-size: 1rem;
  }

  .theme-search-button {
    width: 60px;
  }

  .theme-search-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}
