/* ==========================================
   BETTER BITE ORLANDO
   HEALTHY RESTAURANT PAGE
========================================== */

/* GENERAL */

/* Global box sizing */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --green: #416b32;
  --dark-green: #365b2b;
  --light-green: #a8c59e;
  --pale-green: #edf4e9;
  --cream: #fafbf7;
  --text: #252b22;
}

/* Restaurant page layout */

body {
  font-family: var(--bbo-font);
  background-color: var(--bbo-white);
  color: var(--bbo-text-dark);

  min-height: 100vh;

  display: flex;
  flex-direction: column;

  overflow-x: hidden;
}

/* Main content occupies available space */

body > main {
  flex: 1 0 auto;
  width: 100%;
}

/* Shared footer stays below main content */

body > #footer-container {
  flex-shrink: 0;
  width: 100%;
}

/* ==========================================
   HERO SECTION
========================================== */

.hero {
  min-height: 350px;

  display: flex;
  align-items: center;

  padding: 35px max(24px, calc((100% - 1320px) / 2));

  background-image:
    linear-gradient(90deg, rgba(246, 249, 241, 0.82), rgba(246, 249, 241, 0.6)), url("../images/restaurant-hero.jpg");

  background-size: cover;
  background-position: center 70%;
  background-repeat: no-repeat;
}

.hero-content h1 {
  font-family: var(--bbo-font);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 800;
  color: var(--bbo-primary);
  margin-bottom: 10px;
}

.hero-content p {
  font-family: var(--bbo-font);
  font-size: 14px;
  color: var(--bbo-text-dark);
  margin: 0;
}

/* ==========================================
   FILTER PANEL
========================================== */

.filter-panel {
  position: relative;
  z-index: 5;

  margin: -25px auto 25px;
  padding: 20px;

  width: calc(100% - 40px);
  max-width: 1320px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;

  background-color: #a6c8a7;
  border-radius: 14px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;

  min-width: 0;
}

.filter-group > label {
  font-family: var(--bbo-font);
  font-size: 12px;
  font-weight: 600;
  color: var(--bbo-primary);
}

.filter-group select,
.filter-group input[type="text"] {
  width: 100%;
  min-height: 42px;

  padding: 8px 12px;

  border: 1px solid #999;
  border-radius: 8px;

  background-color: var(--bbo-white);
  color: var(--bbo-text-dark);

  font-family: var(--bbo-font);
  font-size: 13px;
}

.distance-group {
  flex: 0 0 180px;
}

#distance {
  width: 100%;
}

.dietary-group {
  flex: 1;
}

.diet-options {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.diet-options label {
  background: white;
  border: 1px solid #8da781;
  border-radius: 8px;

  padding: 5px 6px;

  font-size: 13px;
  white-space: nowrap;
  color: #416337;

  cursor: pointer;
}

/* Visually hide checkboxes while keeping keyboard accessibility */
.diet-options input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.diet-options label:has(input:checked) {
  background-color: var(--bbo-primary);
  color: var(--bbo-white);
}

.location-group {
  flex: 0 1 150px;
}

.cuisine-group {
  flex: 0 1 160px;
}
.location-input {
  position: relative;
  display: flex;
  align-items: center;
}

.location-input span {
  position: absolute;
  left: 5px;
  color: var(--green);
  font-size: 12px;
  z-index: 1;
}

.location-input input,
#cuisine {
  width: 100%;
}

.location-input input {
  padding-left: 19px !important;
}

.search-button {
  min-height: 42px;
  padding: 8px 20px;

  background-color: var(--bbo-primary);
  color: var(--bbo-white);

  border: none;
  border-radius: 8px;

  font-family: var(--bbo-font);
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.search-button span {
  font-size: 17px;
  margin-left: 3px;
}

.search-button:hover {
  background: #253f1f;
}

/* ==========================================
   RESTAURANT LAYOUT
========================================== */

.restaurant-layout {
  display: grid;

  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);

  gap: 20px;
  width: calc(100% - 40px);
  max-width: 1320px;

  margin: 0 auto 30px;
  align-items: start;
}

.restaurant-column {
  min-width: 0;
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.results-heading h2 {
  font-family: var(--bbo-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--bbo-text-dark);
  margin: 0;
}

#resultCount {
  font-size: 13px;
  color: var(--bbo-primary);
}

