/* Styles for the search form view (app.search.form). As a route view, not a component, every rule hangs from the
   '.search-form' root class to scope it and to outweigh generic classes on the same element (e.g. .panel). */

.search-form {
  display: flex;
  flex-direction: column;
  gap: var(--md-spacing-xs);
  min-height: 100vh;
  padding: var(--md-spacing-mn);
  margin: 0 auto;
  max-width: var(--md-max-width-2xl);
}

/* Simple search */
.search-form .search-form__search-row {
  display: flex;
  align-items: center;
  gap: var(--md-spacing-3xs);
}

.search-form .search-form__search-input {
  flex: 1;
}

/* Empty state: no search done yet */
.search-form .search-form__empty {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 320px; /* no token: MDDS has no height ramp */
  align-items: center;
  justify-content: center;
  gap: var(--md-spacing-2xs);
  border: var(--md-border-width-sm) solid var(--md-border-primary);
}

.search-form .search-form__empty-icon {
  color: var(--md-content-tertiary);
  font-size: var(--md-font-size-11);
}

.search-form .search-form__empty-text {
  flex-direction: column;
  gap: var(--md-spacing-3xs);
  text-align: center;
}

.search-form .search-form__empty-text > p {
  margin: var(--md-spacing-none);
  color: var(--md-content-tertiary);
  font-family: var(--md-text-body-mn-font-family);
  font-size: var(--md-text-body-mn-font-size);
  font-weight: var(--md-text-body-mn-regular-font-weight);
  line-height: var(--md-text-body-mn-line-height);
  letter-spacing: var(--md-text-body-mn-letter-spacing);
}

.search-form .search-form__empty-text > .search-form__empty-title {
  font-family: var(--md-text-heading-xs-font-family);
  font-size: var(--md-text-heading-xs-font-size);
  font-weight: var(--md-text-heading-xs-bold-font-weight);
  line-height: var(--md-text-heading-xs-line-height);
  letter-spacing: var(--md-text-heading-xs-letter-spacing);
}

.search-form .search-form__empty-text > .search-form__empty-description {
  max-width: 52ch; /* no token: 320px wraps it into 3 lines and 600px into 1; ch keeps it at 2 */
}

.search-form .search-form__empty-action {
  margin-top: var(--md-spacing-2xs);
}

/* Saved searches */
.search-form .search-form__saved-searches {
  display: flex;
  flex-direction: column;
}

.search-form .search-form__saved-searches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Four columns, as in the design: the collapsed state shows exactly one row. */
.search-form .search-form__saved-searches-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
