/**
 * Pulsante dinamico barra ricerca: Cerca ↔ Catalogo
 */

.search-action-btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  transition:
    inline-size 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-action-btn__labels {
  position: relative;
  display: grid;
  place-items: center;
  min-inline-size: 2.5rem;
}

.search-action-btn__label {
  grid-area: 1 / 1;
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.1;
}

.search-action-btn__label--search {
  opacity: 0;
  transform: translateY(6px) scale(0.94);
  pointer-events: none;
}

.search-action-btn__label--catalog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.search-action-btn--has-query .search-action-btn__label--search {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.search-action-btn--has-query .search-action-btn__label--catalog {
  opacity: 0;
  transform: translateY(-6px) scale(0.94);
  pointer-events: none;
}

/* Variante hero (home statica) */
.search-action-btn--hero {
  height: 100%;
  padding-inline: 0.85rem;
  min-inline-size: 2.75rem;
  border-radius: 9999px;
  background: #00d2ff;
  color: #0b1120;
  font-size: 0.8125rem;
  box-shadow: 0 2px 8px rgba(0, 210, 255, 0.35);
}

@media (min-width: 640px) {
  .search-action-btn--hero {
    padding-inline: 1.35rem;
    font-size: 0.875rem;
  }
}

.search-action-btn--hero.search-action-btn--has-query {
  min-inline-size: 4.5rem;
}

.search-action-btn--hero:not(.search-action-btn--has-query) {
  min-inline-size: 9.5rem;
  max-inline-size: 11.5rem;
}

@media (max-width: 380px) {
  .search-action-btn--hero:not(.search-action-btn--has-query) {
    min-inline-size: 7.5rem;
    font-size: 0.7rem;
    padding-inline: 0.65rem;
  }
}

.search-action-btn--hero:hover {
  background: #00e0ff;
}

.search-action-btn--hero .search-action-btn__label--catalog {
  font-size: 0.72rem;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .search-action-btn--hero .search-action-btn__label--catalog {
    font-size: inherit;
  }
}

/* Variante toolbar catalogo (SearchView) */
.search-action-btn--toolbar {
  min-block-size: 44px;
  padding-inline: 0.85rem;
  border-radius: 0.75rem;
  background: var(--ss-teal, #00d2ff);
  color: #0b1120;
  font-size: 0.8125rem;
  margin-inline-end: 0.1rem;
}

.search-action-btn--toolbar:not(.search-action-btn--has-query) {
  min-inline-size: 8.5rem;
  max-inline-size: 10rem;
}

.search-action-btn--toolbar.search-action-btn--has-query {
  min-inline-size: 3.75rem;
}

.search-action-btn--toolbar:hover {
  filter: brightness(1.06);
}

.search-action-btn--toolbar .search-action-btn__label--catalog {
  font-size: 0.68rem;
}

@media (min-width: 480px) {
  .search-action-btn--toolbar .search-action-btn__label--catalog {
    font-size: 0.75rem;
  }
}