.restaurant-grid {
  display: grid;

  grid-template-columns: minmax(0, 1fr);
  gap: 12px;

  max-height: 600px;
  overflow-y: auto;

  padding: 4px 8px 4px 2px;

  align-content: start;
}

/* ==========================================
   RESTAURANT CARDS
========================================== */

.restaurant-card {
  width: 100%;
  background: white;
  border: 1px solid #c9c9c9;
  border-radius: 13px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.2s;
  min-width: 0;
}

.restaurant-card:hover,
.restaurant-card.selected {
  border-color: #8ba780;
  box-shadow: 0 2px 7px #00000015;
}

.restaurant-card:hover {
  transform: translateY(-1px);
}

.restaurant-card img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.card-content {
  padding: 14px;
}

.card-content h3 {
  font-family: var(--bbo-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--bbo-text-dark);
  margin-bottom: 8px;
}

.card-meta {
  font-family: var(--bbo-font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--bbo-text-muted);
}

.card-meta span {
  display: block;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;

  gap: 5px;

  margin: 5px 0;
}

.tag {
  background-color: #dcebd6;
  color: var(--bbo-primary);

  padding: 5px 9px;
  border-radius: 8px;

  font-size: 11px;
  font-weight: 600;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.view-details {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.empty-message {
  padding: 20px;

  background: white;

  text-align: center;
  font-size: 12px;
}

/* ========================================
   Updated Restaurant Cards
======================================== */

.restaurant-card {
  width: 100%;
  min-height: 130px;

  display: block;
  padding: 14px;

  background-color: var(--bbo-white);

  border: 1px solid #d5d5d5;
  border-radius: 14px;

  text-align: left;
  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.restaurant-card:hover {
  border-color: var(--bbo-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.restaurant-card.selected {
  border: 2px solid var(--bbo-primary);
  background-color: #f7fbf5;
}

.restaurant-card:focus-visible {
  outline: 3px solid var(--bbo-primary);
  outline-offset: 2px;
}

/* Inner layout */

.restaurant-card-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Icon */

.restaurant-card-icon {
  width: 65px;
  height: 65px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #e5f2df;
  color: var(--bbo-primary);

  border-radius: 12px;
}

.restaurant-card-icon i {
  font-size: 28px;
}

/* Information */

.restaurant-card-info {
  flex: 1;
  min-width: 0;
}

.restaurant-card-info h3 {
  font-family: var(--bbo-font);
  font-size: 15px;
  font-weight: 700;

  color: var(--bbo-text-dark);
  margin-bottom: 6px;
}

.restaurant-card-info p {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}

.restaurant-card-address {
  color: var(--bbo-text-muted);
  overflow-wrap: anywhere;
}

.restaurant-card-distance {
  color: var(--bbo-primary);
  font-weight: 600;
}

.restaurant-card-arrow {
  flex-shrink: 0;
  color: var(--bbo-primary);
  font-size: 17px;
}

/* Dietary tags container */
.restaurant-dietary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0 10px;
}

/* Shared dietary tag appearance */
.restaurant-dietary-tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;

  border: 1px solid transparent;
  border-radius: 999px;

  padding: 4px 9px;

  font-size: 13px;
  line-height: 1.25;
  font-weight: 650;
  white-space: nowrap;
}

/* Vegetarian */
.restaurant-dietary-tag--vegetarian {
  color: #285a32;
  background: #e7f3e5;
  border-color: #c5dec1;
}

/* Vegan */
.restaurant-dietary-tag--vegan {
  color: #235344;
  background: #dcf3e9;
  border-color: #b8dfce;
}

/* Gluten-Free */
.restaurant-dietary-tag--gluten-free {
  color: #67358d;
  background-color: #f0e7f8;
  border-color: #dcc7ec;
}

/* Organic */
.restaurant-dietary-tag--organic {
  color: #795016;
  background: #fff2d9;
  border-color: #efd8a8;
}

/* Dietary information note */
.restaurant-dietary-note {
  margin: -5px 0 14px;
  color: #586554;
  font-size: 14px;
  line-height: 1.55;
}

.restaurant-dietary-note[hidden] {
  display: none;
}

/* No matching restaurants message */
.empty-message {
  border: 1px solid #d9e6d3;
  border-radius: 12px;

  background: #f7fbf5;
  color: #365b2b;

  font-size: 13px;
  line-height: 1.65;
  text-align: left;

  padding: 18px 20px;
}

/* ==========================================
   DETAILS TABS
========================================== */

.detail-tabs {
  display: flex;

  border-top: 1px solid #c9c9c9;
  border-bottom: 1px solid #c9c9c9;
}

.detail-tabs button {
  min-height: 42px;

  flex: 1;
  padding: 5px 2px;

  background: white;
  border: none;

  color: #333;

  font-family: var(--bbo-font);
  font-size: 13px;

  cursor: pointer;
}

.detail-tabs button.active {
  color: #333;
  border-bottom: 1px solid #aaa;
  font-weight: 400;
}

.tab-content {
  min-height: 85px;

  padding: 9px;

  font-family: var(--bbo-font);
  font-size: 13px;
  line-height: 1.6;

  color: #444;
}

.empty-details {
  padding: 30px 15px;

  text-align: center;

  color: #66715f;
  font-size: 11px;
}

/* ==========================================
   FAVORITES
========================================== */

.favorites-section {
  display: none;
}

.favorite-list {
  display: flex;
  gap: 12px;
}

.favorite-item {
  background: white;
  padding: 10px;
  border-radius: 8px;
}

/* ==========================================
   RESTAURANT INTERACTIVE MAP
========================================== */

#restaurant-map {
  display: block;

  width: 100%;

  height: 600px;
  min-height: 600px;

  position: relative;

  border-radius: 12px;
  overflow: hidden;

  z-index: 0;
}

/* Prevent website image styles from resizing Leaflet tiles */

#restaurant-map .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

/* Restaurant details panel */

.details-panel {
  display: flex;
  flex-direction: column;

  gap: 16px;

  min-width: 0;
  padding: 12px;
}

/* Restaurant information */

#detailsContent {
  padding: 5px 8px 15px;
}

.restaurant-details-info h2 {
  color: var(--bbo-primary);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.restaurant-details-info p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* ==========================================
   RESTAURANT TRANSPORTATION OPTIONS
========================================== */

.restaurant-map-directions,
.restaurant-detail-directions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;

  align-items: center;

  gap: 7px;
  margin-top: 12px;
}

.restaurant-direction-link {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  gap: 6px;

  padding: 8px 10px;

  background-color: var(--bbo-primary);
  color: white !important;

  border-radius: 7px;

  font-size: 12px;
  font-weight: 600;

  text-decoration: none !important;
  white-space: nowrap;

  flex-shrink: 0;
}

.restaurant-direction-link:hover {
  background-color: #294d28;
  color: white !important;
}

/* Leaflet popup sizing */

#restaurant-map .leaflet-popup-content-wrapper {
  min-width: 285px;
}

