/* Restaurant discovery cards adapted from the previous DEV app design. */
body:has(.content-page-search) { background-color: #f5f6f8; }
.content-page-search { max-width: 1520px; margin: 82px auto 0; padding-inline: 24px; color: #202735; }
/* Clipped card contents must pass scrolling to the page. */
.content-page-search * { overscroll-behavior: auto; }
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: start; gap: 28px; }
.search-results-main { min-width: 0; }
.search-results-main > .search-for-name { min-height: 46px; border-color: #e0e4eb; border-radius: 12px; background: #fff; padding-inline: 16px; }
.search-sort-links { padding: 12px 0; text-align: right; font-size: .9rem; }
.search-sort-links a { color: #536d8d; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 30px; border-radius: 8px; }
.search-sort-links a:hover { background: #e7eefc; }
.search-location-button { margin: 0 0 24px; min-height: 48px; }
.search-location-button > div:first-child { border-color: #dce5f5 !important; border-radius: 12px 0 0 12px !important; background: #edf3ff !important; align-items: center; }
.search-location-button > div:last-child { border-radius: 0 12px 12px 0 !important; background: #536f94 !important; align-items: center; }
.restaurant-results-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; }
/* App card: promotion/offer controls, then logo/details and the aligned footer. */
.restaurant-result-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid #dfe6ef; border-radius: 10px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.restaurant-result-card:hover { border-color: #bdcce0; box-shadow: 0 4px 16px rgb(22 35 57 / 7%); }
.restaurant-result-card[hidden] { display: none; }
.restaurant-result-toolbar { display: flex; min-height: 30px; }
.restaurant-result-toolbar button { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; padding: 5px 10px; border: 0; border-radius: 0; font-weight: 750; line-height: 1.3; box-shadow: none; cursor: pointer; }
.restaurant-result-promotion { flex: 1; min-width: 0; background: #f3e1e2; color: #854b53; font-size: .82rem; text-align: center; }
.restaurant-result-offers { flex: 0 0 50px; background: #deebe2; color: #3e6650; font-size: 1rem; }
.restaurant-result-offers-full { flex: 1; font-size: .82rem; }
.restaurant-result-promotion:hover { background: #ebd1d4; }
.restaurant-result-offers:hover { background: #cbded1; }
.restaurant-result-toolbar button:focus-visible { outline: 3px solid #3269ef; outline-offset: -3px; }
.restaurant-result-link { display: grid; min-width: 0; color: #111827; text-decoration: none; grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: minmax(104px, auto) 36px; }
.restaurant-result-link:hover { color: #111827; }
.restaurant-result-link:focus-visible { outline: 3px solid #3269ef; outline-offset: -3px; }
.restaurant-result-logo { position: relative; display: grid; place-items: center; min-width: 0; min-height: 104px; overflow: hidden; background: #fff; }
.restaurant-result-logo > img { width: 100%; height: 100%; max-height: 130px; object-fit: contain; padding: 3px; }
.restaurant-result-new { position: absolute; left: 0; bottom: 0; right: 0; padding: 3px; background: #eaf2ff; color: #285cc6; text-align: center; font-size: .7rem; font-weight: 700; }
.restaurant-result-info { min-width: 0; overflow: hidden; padding: 8px 10px 5px 6px; }
.restaurant-result-info h2 { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 0 0 5px; color: #111827; font-size: 1.05rem; font-weight: 800; line-height: 1.2; text-decoration: underline; text-underline-offset: 2px; }
.restaurant-result-address, .restaurant-result-kitchens { overflow: hidden; margin: 0 0 4px; font-size: .8rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.restaurant-result-address { color: #64748b; font-weight: 650; }
.restaurant-result-kitchens { display: block; min-width: 0; overflow: hidden; color: #111827; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
.restaurant-result-kitchens i { margin-right: 4px; color: #64748b; }
.restaurant-result-payments { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 18px; margin-top: 8px; }
.restaurant-result-payments img { width: auto; height: 17px; max-width: 30px; object-fit: contain; }
.restaurant-result-status { display: flex; grid-column: 1; align-items: center; justify-content: center; gap: 5px; padding: 4px 3px; color: #88545c; background: #f2e7e8; font-size: .7rem; font-weight: 750; line-height: 1.2; text-align: center; }
.restaurant-result-status.is-open { color: #42654d; background: #e9f1eb; }
.restaurant-result-status.is-preorder { color: #826b43; background: #f3eee3; }
.restaurant-result-footer { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 8px 5px 6px; color: #64748b; }
.restaurant-result-rating { display: inline-flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; }
.restaurant-result-stars { display: inline-flex; align-items: center; gap: 1px; color: #bd914d; font-size: .8rem; }
.restaurant-result-stars .far { color: #94a3b8; }
.restaurant-result-rating-count { font-size: .72rem; }
.restaurant-result-minimum { color: #64748b; font-size: .72rem; font-weight: 750; white-space: nowrap; }
/* Cuisine filter panel: quiet selection, consistent spacing and keyboard focus. */
.search-kitchen-sidebar { position: sticky; top: 80px; min-width: 0; }
.content-page-search #results-kitchen-fixed { position: static; width: auto; overflow: hidden; border: 1px solid #e0e4eb; border-radius: 14px; background: #fff; box-shadow: 0 3px 14px rgb(22 35 57 / 3%); }
.search-kitchen-title { display: flex; align-items: center; gap: 9px; margin: 0; padding: 18px 16px 15px; border-bottom: 1px solid #eef0f3; color: #253244; font-size: .9rem; font-weight: 700; line-height: 1.4; }
.search-kitchen-title i { color: #7b8796; font-size: .85rem; }
.content-page-search #results-kitchen-fixed .nav-scroll { max-height: calc(100dvh - 170px); overflow-y: auto; padding: 8px; scrollbar-width: thin; scrollbar-color: #d2d8e0 transparent; }
.content-page-search .kitchen-div-select { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; margin: 2px 0; border: 0; border-radius: 8px; background: transparent; color: #526071; text-align: left; padding: 10px; font-size: .82rem; font-weight: 500; line-height: 1.4; white-space: normal; cursor: pointer; transition: background .15s ease, color .15s ease; }
.content-page-search .kitchen-div-select::after { content: ''; flex: 0 0 14px; width: 14px; height: 14px; border: 1px solid #d2d8e0; border-radius: 50%; background: #fff; }
.content-page-search .kitchen-div-select.selected { background: #edf2f7; color: #405d7e; font-weight: 700; }
.content-page-search .kitchen-div-select.selected::after { border-color: #536f94; background: #536f94; box-shadow: inset 0 0 0 3px #fff; }
.content-page-search .kitchen-div-select:not(.selected):hover { background: #f5f7fa; color: #253244; }
.content-page-search .kitchen-div-select:focus-visible { outline: 2px solid #536f94; outline-offset: -2px; }
.search-results-footer { width: 100%; margin: 32px 0 0; }
@media (min-width: 850px) { .restaurant-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1320px) { .restaurant-results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
  .content-page-search { margin-top: 74px; padding-inline: 12px; }
  .search-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .search-mobile-tools { grid-row: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .content-page-search #results-kitchen-select-mobile, .content-page-search #results-sorting-select-mobile { width: 100% !important; float: none !important; min-height: 44px; padding: 8px; margin: 0 !important; border: 1px solid #dfe3eb; border-radius: 10px; background: #fff; color: #202735; text-shadow: none; font-size: .8rem; }
  .search-mobile-tools input { grid-column: 1 / -1; min-height: 44px; border-radius: 10px; text-align: left !important; border-color: #dfe3eb; }
  .search-location-button { margin-bottom: 20px; font-size: .85rem; }
  .restaurant-result-link { grid-template-columns: 104px minmax(0, 1fr); }
  .restaurant-result-info h2 { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .restaurant-result-card { transition: none; } }

@media (max-width: 359.98px) {
  .restaurant-result-link { grid-template-columns: 88px minmax(0, 1fr); }
  .restaurant-result-stars { font-size: .7rem; }
  .restaurant-result-rating-count, .restaurant-result-minimum { font-size: .65rem; }
}

/* Full-width invitation below the results and cuisine sidebar. */
.search-restaurant-invite { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 30px; border: 1px solid #dce5ee; border-radius: 18px; background: linear-gradient(115deg, #edf3f8, #f8fafc 65%, #edf3f0); box-shadow: 0 4px 18px rgb(22 35 57 / 3%); }
.search-invite-icon { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #dbe5ef; border-radius: 18px; background: #fff; color: #6986a6; font-size: 1.5rem; }
.search-invite-copy { min-width: 0; }
.search-invite-copy h2 { margin: 0 0 8px; color: #253244; font-size: clamp(1.15rem, 1.7vw, 1.45rem); font-weight: 750; line-height: 1.25; }
.search-invite-copy p { max-width: 540px; margin: 0; color: #718096; font-size: .85rem; line-height: 1.6; text-align: left; }
.search-invite-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.search-invite-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 16px; border: 1px solid #d2dce7; border-radius: 10px; background: #fff; color: #536f94; font-size: .8rem; font-weight: 650; line-height: 1.4; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.search-invite-button.is-primary { border-color: #536f94; background: #536f94; color: #fff; }
.search-invite-button:hover { border-color: #afc1d5; background: #edf2f7; color: #405d7e; }
.search-invite-button.is-primary:hover { border-color: #405d7e; background: #405d7e; color: #fff; }
.search-invite-button:focus-visible { outline: 2px solid #536f94; outline-offset: 3px; }
.search-invite-arrow { margin-left: 5px; font-size: .7rem; }
.search-area-intro { display: grid; grid-template-columns: minmax(200px, .3fr) minmax(0, 1fr); gap: 32px; margin: 24px 0 8px; padding: 26px 30px; border: 1px solid #e0e5eb; border-radius: 15px; background: #f8fafc; }
.search-area-intro h2 { max-width: 300px; margin: 0; color: #53657d; font-size: 1rem; font-weight: 700; line-height: 1.5; }
.search-area-intro p { max-width: 960px; margin: 0; color: #8290a2; font-size: .8rem; line-height: 1.8; text-align: left; }
@media (max-width: 1100px) {
  .search-restaurant-invite { grid-template-columns: 64px minmax(0, 1fr); gap: 16px 20px; }
  .search-invite-actions { grid-column: 2; justify-content: flex-start; }
}
@media (max-width: 767.98px) {
  .search-restaurant-invite { grid-template-columns: 48px minmax(0, 1fr); padding: 20px; gap: 14px; border-radius: 15px; }
  .search-invite-icon { width: 48px; height: 48px; border-radius: 14px; font-size: 1.2rem; }
  .search-invite-copy h2 { font-size: 1.1rem; }
  .search-invite-copy p { font-size: .78rem; }
  .search-invite-actions { display: grid; grid-template-columns: minmax(0, 1fr); grid-column: 1 / -1; gap: 9px; }
  .search-invite-button { width: 100%; }
  .search-area-intro { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; padding: 20px; }
  .search-area-intro h2 { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .search-invite-button { transition: none; } }

/* Dish matches share the existing delivery search, above restaurant results. */
#dish-search-results { margin: 20px 0 24px; }
#dish-search-results h2 { font-size: 1.15rem; font-weight: 700; color: #263345; margin-bottom: 12px; }
#dish-search-status { color: #64748b; font-size: .9rem; }
#dish-search-status:empty { display: none; }
.dish-results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.dish-result-card { display: flex; min-width: 0; border: 1px solid #dce4ee; border-radius: 14px; background: #fff; overflow: hidden; color: #263345; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.dish-result-card:hover, .dish-result-card:focus-visible { color: #263345; border-color: #9bb0cd; box-shadow: 0 4px 14px rgb(38 51 69 / 8%); }
.dish-result-card[hidden] { display: none; }
.dish-result-image { width: 100px; min-height: 110px; flex: 0 0 100px; display: flex; align-items: center; justify-content: center; background: #edf2f7; color: #8797ac; }
.dish-result-image img { width: 100%; height: 100%; object-fit: cover; }
.dish-result-copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 12px; }
.dish-result-copy strong { font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.dish-result-copy > span { color: #64748b; font-size: .8rem; }
.dish-result-copy b { align-self: flex-end; text-align: right; margin-top: auto; font-size: .9rem; color: #456184; }

.dish-result-copy > .dish-result-rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: .78rem; line-height: 1.25; }
.dish-result-rating .restaurant-result-stars { display: inline-flex; gap: 2px; }
