/* ===================== HEADER EXPANDING SEARCH ===================== */

.search-popup.header-popup-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  background: transparent;
  border-radius: 25px;
  height: 40px;
  width: 42px;
  cursor: pointer;
  z-index: 1000;
  transition: background 0.3s ease;
}

.search-popup.header-popup-search .e-search-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  position: relative;
  z-index: 3;
  background: transparent;
  cursor: pointer;
}

.search-popup.header-popup-search .e-search-label svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
  transition: fill 0.3s ease;
}

.search-popup.header-popup-search .e-search-input-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  height: 40px;
  width: 0;
  overflow: hidden;
  background: transparent;
  border-radius: 25px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  transition: width 0.4s ease, opacity 0.3s ease, background 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.search-popup.header-popup-search.active .e-search-input-wrapper {
  width: 240px;
  opacity: 1;
  pointer-events: auto;
  background: #ffffff;
}

.search-popup.header-popup-search.active .e-search-label svg {
  fill: #000000;
}

.search-popup.header-popup-search .e-search-input {
  width: 100%;
  border: none;
  outline: none;
  padding: 0 10px 0 15px;
  font-size: 14px;
  background: transparent;
  color: #ffffff;
  transition: color 0.3s ease;
}

.search-popup.header-popup-search.active .e-search-input {
  color: #000000;
}

.search-popup.header-popup-search .e-search-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.search-popup.header-popup-search.active .e-search-input::placeholder {
  color: #000000;
}

.search-popup.header-popup-search:hover .e-search-label svg {
  fill: #ccc;
}

/* Responsive header styles */
@media (max-width: 1366px) {
  .search-popup.header-popup-search {
    height: 35px;
  }
  .search-popup.header-popup-search .e-search-label {
    width: 35px;
    height: 35px;
  }
  .search-popup.header-popup-search .e-search-label svg {
    width: 14px;
    height: 14px;
  }
  .search-popup.header-popup-search .e-search-input-wrapper {
    height: 35px;
  }
  .search-popup.header-popup-search.active .e-search-input-wrapper {
    width: 200px;
    height: 35px;
  }
  .search-popup.header-popup-search .e-search-input {
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  .search-popup.header-popup-search.active .e-search-input-wrapper {
    width: 180px;
  }
}

@media (max-width: 768px) {
  .search-popup.header-popup-search.active .e-search-input-wrapper {
    width: 150px;
  }
  .search-popup.header-popup-search .e-search-input {
    font-size: 13px;
  }
  .search-popup.header-popup-search .e-search-label svg {
    width: 14px;
    height: 14px;
  }
}


/* ===================== FOOTER EXPANDING SEARCH ===================== */

.search-popup.footer-popup-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  background: transparent;
  border-radius: 25px;
  height: 40px;
  width: 42px;
  cursor: pointer;
  z-index: 900;
  transition: background 0.3s ease;
}

.search-popup.footer-popup-search .e-search-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 40px;
  position: relative;
  z-index: 3;
  background: transparent;
  cursor: pointer;
}

/* Black icon for footer */
.search-popup.footer-popup-search .e-search-label svg {
  width: 18px;
  height: 18px;
  fill: #000000;
  transition: fill 0.3s ease;
}

/* Input wrapper (hidden until active or mobile) */
.search-popup.footer-popup-search .e-search-input-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  height: 40px;
  width: 0;
  overflow: hidden;
  background: transparent;
  border-radius: 25px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  transition: width 0.4s ease, opacity 0.3s ease, background 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

/* Expanded (desktop) */
.search-popup.footer-popup-search.active .e-search-input-wrapper {
  width: 240px;
  opacity: 1;
  pointer-events: auto;
  background: #ffffff;
}

/* Input field */
.search-popup.footer-popup-search .e-search-input {
  width: 100%;
  border: none;
  outline: none;
  padding: 0 15px;
  font-size: 14px;
  background: transparent;
  color: #000000;
}

.search-popup.footer-popup-search .e-search-input::placeholder {
  color: rgba(0, 0, 0, 0.6);
}

/* ======== Responsive Footer ======== */

@media (max-width: 1366px) {
  .search-popup.footer-popup-search {
    height: 35px;
  }
  .search-popup.footer-popup-search .e-search-label {
    width: 35px;
    height: 35px;
  }
  .search-popup.footer-popup-search .e-search-label svg {
    width: 14px;
    height: 14px;
  }
  .search-popup.footer-popup-search .e-search-input-wrapper {
    height: 35px;
  }
  .search-popup.footer-popup-search.active .e-search-input-wrapper {
    width: 200px;
    height: 35px;
  }
  .search-popup.footer-popup-search .e-search-input {
    font-size: 13px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .search-popup.footer-popup-search.active .e-search-input-wrapper {
    width: 180px;
  }
}


/* ===== Mobile: always expanded with icon inside field ===== */
@media (max-width: 768px) {
  .search-popup.footer-popup-search {
    width: 100%;
    justify-content: center;
    cursor: default;
  }

  /* Disable expansion animation on mobile */
  .search-popup.footer-popup-search,
  .search-popup.footer-popup-search.active {
    pointer-events: auto !important;
  }

  .search-popup.footer-popup-search .e-search-input-wrapper,
  .search-popup.footer-popup-search.active .e-search-input-wrapper {
    position: relative;
    width: 100% !important;
    max-width: 100%;
    margin: 0 auto;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: #ffffff !important;
    border-radius: 25px;
    box-shadow: none;
    height: 30px;
    display: flex;
    align-items: center;
    padding-left: 20px; /* space for icon */
    transition: none !important; /* stop width shrinking animation */
  }

  /* Icon inside input */
  .search-popup.footer-popup-search .e-search-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 3;
  }

  .search-popup.footer-popup-search .e-search-label svg {
    fill: #000000 !important;
    width: 16px;
    height: 16px;
  }

  .search-popup.footer-popup-search .e-search-input {
    color: #000000 !important;
    font-size: 15px;
    padding: 0 18px;
    background: transparent;
    width: 100%;
  }

  .search-popup.footer-popup-search .e-search-input::placeholder {
    color: #000000 !important;
  }
}