#restaurant-map .leaflet-popup-content {
  min-width: 255px;
}

/* Improve map popup address */

.restaurant-map-address {
  margin: 5px 0 0;
  line-height: 1.5;
}

/* Restaurant opening hours */

.restaurant-opening-hours {
  margin: 12px 0 18px;
}

.restaurant-opening-hours h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--bbo-primary);
  margin-bottom: 12px;
}

/* Full opening hours schedule */

.restaurant-hours-list {
  display: grid;
  grid-template-columns: minmax(85px, max-content) 1fr;
  gap: 9px 24px;
  align-items: baseline;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.restaurant-hours-list dt {
  font-weight: 600;
  color: var(--bbo-text-dark);
}

.restaurant-hours-list dd {
  margin: 0;
  color: #536052;
  text-align: left;
}

/* Compact hours on restaurant cards */

.restaurant-card-hours {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bbo-text-muted);
}

/* Match Groceries results header */

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.results-heading #resultCount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* Sorting dropdown */

.results-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-sort label {
  font-size: 13px;
  white-space: nowrap;
}

.results-sort .form-select {
  width: auto;
  font-size: 13px;
}

/* Match Groceries initial empty state */

.restaurant-empty-placeholder {
  grid-column: 1 / -1;

  padding: 25px;
  margin: 0;

  background-color: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 10px;

  color: #666;
  font-size: inherit;
  font-weight: 400;
  text-align: center;
}

/* ==========================================
   SHARED VISUAL STYLE WITH GROCERIES
========================================== */

/* Search panel */
.filter-panel {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.2fr)
    minmax(0, 1fr)
    minmax(160px, 0.8fr);

  grid-template-areas:
    "diet diet diet diet"
    "zip radius cuisine search";

  gap: 14px 16px;
  align-items: end;

  background-color: var(--bbo-white);

  padding: 18px;

  border-radius: 14px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Assign existing filters to the grid */
