/* Links view — search bar + M27 enllaços list */
/* Search bar: see view-shared.css */
/* Pager: see view-shared.css */

/* ============================================================
   SEARCH BAR — links-specific overrides
   ============================================================ */

/* Title input: first row, full width */
.links-search-bar .form-item-title {
  order: -2;
  grid-column: 1 / -1;
  position: relative;
}

/* Hide "Cerca" label — placeholder is enough */
.links-search-bar .form-item-title label {
  display: none;
}

/* Text input padding for search icon */
.links-search-bar .form-item-title input[type="text"],
.links-search-bar .form-item-title input[type="search"] {
  padding: 0.625rem 1rem 0.625rem 2.5rem;
}

/* Search icon */
.links-search-bar .form-item-title::after {
  content: 'search';
  font-family: 'Material Icons';
  position: absolute;
  left: 0.75rem;
  bottom: 0.2rem;
  font-size: 20px;
  color: #90A1B9;
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE GRID — description (text) + category (select) + button
   ============================================================ */

/* Desktop: description + category + button on same row */
@media (min-width: 768px) {
  .links-search-bar .views-exposed-form {
    grid-template-columns: 1fr 1fr auto;
  }

  .links-search-bar .form-actions {
    grid-column: auto;
  }
}

/* Tablet+: title spans the full first row. The submit button stays inline
   with the category dropdown (1fr 1fr auto above) — like /noticies & /agenda. */
@media (min-width: 500px) {
  .links-search-bar .form-item-title {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   RESULT ROWS
   ============================================================ */

/* Hide original Drupal view rows — we render the list from preprocess */
.links-results > .views-element-container,
.links-results > .view-content {
  display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 767px) {
  .links-search-bar .views-exposed-form {
    grid-template-columns: 1fr;
  }

  .links-search-bar .form-item-title {
    grid-column: 1;
  }

  .links-search-bar {
    padding: 1rem;
  }
}
