/* ==========================================================================
   DateMeet - Restaurant CSS
   Restaurant list, detail, booking form
   ========================================================================== */

/* --------------------------------------------------------------------------
   Restaurant Page Layout
   -------------------------------------------------------------------------- */
.restaurant-page {
  background: var(--bg);
  min-height: 100vh;
}

.restaurant-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Restaurant Card (List View)
   -------------------------------------------------------------------------- */
.restaurant-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.restaurant-card:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-sm);
}

.restaurant-cover-wrap {
  position: relative;
  overflow: hidden;
}

.restaurant-cover {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.restaurant-card:active .restaurant-cover {
  transform: scale(1.02);
}

.restaurant-cover-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.restaurant-cover-badge.badge-hot {
  background: #ff6348;
}

.restaurant-cover-badge.badge-new {
  background: #2ed573;
}

.restaurant-cover-badge.badge-recommend {
  background: #ffa502;
  color: #fff;
}

.restaurant-cover-rating {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffd700;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* --------------------------------------------------------------------------
   Restaurant Info (Card Body)
   -------------------------------------------------------------------------- */
.restaurant-info {
  padding: 12px 14px 16px;
}

.restaurant-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.restaurant-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.restaurant-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-medium);
  background: var(--bg);
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}

.restaurant-tag.tag-cuisine {
  background: rgba(255, 71, 87, 0.08);
  color: var(--primary);
}

.restaurant-tag.tag-style {
  background: rgba(30, 144, 255, 0.08);
  color: #1e90ff;
}

/* Meta info row (address, phone, hours) */
.restaurant-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.restaurant-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-medium);
  line-height: 1.4;
}

.restaurant-meta-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--text-light);
}

.restaurant-meta-text {
  flex: 1;
  word-break: break-all;
}

.restaurant-meta-text a {
  color: #1e90ff;
  text-decoration: none;
}

/* Price range */
.restaurant-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.restaurant-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.restaurant-price-label {
  font-size: 12px;
  color: var(--text-light);
  margin-left: 2px;
}

/* Card action area */
.restaurant-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

.restaurant-book-btn {
  flex: 1;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.restaurant-book-btn:active {
  background: var(--primary-dark);
  transform: scale(0.97);
}

.restaurant-favorite-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text-light);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.restaurant-favorite-btn.saved {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 71, 87, 0.06);
}

/* --------------------------------------------------------------------------
   Restaurant Detail Page
   -------------------------------------------------------------------------- */
.restaurant-detail-page {
  background: var(--bg);
  min-height: 100vh;
}

/* Cover image at top */
.restaurant-detail-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

/* Photo gallery strip */
.restaurant-gallery {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.restaurant-gallery::-webkit-scrollbar {
  display: none;
}

.restaurant-gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Detail body */
.restaurant-detail-body {
  padding: 16px 14px;
  background: #fff;
  margin-bottom: 12px;
}

.restaurant-detail-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.restaurant-detail-rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.restaurant-stars {
  display: flex;
  gap: 2px;
  color: #ffd700;
  font-size: 16px;
}

.restaurant-rating-score {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.restaurant-rating-count {
  font-size: 13px;
  color: var(--text-light);
}

.restaurant-detail-desc {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 14px;
}

/* Detail info block */
.restaurant-detail-info {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin: 0 12px 12px;
  box-shadow: var(--shadow-sm);
}

.restaurant-detail-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.restaurant-detail-info-row:last-child {
  border-bottom: none;
}

.restaurant-detail-info-icon {
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
  width: 20px;
  text-align: center;
}

.restaurant-detail-info-content {
  flex: 1;
}

.restaurant-detail-info-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 2px;
}

.restaurant-detail-info-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.restaurant-detail-info-value a {
  color: #1e90ff;
}

/* --------------------------------------------------------------------------
   Booking Form
   -------------------------------------------------------------------------- */
.booking-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  margin: 0 12px 16px;
  box-shadow: var(--shadow-md);
}

.booking-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.booking-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.booking-time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.time-slot {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.time-slot.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 71, 87, 0.06);
  font-weight: 600;
}

.time-slot.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.guest-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.guest-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.guest-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guest-counter-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.guest-counter-btn:active {
  background: var(--bg);
}

.guest-counter-btn.btn-inc {
  border-color: var(--primary);
  color: var(--primary);
}

.guest-count {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  min-width: 24px;
  text-align: center;
}

.booking-submit-btn {
  width: 100%;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.booking-submit-btn:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.booking-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Booking success state */
.booking-success-card {
  text-align: center;
  padding: 32px 20px;
}

.booking-success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.booking-success-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.booking-success-desc {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.6;
}
