/* ─── Restaurant Browser v1 ────────────────────────────────── */

/* Inline restaurant link (rendered by _includes/restaurant-link.html).
   Shows a subtle dotted underline so readers see it's tappable without
   it looking like a generic outbound link. */
.hg-restaurant-link {
  color: inherit;
  border-bottom: 1px dotted #1866B4;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.hg-restaurant-link:hover,
.hg-restaurant-link:focus {
  color: #1866B4;
  border-bottom-color: currentColor;
  border-bottom-style: solid;
  text-decoration: none;
}

/* Container */
.rb-wrap { margin: 20px 0 30px; }
.rb-header { text-align: center; margin-bottom: 20px; }
.rb-header h2 { font-size: 26px; margin-bottom: 6px; }
.rb-header p { font-size: 16px; color: #666; margin: 0; }
.rb-count { font-size: 14px; color: #888; margin-bottom: 12px; }

/* Filters bar */
.rb-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.rb-search { flex: 1 1 220px; min-width: 180px; padding: 9px 12px 9px 34px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.868-3.834zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 10px center no-repeat; outline: none; }
.rb-search:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.rb-select {
  width: auto;
  max-width: 100%;
  height: auto;
  min-width: 150px;
  min-height: 42px;
  margin: 0;
  padding: 9px 44px 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #374151;
  background-color: #fff;
  background-image:
    linear-gradient(#e5e7eb, #e5e7eb),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10' fill='none'%3E%3Cpath d='M2 2l6 6 6-6' stroke='%234b5563' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:
    right 38px center,
    right 13px center;
  background-repeat: no-repeat;
  background-size:
    1px 24px,
    16px 10px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}
.rb-select::-ms-expand { display: none; }
.rb-select#rb-cuisine { min-width: 190px; }
.rb-select#rb-region { min-width: 180px; }
.rb-select:hover {
  border-color: #9ca3af;
  background-color: #f9fafb;
}
.rb-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
  outline: none;
}
.rb-sort-wrap { margin-left: auto; }
@media (max-width: 640px) {
  .rb-search,
  .rb-select,
  .rb-sort-wrap {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* Grid */
.rb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .rb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 550px) { .rb-grid { grid-template-columns: 1fr; } }

/* Card */
.rb-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; position: relative; }
.rb-card-has-photo { padding-top: 0; overflow: hidden; }
.rb-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.rb-card-photo { position: relative; height: 200px; margin: 0 -16px; overflow: hidden; border-radius: 10px 10px 0 0; background: #f3f4f6; }
.rb-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px 10px 0 0; }
.rb-card-photo-attr { position: absolute; bottom: 6px; right: 8px; font-size: 10px; line-height: 1.4; color: #fff; background: rgba(0,0,0,0.55); padding: 2px 7px; border-radius: 4px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.rb-card-has-photo .rb-card-top { padding-top: 12px; }
.rb-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.rb-card-name { font-size: 17px; font-weight: 700; color: #1a1a1a; margin: 0; line-height: 1.3; }
.rb-card-price { font-size: 14px; font-weight: 600; color: #059669; white-space: nowrap; margin-left: 8px; }
.rb-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rb-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #f3f4f6; color: #374151; }
.rb-badge-cuisine { background: #ede9fe; color: #5b21b6; }
.rb-badge-region { background: #e0f2fe; color: #0369a1; }
.rb-badge-closed { background: #fee2e2; color: #991b1b; }
.rb-card-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #666; }
.rb-stars { color: #f59e0b; font-size: 14px; letter-spacing: -1px; }
.rb-card-add { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; transition: all 0.15s; margin-top: 8px; }
.rb-card-add:hover { background: #f9fafb; border-color: #9ca3af; }
.rb-card-add.is-saved { background: #ecfdf5; border-color: #059669; color: #059669; }

/* Empty / loading */
.rb-empty { text-align: center; padding: 40px 20px; color: #666; }
.rb-empty i { font-size: 36px; display: block; margin-bottom: 10px; color: #ccc; }
.rb-loading { text-align: center; padding: 40px; color: #999; }
.rb-load-more { display: block; margin: 20px auto; padding: 10px 28px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 15px; font-weight: 600; color: #374151; cursor: pointer; }
.rb-load-more:hover { background: #f3f4f6; }

/* ─── Modal ────────────────────────────────────────────────── */
/* z-index = 32-bit int max to stack above Raptive's sticky footer ad
   (same value used by my-trip-drawer, talkstory modal, concierge modal). */
.rb-modal-bg { display: none; position: fixed; inset: 0; z-index: 2147483647; background: rgba(0,0,0,0.55); align-items: center; justify-content: center; padding: 16px; }
.rb-modal-bg.is-open { display: flex; }
.rb-modal { background: #fff; border-radius: 14px; max-width: 620px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: rbSlideIn 0.25s ease-out; position: relative; }
@keyframes rbSlideIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.rb-modal-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: none; background: rgba(0,0,0,0.06); border-radius: 50%; font-size: 20px; line-height: 32px; text-align: center; cursor: pointer; color: #555; z-index: 2; }
.rb-modal-close:hover { background: rgba(0,0,0,0.12); }
.rb-modal-header { padding: 20px 20px 0; }
.rb-modal-name { font-size: 22px; font-weight: 700; margin: 0 0 4px; padding-right: 36px; }
.rb-modal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rb-modal-photo { position: relative; width: 100%; height: 240px; overflow: hidden; background: #f3f4f6; }
.rb-modal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rb-modal-photo-attr { position: absolute; bottom: 6px; right: 8px; font-size: 11px; color: #fff; background: rgba(0,0,0,0.5); padding: 2px 7px; border-radius: 4px; }
@media (max-width: 550px) { .rb-modal-photo { height: 180px; } }
/* Go fully edge-to-edge on anything tablet-portrait or smaller so the
   page's ad slots and sticky promos get hidden while the reader is
   inside the modal. Breakpoint is 767px (the common mobile/tablet
   boundary) rather than 550px — at 600-700px widths the centered card
   still felt small and page content peeked around it. Forced height
   (dynamic viewport with a vh fallback) plus zero backdrop padding so
   the card fills every pixel. Border-radius and scale-in animation
   both drop since they read oddly on a full-bleed sheet. */
@media (max-width: 767px) {
  .rb-modal-bg { padding: 0; }
  .rb-modal {
    max-width: none;
    width: 100vw;
    height: 100vh; max-height: 100vh;
    height: 100dvh; max-height: 100dvh;
    border-radius: 0;
    animation: none;
  }
}
.rb-modal-body { padding: 0 20px 20px; }

/* Modal detail rows */
.rb-detail { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 15px; color: #374151; }
.rb-detail:last-child { border-bottom: none; }
.rb-detail i { color: #9ca3af; width: 18px; text-align: center; margin-top: 2px; }
.rb-detail a { color: #2563eb; text-decoration: none; }
.rb-detail a:hover { text-decoration: underline; }

/* Hours grid */
.rb-hours-grid { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; font-size: 14px; }
.rb-hours-day { font-weight: 600; color: #555; }
.rb-hours-time { color: #374151; }
.rb-hours-today { color: #059669; font-weight: 600; }

/* Notable dishes */
.rb-dishes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rb-dish { background: #fef3c7; color: #92400e; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 500; }

/* Modal map */
.rb-map-wrap { height: 220px; border-radius: 10px; overflow: hidden; margin: 14px 0; background: #f3f4f6; }

/* Modal actions */
.rb-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid #e5e7eb; }
.rb-modal-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid #d1d5db; background: #fff; color: #374151; transition: all 0.15s; }
.rb-modal-btn:hover { background: #f3f4f6; }
.rb-modal-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.rb-modal-btn-primary:hover { background: #1d4ed8; }
.rb-modal-btn-primary.is-saved { background: #059669; border-color: #059669; }

/* Rating stars */
.rb-modal-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.rb-modal-stars { color: #f59e0b; font-size: 18px; letter-spacing: -1px; }
.rb-modal-rating-num { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.rb-modal-rating-count { font-size: 14px; color: #666; }

/* Island color accents on cards — applied to photo container when present */
.rb-card[data-island="oahu"] { border-top: 3px solid #F27A24; }
.rb-card[data-island="maui"] { border-top: 3px solid #1866B4; }
.rb-card[data-island="big-island"] { border-top: 3px solid #c3232f; }
.rb-card[data-island="kauai"] { border-top: 3px solid #1D9771; }

/* Distance on card */
.rb-card-distance { font-size: 13px; color: #059669; margin-top: 4px; }
.rb-card-distance i { margin-right: 3px; }

/* Distance in modal */
.rb-detail-distance { background: #ecfdf5; border-radius: 8px; padding: 10px 12px !important; border-bottom: none !important; color: #059669; font-size: 15px; }

/* Directions button */
.rb-directions-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; margin: 10px 0 14px; border-radius: 10px; background: #2563eb; color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; text-align: center; transition: background 0.15s; }
.rb-directions-btn:hover { background: #1d4ed8; color: #fff; text-decoration: none; }
.rb-directions-btn i { font-size: 16px; }

/* Print */
@media print { .rb-wrap, .rb-modal-bg { display: none !important; } }

/* Accessibility */
.rb-card:focus-visible, .rb-modal-btn:focus-visible, .rb-card-add:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Google attribution */
.rb-google-attr { font-size: 12px; color: #999; text-align: right; padding: 8px 4px; }
.rb-google-attr a { color: #999; text-decoration: underline; }
.rb-google-attr a:hover { color: #666; }

/* ─── Island chips (cross-island /hawaii-eats view only) ─────────── */

/* Friendlier alternative to scrolling the full all-island region dropdown.
   Picking a chip both narrows the result set AND re-scopes the region
   dropdown to that island's regions, so the cascade stays manageable. */
.rb-island-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  justify-content: center;
}
.rb-island-chip {
  --rb-island-color: #6b7280;
  padding: 8px 16px;
  border: 2px solid var(--rb-island-color);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--rb-island-color);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.rb-island-chip:hover { background: var(--rb-island-color); color: #fff; }
.rb-island-chip[aria-pressed="true"] {
  background: var(--rb-island-color);
  color: #fff;
}
.rb-island-chip:focus-visible {
  outline: 2px solid var(--rb-island-color);
  outline-offset: 2px;
}
.rb-island-chip[data-island-key=""] { /* "All Islands" — neutral grey */
  --rb-island-color: #374151;
}

/* ─── Feature chips + Access & parking (Google Places Atmosphere) ── */

/* Feature chip row — compact toggle row below the select filters. */
.rb-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.rb-chip {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rb-chip:hover { background: #f9fafb; border-color: #9ca3af; }
.rb-chip.is-active {
  background: #1866B4;
  border-color: #1866B4;
  color: #fff;
}
.rb-chip:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

/* Modal editorial summary + "From Google" attribution */
.rb-detail-summary { align-items: flex-start; }
.rb-summary { margin: 0 0 4px; font-size: 15px; line-height: 1.5; color: #1f2937; font-style: italic; }
.rb-summary-attr {
  display: inline-block;
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
  margin-top: 4px;
}

/* Modal feature badges (both Features and Access & parking sections) */
.rb-feature-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.rb-feature-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.rb-feature-badge.is-no {
  background: #f9fafb;
  color: #9ca3af;
  border-color: #e5e7eb;
}

/* CTA box enhancement — "View Details" button on food guide pages.
   Both buttons use float:right inside .cta-box, so View Details (added
   second) renders to the LEFT of Navigate Here. margin-right on the
   View Details button creates the gap between the two white buttons. */
.rb-cta-details { margin-left: 8px; }
.cta-box .rb-cta-details .btn { margin-right: 10px; }
@media only screen and (max-width: 769px) {
  /* On mobile the cta-box switches to centered stacking; margin-right
     would bias the centered button off-axis. Restore symmetric spacing. */
  .cta-box .rb-cta-details .btn { margin-right: 0; }
}
