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

/* 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 { padding: 9px 30px 9px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; background: #fff; appearance: auto; cursor: pointer; min-width: 120px; }
.rb-select:focus { border-color: #2563eb; }
.rb-sort-wrap { margin-left: auto; }

/* 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:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.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 ────────────────────────────────────────────────── */
.rb-modal-bg { display: none; position: fixed; inset: 0; z-index: 999999; 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-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 */
.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; }
