/* ============================================
   RESTAURANT POPUP - Simple Clean Design
   One single card, no layers, clear text
   Positioned inside map-container for fullscreen support
   ============================================ */

/* Very light backdrop - absolute within map-container */
.restaurant-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
  border-radius: inherit;
}

.restaurant-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Fullscreen support - when map-container is fullscreen */
.map-container:fullscreen .restaurant-modal-backdrop,
.map-container:-webkit-full-screen .restaurant-modal-backdrop,
.map-container:-moz-full-screen .restaurant-modal-backdrop,
.map-container:-ms-fullscreen .restaurant-modal-backdrop {
  position: absolute;
  border-radius: 0;
  z-index: 10000;
}

/* Single clean card - positioned dynamically via JS */
.restaurant-modal {
  position: absolute;
  width: 320px;
  max-width: calc(100% - 40px);
  background: #FFFEFA;
  border-radius: 16px;
  padding: 24px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  z-index: 1001;
}

/* Fullscreen modal positioning */
.map-container:fullscreen .restaurant-modal,
.map-container:-webkit-full-screen .restaurant-modal,
.map-container:-moz-full-screen .restaurant-modal,
.map-container:-ms-fullscreen .restaurant-modal {
  position: absolute;
  z-index: 10001;
}

.restaurant-modal-backdrop.active .restaurant-modal {
  opacity: 1;
  transform: scale(1);
}

/* Hide the category bar - not needed */
.modal-category-bar {
  display: none;
}

/* Close button - top right */
.restaurant-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.restaurant-modal-close:hover {
  opacity: 1;
}

.restaurant-modal-close svg {
  width: 18px;
  height: 18px;
  stroke: #333;
  stroke-width: 2;
}

/* Content area */
.restaurant-popup-content {
  padding: 0;
  background: transparent;
}

/* Category badge with icon - softer terracotta color */
.modal-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 24px;
  background: #C27B5C;
  margin-bottom: 16px;
}

.modal-category-badge .modal-emoji {
  font-size: 20px;
}

.modal-category-badge .modal-category-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

/* Category name text */
.modal-category-badge span:last-child,
.modal-category-badge {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 0.3px;
}

/* Restaurant name */
.modal-restaurant-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px 0;
  line-height: 1.3;
  padding-right: 20px;
}

/* Info section - flat, no background */
.modal-info {
  margin-bottom: 24px;
}

.modal-info p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px 0;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.modal-info p:last-child {
  margin-bottom: 0;
}

.modal-info svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* District */
.modal-district {
  font-size: 15px;
  font-weight: 500;
  color: #2D5A45;
}

.modal-district svg {
  stroke: #2D5A45;
}

/* Rating */
.modal-rating {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.modal-rating svg {
  fill: #F5A623;
}

.modal-rating .rating-value {
  color: #333;
}

.modal-rating .review-count {
  color: #777;
  font-weight: 400;
}

/* Hours */
.modal-hours {
  font-size: 14px;
  color: #555;
}

.modal-hours svg {
  stroke: #888;
}

/* Action buttons */
.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.modal-button:hover {
  transform: translateY(-2px);
}

.modal-button svg {
  width: 16px;
  height: 16px;
}

.modal-maps-btn {
  background: #2D5A45;
  color: white;
}

.modal-details-btn {
  background: #C27B5C;
  color: white;
}

/* Mobile */
@media (max-width: 480px) {
  .restaurant-modal-backdrop {
    padding-top: 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  .restaurant-modal {
    width: calc(100% - 24px);
    max-width: 340px;
    padding: 20px;
    margin: 0 auto;
  }

  .restaurant-modal-backdrop.active .restaurant-modal {
    transform: scale(1);
  }

  .modal-restaurant-name {
    font-size: 20px;
  }

  /* Mobile fullscreen - allow JS positioning */
  .map-container:fullscreen .restaurant-modal,
  .map-container:-webkit-full-screen .restaurant-modal {
    width: 300px;
    max-width: calc(100% - 40px);
  }

  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }
}
