/* Apply Open Sans font to all plugin elements */
.houzez-sas,
.houzez-sas * {
  font-family: 'Poppins', sans-serif;
}

.houzez-sas__container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.houzez-sas__tabs {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.7);
}

.houzez-sas__tab {
  color: #232323;
  padding: 10px 50px;
  cursor: pointer;
  font-size: 14px;
  border: none; 
}

.houzez-sas__tab:hover {
  background: rgba(255, 255, 255);
  color: #262626B3;
}

.houzez-sas__tab.is-active {
  background: #262626;
  color: #fff;
  border-radius: 6px;
}

.houzez-sas__search {
  position: relative;
  flex: 1 1 auto;
  min-width: 200px;
}

.houzez-sas__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 10px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, .8);
  min-height: 48px;
  flex: 1 1 auto;
}

.houzez-sas__input-wrap::before {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-image: url('https://nuavenue.demzdigital.website/wp-content/uploads/search.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

.houzez-sas__input-wrap.has-tag .houzez-sas__area-input::placeholder {
  opacity: 0;
}

.houzez-sas__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.houzez-sas__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #262626B3;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.houzez-sas__tag-remove {
  background: #262626B3; 
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0 3px 3px 3px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  transition: background 150ms ease-in-out;
}

.houzez-sas__tag-remove:hover {
  background: rgba(255, 255, 255, 0.3);
}

.houzez-sas__area-input {
  flex: 1 1 auto;
  min-width: 120px;
  border: none;
  background: transparent;
  color: #0f172a;
  padding: 0;
  outline: none;
  font-size: 14px;
  font-weight: 500;
}

.houzez-sas__area-input::placeholder {
  color: #262626B3;
  font-weight: 400;
}

.houzez-sas__input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.houzez-sas__search-btn {
  flex: 0 0 auto;
  padding: 10px 50px;
  background: #262626;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 200;
  cursor: pointer;
  transition: all 180ms ease-in-out;
  white-space: nowrap;
  min-height: 48px;
}

.houzez-sas__search-btn:hover {
  background: #000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.houzez-sas__search-btn:active {
  transform: translateY(1px);
}

.houzez-sas__suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  z-index: 20;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.houzez-sas__suggestion {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 160ms ease-in-out;
}

.houzez-sas__suggestion:hover {
  background: #f1f5f9;
}

.houzez-sas__badge {
  background: #e2e8f0;
  color: #475569;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.houzez-sas__results {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.houzez-sas__meta {
  margin-bottom: 12px;
  color: #475569;
  font-weight: 600;
}

.houzez-sas.is-loading {
  position: relative;
}

.houzez-sas.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.6);
  border-radius: 12px;
  z-index: 30;
}

.houzez-sas.is-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: houzez-sas-spin 0.9s linear infinite;
  z-index: 40;
}

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

/* Responsive styles */
@media (max-width: 768px) {
  .houzez-sas__container {
    flex-direction: column;
    align-items: stretch;
  }

  .houzez-sas__tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .houzez-sas__search {
    width: 100%;
  }

  .houzez-sas__search-btn {
    width: 100%;
  }
}
