/* Homepage actions only. Shared TasteBud classes are aliases so their renderer
   and all existing behavior stay unchanged on this and other pages. */
.tw-home {
  --home-action-accent: var(--tw-accent-cyan);
  --home-action-tint: color-mix(in srgb, var(--home-action-accent) 9%, var(--tw-surface-elevated));
  --home-action-hover: color-mix(in srgb, var(--home-action-accent) 17%, var(--tw-surface-elevated));
  --home-action-border: color-mix(in srgb, var(--home-action-accent) 65%, var(--tw-surface-elevated));
  --home-selected-text: var(--tw-bg);
}

.tw-home :is(.tw-home-action, .tastebud-shuffle-button, .tastebud-suggestion-select) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--home-action-border);
  border-radius: var(--tw-ui-radius-control);
  background: var(--home-action-tint);
  color: var(--home-action-accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tw-home :is(.tw-home-action, .tastebud-shuffle-button, .tastebud-suggestion-select):hover {
  background: var(--home-action-hover);
  border-color: var(--home-action-accent);
}

.tw-home .tw-home-action--primary {
  background: var(--tw-btn-primary-bg);
  color: var(--tw-btn-primary-text);
  border-color: var(--tw-btn-border);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--tw-accent-amber) 18%, transparent);
}

.tw-home .tw-home-action--primary:hover {
  background: var(--tw-btn-primary-bg-hover);
  border-color: var(--tw-btn-border);
  transform: translateY(-1px);
}

.tw-home .home-fast-search__submit { width: 100%; }
.tw-home .browse-restaurants-link { flex-shrink: 0; }
.tw-home .tastebud-shuffle-button { flex: 0 0 auto; min-width: 44px; }
.tw-home .home-fast-search .tastebud-suggestion-select {
  background: var(--home-action-tint);
  color: var(--home-action-accent);
  border-color: var(--home-action-border);
  border-radius: var(--tw-ui-radius-control);
  font-size: 13px;
  font-weight: 750;
  text-align: left;
}
.tw-home .home-fast-search .tastebud-suggestion-select:hover {
  background: var(--home-action-hover);
  border-color: var(--home-action-accent);
}
.tw-home .tastebud-suggestion-select option {
  background: var(--tw-bg-elevated);
  color: var(--tw-text-main);
}

/* The existing radio inputs retain native checked and arrow-key behavior. */
.tw-home .home-fast-search__intent { gap: 0; }
.tw-home .home-fast-search__intent label { margin: 0; min-width: 0; }
.tw-home .home-fast-search__intent span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--tw-input-border);
  border-inline-end-width: 0;
  background: var(--tw-surface-elevated);
  color: var(--tw-text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tw-home .home-fast-search__intent label:first-of-type span {
  border-radius: var(--tw-ui-radius-control) 0 0 var(--tw-ui-radius-control);
}
.tw-home .home-fast-search__intent label:last-of-type span {
  border-inline-end-width: 1px;
  border-radius: 0 var(--tw-ui-radius-control) var(--tw-ui-radius-control) 0;
}
.tw-home .home-fast-search__intent input:not(:disabled) + span:hover {
  background: var(--home-action-hover);
  color: var(--home-action-accent);
}
.tw-home .home-fast-search__intent input:checked + span,
.tw-home .home-fast-search__intent input:checked:not(:disabled) + span:hover {
  background: var(--home-action-accent);
  border-color: var(--home-action-accent);
  color: var(--home-selected-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.tw-home .featured-restaurant-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 64px;
  height: 100%;
  box-sizing: border-box;
  padding: 8px 7px;
  border: 1px solid var(--home-action-border);
  border-radius: var(--tw-ui-radius-control);
  background: var(--tw-surface-elevated);
  color: var(--tw-text-main);
  text-decoration: none;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.tw-home .featured-restaurant-link:hover {
  background: var(--home-action-hover);
  border-color: var(--home-action-accent);
  box-shadow: var(--tw-premium-shadow-soft);
  transform: translateY(-1px);
}
.tw-home .featured-restaurant-link__name {
  max-width: 100%;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.tw-home .featured-restaurant-link__location {
  color: var(--tw-text-muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

/* Low-emphasis utilities remain text actions instead of competing CTAs. */
.tw-home :is(.home-fast-search__taste-toggle, .daily-tastebud-suggestion) {
  min-height: 44px;
  color: var(--home-action-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tw-home :is(.home-fast-search__taste-toggle, .daily-tastebud-suggestion):hover {
  text-decoration-thickness: 2px;
}
.tw-home .home-fast-search__taste-toggle[aria-expanded="true"] {
  text-decoration-thickness: 2px;
}
.tw-home :is(.home-fast-search__taste-toggle, .daily-tastebud-suggestion):active {
  background: var(--home-action-hover);
}
.tw-home #taste-row .tastebud-clear-button:hover,
.tw-home #taste-row .tastebud-clear-button:active {
  background: var(--home-action-hover);
  color: var(--home-action-accent);
}
.tw-home .home-fast-search__intent input:not(:disabled) + span:active {
  box-shadow: inset 0 0 0 2px currentColor;
}
.tw-home :is(a, button, select):focus-visible,
.tw-home .home-fast-search__intent input:focus-visible + span {
  outline: 2px solid var(--tw-focus-ring);
  outline-offset: 3px;
}
.tw-home .home-fast-search__intent input:focus-visible + span {
  position: relative;
  z-index: 1;
}
.tw-home :is(.tw-home-action, .tastebud-shuffle-button, .tastebud-suggestion-select,
  .featured-restaurant-link):active {
  transform: none;
  box-shadow: inset 0 0 0 2px currentColor;
}
.tw-home :is(.tw-home-action, .tastebud-shuffle-button, .tastebud-suggestion-select,
  .home-fast-search__taste-toggle):is(:disabled, [aria-disabled="true"]),
.tw-home .home-fast-search__intent input:disabled + span {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.tw-home :is(.tw-home-action, .tastebud-shuffle-button)[hidden] { display: none; }

@media (max-width: 480px) {
  .tw-home .patron-signup-callout__primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.tw-home) { scroll-behavior: auto; }
  .tw-home :is(.tw-home-action, .tastebud-shuffle-button, .tastebud-suggestion-select,
    .featured-restaurant-link),
  .tw-home :is(.tw-home-action, .featured-restaurant-link):hover {
    transition: none;
    transform: none;
  }
}