.dietary-group {
  grid-area: diet;
}

.location-group {
  grid-area: zip;
}

.distance-group {
  grid-area: radius;
}

.cuisine-group {
  grid-area: cuisine;
}

/* Allow fields to use available width */
.filter-panel .filter-group {
  width: 100%;
  min-width: 0;
  flex: none;
}

/* Match Grocery field labels */
.filter-panel .filter-group > label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Match Grocery input sizes */
.filter-panel select,
.filter-panel input[type="text"] {
  min-height: 45px;
  height: 45px;

  font-size: 14px;

  border: 1px solid #999;
  border-radius: 8px;
}

/* Dietary preferences */
.diet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diet-options label {
  display: inline-flex;
  align-items: center;

  min-height: 38px;
  padding: 8px 12px;

  font-size: 13px;
}

/* Search button matches Grocery button */
.filter-panel .search-button {
  grid-area: search;

  width: 100%;
  height: 45px;
  min-height: 45px;

  font-size: 14px;
  border-radius: 8px;
}

/* ==========================================
   RESULTS AND MAP CONSISTENCY
========================================== */

.restaurant-layout {
  gap: 16px;
}

/* Sort label and dropdown on same line */
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
  margin-bottom: 15px;
}

.results-sort {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.results-sort label {
  font-size: 13px;
  white-space: nowrap;
  margin: 0;
}

.results-sort .form-select {
  width: auto;
  font-size: 13px;
}

/* Match grocery card sizing */
.restaurant-card {
  padding: 18px;

  background-color: #f1f8ef;
  border-color: #d3e8cf;
}

.restaurant-card-icon {
  width: 85px;
  height: 85px;
}

.restaurant-card-icon i {
  font-size: 35px;
}

.restaurant-card-info h3 {
  font-size: 16px;
}

/* Match Grocery map border */
#restaurant-map {
  background-color: #e9eee5;
  border: 1px solid #555;
}

/* Match Grocery modal appearance */
.restaurant-details-modal {
  border-radius: 20px;
  overflow: hidden;
}

.restaurant-details-modal .modal-header {
  padding: 18px 25px;
}

#restaurantDetailsModal #detailsContent {
  padding: 25px;
}

/* Opening hours as a gentle green section */
.restaurant-details-modal .restaurant-opening-hours {
  background-color: #f5f8f2;
  padding: 18px;
  border-radius: 12px;
}

/* Larger dietary preference buttons */

.filter-panel .dietary-group > label {
  font-size: 15px;
  font-weight: 600;
}

.filter-panel .diet-options {
  gap: 10px;
  flex-wrap: wrap;
}

.filter-panel .diet-options label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  padding: 10px 16px;

  font-size: 14px;
  font-weight: 500;

  border-radius: 8px;
}

/* ZIP Code input matches Groceries */

.filter-panel .restaurant-zip-input {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

.filter-panel .restaurant-zip-input .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 45px;
  padding: 0 13px;

  background-color: var(--bbo-white);
  color: var(--bbo-primary);

  border: 1px solid #999;
  border-right: 0;
  border-radius: 8px 0 0 8px;

  font-size: 16px;
}

.filter-panel .restaurant-zip-input input.form-control {
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;

  height: 45px;
  min-height: 45px;

  padding: 8px 12px;

  border: 1px solid #999;
  border-radius: 0 8px 8px 0;
}

/* Search button icon */
.filter-panel .search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-panel .search-button .bi-search {
  font-size: 16px;
}

/* ==========================================
   RESTAURANT DIETARY FILTER BUTTONS
========================================== */

.filter-panel .diet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Shared appearance */
.filter-panel .diet-options .dietary-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 45px;
  padding: 10px 16px;

  background-color: white;
  border: 1px solid #8da781;
  border-radius: 8px;

  color: #365b2b;
  font-family: var(--bbo-font);
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.filter-panel .dietary-option i {
  font-size: 17px;
}

/* All Restaurants */
.filter-panel .dietary-all.active {
  background-color: #365b2b;
  border-color: #365b2b;
  color: white;
}

/* Vegetarian selected */
.filter-panel .dietary-vegetarian:has(input:checked) {
  background-color: #356b35;
  border-color: #356b35;
  color: white;
}

/* Vegan selected */
.filter-panel .dietary-vegan:has(input:checked) {
  background-color: #235344;
  border-color: #235344;
  color: white;
}

