/*
 * Etsy Listing Signals page. Loads after the Last Table tokens and components, which bring the hero, the form, the
 * result panel, the table and the chips. This file adds only the layout the search needs and uses only Last Table
 * variables. Nothing here glows: the one primary action is the search button, which Last Table already marks.
 */

#es-results[hidden], #es-table-wrap[hidden], #es-tags-box[hidden] { display: none; }
.lt-page .es-faqs h2 {
  margin: 0;
  font: 560 var(--lt-step-3) / var(--lt-leading-tight) var(--lt-font-display);
  color: var(--lt-text-1);
}
.lt-page .lt-section:last-child { padding-bottom: var(--lt-space-8); }

/* The search form, inside the dome */
.es-controls { display: flex; flex-wrap: wrap; gap: var(--lt-space-3); margin-top: var(--lt-space-3); }
.es-control { display: grid; gap: var(--lt-space-1); min-width: 12rem; }
.es-control select.lt-input { cursor: pointer; }
.es-samples { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lt-space-2); margin-top: var(--lt-space-3); }
.es-samples .lt-prompt-hint { margin: 0; }
.es-sample {
  min-height: 44px;
  border: 1px solid var(--lt-line);
  border-radius: var(--lt-radius-control);
  background: var(--lt-surface-2);
  color: var(--lt-text-2);
  padding: var(--lt-space-2) var(--lt-space-3);
  font: var(--lt-step--1) / 1.4 var(--lt-font-ui);
  cursor: pointer;
}
.es-sample:hover { border-color: var(--lt-teal); color: var(--lt-text-1); }
.es-data, .es-status { margin: var(--lt-space-4) 0 0; color: var(--lt-text-2); max-width: 44rem; }
.es-status { min-height: 1.6em; }
.es-status[data-tone="error"] { color: var(--lt-danger); }

/* The answer */
.es-buckets, .es-notes, .es-tags { list-style: none; margin: var(--lt-space-3) 0 0; padding: 0; }
.es-buckets, .es-tags { display: flex; flex-wrap: wrap; gap: var(--lt-space-2); }
.es-notes { display: grid; gap: var(--lt-space-2); color: var(--lt-text-2); }
.es-notes:empty { display: none; }
/* The table needs every column on a desktop; the text inside the panel keeps its own reading width. */
#es-results .lt-result { max-width: none; }
.es-result-text { max-width: 44rem; }
#es-table-wrap { margin-top: var(--lt-space-4); }
.es-table td.es-listing { white-space: normal; min-width: 16rem; max-width: 26rem; }
.es-listing a { display: block; color: var(--lt-teal); }
.es-shop { display: block; margin-top: 2px; color: var(--lt-text-3); }
#es-tags-box { margin-top: var(--lt-space-5); }

/* The rules and the notes */
.es-rule-list { display: grid; gap: var(--lt-space-2); padding-left: var(--lt-space-5); }
.es-metrics { display: grid; grid-template-columns: max-content 1fr; gap: var(--lt-space-2) var(--lt-space-4); }
.es-metrics dt { color: var(--lt-text-1); }
.es-metrics dd { margin: 0; color: var(--lt-text-2); }
.es-note { margin-top: var(--lt-space-5); }
.es-note p { margin: var(--lt-space-2) 0 0; }
.es-attribution { margin-top: var(--lt-space-5); font-size: var(--lt-step--1); }

@media (max-width: 480px) {
  .es-form .lt-prompt { align-items: stretch; }
}
@media (max-width: 560px) {
  .es-control { min-width: 0; flex: 1 1 100%; }
  .es-metrics { grid-template-columns: 1fr; }
  .es-metrics dd { margin-bottom: var(--lt-space-2); }
}
