/* RestaurantBizSale Custom Styles */

* { box-sizing: border-box; }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* Page transitions */
.page { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* Card hover */
.listing-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.listing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }

/* Hero section - background is set via inline style on inner div */
.hero-bg-img {
  background-image: url('/static/hero-bg.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Hero select with icon prefix */
.hero-select-wrap {
  position: relative;
}
.hero-select-wrap .select-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #2563eb; font-size: 14px; pointer-events: none; z-index: 1;
}
.hero-select-wrap select {
  padding-left: 36px !important;
}

/* Image aspect ratio */
.img-cover { object-fit: cover; width: 100%; }

/* Badge */
.badge-sold {
  position: absolute; top: 12px; left: 12px;
  background: #1e40af; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 20px;
  text-transform: uppercase;
}

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.modal-box {
  background: #fff; border-radius: 20px;
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; padding: 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  animation: modalIn 0.25s ease;
}
.modal-box-wide { max-width: 720px; }
.modal-box-contact { max-width: 980px; }
.contact-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
}
.contact-modal-form,
.contact-modal-sidebar {
  min-width: 0;
}
.contact-sidebar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
@keyframes modalIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:none; } }

/* Form styles */
.form-input {
  width: 100%; border: 1.5px solid #e2e8f0;
  border-radius: 12px; padding: 10px 14px;
  font-size: 14px; transition: border-color 0.2s;
  background: #f8fafc; outline: none;
}
.form-input:focus { border-color: #2563eb; background: #fff; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-group { margin-bottom: 16px; }

/* Nav active */
.nav-link { transition: color 0.15s; }
.nav-link:hover, .nav-link.active { color: #1d4ed8; }

/* Toast notification */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #1e293b; color: #fff; padding: 12px 20px;
  border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
@keyframes toastIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }

/* Tab styles */
.tab-btn { transition: all 0.15s; border-bottom: 2px solid transparent; }
.tab-btn.active { color: #1d4ed8; border-bottom-color: #1d4ed8; font-weight: 700; }

/* Sidebar active */
.sidebar-item { transition: background 0.15s; cursor: pointer; }
.sidebar-item:hover { background: #eff6ff; }
.sidebar-item.active { background: #dbeafe; color: #1d4ed8; font-weight: 600; }

/* Star rating */
.stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }

/* Language selector */
.lang-btn { transition: all 0.15s; }
.lang-btn:hover { background: #eff6ff; }
.lang-btn.active { background: #1d4ed8; color: #fff; }

/* Image gallery */
.gallery-thumb { cursor: pointer; transition: opacity 0.15s; border: 2px solid transparent; }
.gallery-thumb:hover { opacity: 0.8; }
.gallery-thumb.active { border-color: #2563eb; }

/* Loading spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #e2e8f0; border-top-color: #2563eb;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Price tag */
.price-tag { color: #1e40af; font-weight: 800; font-size: 1.25rem; }

/* Responsive helpers */
@media (max-width: 768px) {
  .modal-box { padding: 20px; }
  .hide-mobile { display: none !important; }
  .contact-modal-layout { grid-template-columns: 1fr; }
}

/* Admin table */
.admin-table { width: 100%; border-collapse: collapse; }
.leads-table-wide { min-width: 920px; }
.admin-table th { background: #f1f5f9; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; padding: 10px 12px; text-align: left; color: #64748b; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.admin-table tr:hover td { background: #f8fafc; }

/* Status badge */
.status-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.status-published { background: #dcfce7; color: #166534; }
.status-sold { background: #dbeafe; color: #1e40af; }
.status-draft { background: #f1f5f9; color: #64748b; }
.status-pending_review { background: #fef9c3; color: #854d0e; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-published { background: #dcfce7; color: #166534; }
.status-hidden { background: #e5e7eb; color: #4b5563; }
.status-new { background: #fee2e2; color: #991b1b; }
.status-contacted { background: #fef9c3; color: #854d0e; }
.status-qualified { background: #dcfce7; color: #166534; }
.status-closed { background: #e0e7ff; color: #3730a3; }
.status-lead_high { background: #dcfce7; color: #166534; }
.status-lead_medium { background: #fef3c7; color: #92400e; }
.status-lead_low { background: #e0e7ff; color: #3730a3; }

.contact-row-overdue td { background: #fef2f2; }
.contact-row-overdue:hover td { background: #fee2e2 !important; }
.contact-row-today td { background: #fff7ed; }
.contact-row-today:hover td { background: #ffedd5 !important; }
.review-row-pending td { background: #fffbeb; }
.review-row-pending:hover td { background: #fef3c7 !important; }
.review-row-published td { background: #f0fdf4; }
.review-row-published:hover td { background: #dcfce7 !important; }
.review-row-hidden td { background: #f8fafc; }
.review-row-hidden:hover td { background: #e2e8f0 !important; }
.contact-followup-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.contact-followup-chip-overdue { background: #fee2e2; color: #991b1b; }
.contact-followup-chip-today { background: #ffedd5; color: #9a3412; }
.contact-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}
.contact-detail-main,
.contact-detail-side {
  min-width: 0;
}

@media (max-width: 900px) {
  .contact-detail-layout {
    grid-template-columns: 1fr;
  }
}

/* NDA highlight */
.nda-box {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  border-radius: 20px; padding: 32px;
  color: #fff;
}

/* Membership card */
.membership-card { transition: transform 0.2s, box-shadow 0.2s; }
.membership-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.12); }
.membership-card.featured { border: 2px solid #1d4ed8; }