/* Gluten-Free selected */
.filter-panel .dietary-gluten-free:has(input:checked) {
  background-color: #7945a6;
  border-color: #7945a6;
  color: white;
}

/* Organic selected */
.filter-panel .dietary-organic:has(input:checked) {
  background-color: #89580f;
  border-color: #89580f;
  color: white;
}

/* Hover and keyboard focus */
.filter-panel .dietary-option:hover {
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.1);
}

.filter-panel .dietary-option:focus-visible,
.filter-panel .dietary-option:focus-within {
  outline: 3px solid var(--bbo-primary, #3d622c);
  outline-offset: 3px;
}

/* Match grocery address icon */
.restaurant-modal-address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.restaurant-modal-address i {
  color: var(--bbo-primary);
  font-size: 20px;
  flex-shrink: 0;
}

/* Match grocery transportation button dimensions */
.restaurant-detail-directions {
  gap: 10px;
  margin-top: 0;
}

.restaurant-detail-directions .restaurant-direction-link {
  padding: 10px 16px;
  border: 1px solid var(--bbo-primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.restaurant-directions-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--bbo-primary);
  margin-bottom: 12px;
}

.restaurant-details-modal {
  border-radius: 20px;
}

/* Match grocery modal distance alignment */
.restaurant-details-info .restaurant-modal-distance {
  color: #666666;
  font-size: 13px;
  margin-left: 30px;
  margin-bottom: 25px;
}

/* ========================================
   RESTAURANT WEBSITE BUTTON
======================================== */

.restaurant-website-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 11px 20px;

  border-radius: 8px;

  font-size: 14px;
  font-weight: 600;
}

/* Website unavailable message */

.restaurant-details-info .restaurant-website-unavailable {
  display: flex;
  align-items: center;
  gap: 8px;

  width: 100%;
  margin: 20px 0 0;

  color: #666666;
  font-size: 13px;
}

.restaurant-website-unavailable i {
  color: var(--bbo-primary);
  font-size: 15px;
}

.restaurant-details-modal .modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--bbo-primary);
}

.restaurant-modal-image {
  height: 100px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: #e5f2df;
  color: var(--bbo-primary);

  border-radius: 14px;
  margin-bottom: 15px;
}

.restaurant-modal-image i {
  font-size: 48px;
}

.restaurant-modal-badge {
  display: inline-block;
  padding: 7px 14px;
  margin-bottom: 15px;

  background-color: #a6c8a7;
  color: var(--bbo-primary);

  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* Standardized direction buttons */

.restaurant-detail-directions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.restaurant-detail-directions .restaurant-direction-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 88px;
  height: 44px;
  padding: 0;
  gap: 6px;

  background-color: var(--bbo-primary);
  border: 1px solid var(--bbo-primary);
  color: white !important;

  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.restaurant-detail-directions .restaurant-direction-link i {
  font-size: 14px;
}

/* Restaurant card and favorite button layout */

.restaurant-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.restaurant-result-row .restaurant-card {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
}

.restaurant-result-row:has(> .favorite-button) .restaurant-card {
  padding-right: 65px;
}

.restaurant-result-row > .favorite-button {
  grid-area: 1 / 1;

  justify-self: end;
  align-self: center;
  margin-right: 15px;
  z-index: 1;
}

/* ==========================================
   RESPONSIVE SEARCH PANEL
========================================== */

/* ==========================================
   RESTAURANT HERO - MATCH GROCERY HEIGHT
========================================== */

@media (min-width: 992px) {
  .hero {
    min-height: 350px;

    /* Keep heading near the top */
    align-items: flex-start;
    padding-top: 45px;

    /* Show more of the restaurant image */
    background-position: center 70%;
  }

  .filter-panel {
    /* Pull filters over the hero background */
    margin-top: -185px;
  }
}

@media (max-width: 991.98px) {
  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    grid-template-areas:
      "diet diet"
      "zip radius"
      "cuisine search";
  }
}

@media (max-width: 575.98px) {
  .filter-panel {
    grid-template-columns: minmax(0, 1fr);

    grid-template-areas:
      "diet"
      "zip"
      "radius"
      "cuisine"
      "search";

    padding: 15px;
  }

  .restaurant-card-icon {
    width: 55px;
    height: 55px;
  }

  #restaurantDetailsModal #detailsContent {
    padding: 15px;
  }
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */

