/* =============== BASE =============== */
.aps {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
}

/* Hide mobile trigger by default */
.aps-trigger { display: none; }

/* Desktop search bar */
.aps-desktop {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.aps-form {
  display: flex;
  align-items: center;
  border-radius: 50px;
  background: linear-gradient(90deg, #0f58c0, #004a9c);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  padding: 5px;
}
.aps-input {
  background: #fff;
  border: none;
  outline: none;
  border-radius: 50px;
  padding: 10px 15px;
  font-size: 15px;
  color: #333;
  width: 250px;
}
.aps-submit {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 10px;
  border-radius: 50%;
}
.aps-results {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  list-style: none;
  margin-top: 8px;
  width: 100%;
  display: none;
}
.aps-results li {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}
.aps-results li:last-child { border-bottom: none; }
.aps-results a { color: #333; text-decoration: none; display: block; }
.aps-empty { text-align: center; color: #777; padding: 10px 0; }

/* =============== MOBILE =============== */
@media (max-width: 1024px) {
  .aps-desktop { display: none; }
  .aps-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0f58c0;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }

  .aps-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
  }
  .aps-overlay.aps-active { display: flex; }

  .aps-form-mobile {
    background: linear-gradient(90deg, #0f58c0, #004a9c);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 5px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  }

  .aps-results-mobile {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    list-style: none;
    margin-top: 15px;
    width: 90%;
    max-width: 600px;
    display: none;
  }

  .aps-results-mobile li {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
  }
  .aps-results-mobile li:last-child { border-bottom: none; }
  .aps-results-mobile a { color: #333; text-decoration: none; display: block; }

  body.aps-noscroll { overflow: hidden; }
}
