/* Moved from websites/templates/websites/website_webpages_sitelink.html (redesign checklist: local CSS out of the templates).
   Loaded only by that page, at the place its <style> stood. */

/* The filter row: every filter a dropdown of one shape, as on the links
   list (_pages_table_styles.html). `form select` is width:100% further
   up the cascade, so each one claims its own width back. */
.filter-chips { display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-3); margin: 0 0 var(--space-2); }
.filter-select { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.filter-chips--selects select { width: auto; max-width: 230px;
  min-height: 30px; padding: 2px 6px; font-size: 12px; }

.sitelink-table td { vertical-align: top; }
.sitelink-table .seo-cell-num { text-align: right; white-space: nowrap; }
.page-cell-title { font-weight: 600; }
.page-cell-path { display: block; font-size: 0.85em; overflow-wrap: anywhere; }
.fitness-cell { white-space: nowrap; }
.link-text-cell { white-space: nowrap; }
.link-text-length { font-size: 0.8em;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.link-text-cell .link-text-length { display: block; }
/* "Why" folds into a <details> per row; opened, the reasons wrap into a
   readable measure instead of a tall, 12-character-wide strip. The resets
   undo the site's generic details {} box (UI kit §4.3.1). */
.why-details { border: 0; background: none; padding: 0; margin: 0; }
.why-details summary { font-family: inherit; font-weight: 400; font-size: 0.85em;
  white-space: nowrap; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.why-details[open] summary { margin-bottom: 2px; }
.sitelink-table .why-details[open] { min-width: 30rem; }
.sitelink-form { display: inline; margin: 0; }
/* The three-way switch: one pill, three segments, the picked one filled
   in its meaning's colour (green on, grey undecided, red off). The radio
   itself is hidden but stays focusable for the keyboard. */
.sitelink-switch { display: inline-flex; margin: 0; padding: 0; border: 1px solid
    color-mix(in srgb, var(--color-text) 25%, transparent);
  border-radius: 999px; overflow: hidden; white-space: nowrap; }
.sitelink-switch-option { position: relative; margin: 0; cursor: pointer; }
.sitelink-switch-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sitelink-switch-option span { display: block; padding: 3px 10px; font-size: 12px;
  line-height: 1.4; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.sitelink-switch-option + .sitelink-switch-option span { border-left: 1px solid
    color-mix(in srgb, var(--color-text) 15%, transparent); }
.sitelink-switch-option:hover span { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.sitelink-switch-option input:focus-visible + span { outline: 2px solid var(--color-primary, var(--blue));
  outline-offset: -2px; }
.sitelink-switch-option--on input:checked + span { background: var(--mint); color: var(--white); font-weight: 600; }
.sitelink-switch-option--undecided input:checked + span { background:
    color-mix(in srgb, var(--color-text) 18%, transparent); color: var(--color-text); font-weight: 600; }
.sitelink-switch-option--off input:checked + span { background: var(--coral-text); color: var(--white); font-weight: 600; }
.sitelink-switch.is-saving { opacity: 0.6; pointer-events: none; }
.sitelink-switch-error { display: block; margin-top: 2px; font-size: 0.8em; color: var(--coral-text); white-space: normal; }
.row-best { background: color-mix(in srgb, var(--mint) 8%, transparent); }
.missing-list { margin: 0; padding-left: 1.1em; font-size: 0.85em; }
.reasons-list { margin: 0; padding-left: 1.1em; font-size: 0.85em; }

/* The ranked list: the reasons get a full-width row of their own under
   the facts, in two columns when the card is wide enough. */
.sitelink-rank .rank-item--actions {
  grid-template-areas: "num id score-a score-b act" ". facts facts facts act" ". why why why why"; }
.sitelink-rank .rank-score .rank-value { display: block; }
/* min-width: 0 — a multi-column box claims its column width as its
   minimum, which pushed the card wider than a phone. */
.sitelink-why { grid-area: why; min-width: 0; }
.sitelink-why .reasons-list, .sitelink-why .missing-list { columns: 2 24rem; column-gap: var(--space-4); }
.sitelink-why li { break-inside: avoid; }
.sitelink-rank .rank-item--best { background: color-mix(in srgb, var(--mint) 8%, var(--color-neutral-100)); }
@media (max-width: 720px) {
  .sitelink-rank .rank-item--actions {
    grid-template-areas: "num id" ". score-a" ". score-b" ". facts" ". why" ". act"; }
  .sitelink-why .reasons-list, .sitelink-why .missing-list { columns: auto; }
  .sitelink-rank .rank-fact { white-space: normal; }
}
.rival-table td { vertical-align: top; }
.rival-text { font-weight: 600; white-space: nowrap; }
.rival-text small, .rival-desc small { display: block; font-size: 0.8em;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.rival-text small.over, .rival-desc small.over { color: var(--coral-text); }
.rival-path { display: block; font-size: 0.85em; overflow-wrap: anywhere; }
.rival-keywords { font-size: 0.8em; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.theme-chips { display: flex; flex-wrap: wrap; gap: 0.4em 0.6em; margin: 0.4em 0 0.8em; padding: 0; list-style: none; }
.theme-chips li { border: 1px solid color-mix(in srgb, var(--color-text) 20%, transparent);
  border-radius: 999px; padding: 0.15em 0.7em; font-size: 0.85em; }
.theme-chips li.answered { border-color: var(--mint); }
.theme-chips li.open { border-color: var(--coral-text); }
.sitelink-proof { display: block; flex-basis: 100%; margin-top: 2px; }
.sitelink-proof__line { display: block; font-size: 0.8em; white-space: normal;
  color: color-mix(in srgb, var(--color-text) 65%, transparent); }