@media (max-width: 700px) {
  .hero {
    height: 115px;
    padding: 18px;
  }

  .hero-content h1 {
    font-size: 19px;
  }

  .filter-group {
    flex: 1 1 42%;
  }

  .distance-group {
    flex: 1 1 42%;
  }

  .dietary-group {
    flex: 1 1 100%;
  }

  .location-group,
  .cuisine-group {
    flex: 1 1 35%;
  }

  .location-input input {
    width: 100%;
  }

  #cuisine {
    width: 100%;
  }

  .diet-options {
    flex-wrap: wrap;
  }

  .restaurant-layout {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    gap: 20px;
    margin: 0 auto 20px;
    padding: 0;
  }

  .restaurant-grid {
    gap: 12px;
  }

  .restaurant-card img {
    height: 100px;
  }

  .details-panel {
    min-height: auto;
  }

  .detail-image {
    height: 170px;
  }

  #restaurant-map {
    height: 300px;
  }

  .restaurant-direction-link {
    padding: 7px 8px;
    font-size: 11px;
  }

  .restaurant-detail-directions {
    flex-wrap: wrap;
  }
}

@media (max-width: 380px) {
  .restaurant-grid {
    grid-template-columns: 1fr;
  }

  .diet-options {
    gap: 4px;
  }

  .diet-options label {
    background-color: var(--bbo-white);
    border: 1px solid #8da781;
    border-radius: 8px;

    padding: 9px 12px;

    font-family: var(--bbo-font);
    font-size: 12px;
    font-weight: 500;

    color: var(--bbo-primary);
    white-space: nowrap;
    cursor: pointer;
  }
}

/* ACCESSIBILITY AND HOURS DETAILS */

.accessibility-info,
.hours-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accessibility-info strong,
.hours-info strong {
  font-size: 14px;
  color: var(--bbo-text-dark);
  font-weight: 600;
}

.accessibility-info p,
.hours-info p {
  font-size: 13px;
  color: var(--bbo-text-muted);
  line-height: 1.5;
}

/* ==========================================
   DEF-059 - RESTAURANT MAP & DETAILS MODAL
========================================== */

/* Right map column */
.restaurant-map-column {
  min-width: 0;
}

/* Bootstrap restaurant modal */
.restaurant-details-modal {
  border: none;
  border-radius: 14px;
}

/* Modal heading */
.restaurant-details-modal .modal-header {
  background-color: #f7fbf5;
  border-bottom: 1px solid #d9e6d3;
  padding: 18px 24px;
}

.restaurant-details-modal .modal-title {
  color: var(--bbo-primary);
  font-weight: 700;
}

/* Modal body */
#restaurantDetailsModal #detailsContent {
  padding: 22px 24px;
}

/* Allow transportation buttons to wrap on mobile */
.restaurant-details-modal .restaurant-detail-directions {
  flex-wrap: wrap;
}

/* View full details button inside Leaflet popup */
.restaurant-popup-details {
  margin-top: 12px;
  padding: 8px 12px;

  border: 1px solid var(--bbo-primary);
  border-radius: 7px;

  background-color: white;
  color: var(--bbo-primary);

  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.restaurant-popup-details:hover {
  background-color: #edf4e9;
}

.restaurant-popup-details:focus-visible {
  outline: 3px solid var(--bbo-primary);
  outline-offset: 2px;
}
/* Restaurant card responsiveness */

@media (max-width: 1100px) {
  .restaurant-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .restaurant-grid {
    max-height: 500px;
  }

  .restaurant-card-icon {
    width: 55px;
    height: 55px;
  }

  .restaurant-card-icon i {
    font-size: 24px;
  }
}

/* Tablet and mobile layout: display map before results */

@media (max-width: 991.98px) {
  .restaurant-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  /* Display map first */

  .restaurant-map-column {
    order: -1;
  }

  /* Display restaurant results after map */

  .restaurant-column {
    order: 1;
  }

  /* Match grocery map dimensions */

  #restaurant-map {
    width: 100%;
    height: 350px;
    min-height: 350px;
    border-radius: 14px;
  }

  /* Allow results to scroll naturally */

  .restaurant-grid {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

/* Phone layout */

@media (max-width: 575.98px) {
  #restaurant-map {
    height: 320px;
    min-height: 320px;
  }

  .restaurant-grid {
    max-height: none;
    overflow-y: visible;
  }

  #restaurantDetailsModal #detailsContent {
    padding: 15px;
  }
}
