/* =============================================================================
   CSL Business Profile Styles
   Converted from PublicProfile.tsx inline React styles to CSS classes
   Semantic class naming with bp- prefix (business profile)
   ============================================================================= */

/* Container */
.bp-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 88px 24px 32px;
  font-family: 'Open Sans', sans-serif;
  color: #2E2E2E;
}

/* ===== HEADER ===== */
.bp-header {
  margin-bottom: 32px;
}

.bp-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #2E2E2E;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.bp-verified {
  margin-left: 10px;
  vertical-align: middle;
}

/* Categories */
.bp-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.bp-category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background-color: #FBF3DC;
  color: #777777;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Open Sans', sans-serif;
}

/* Rating row */
.bp-rating-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bp-stars-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bp-stars {
  display: flex;
  align-items: center;
}

.bp-star {
  font-size: 22px;
  margin-right: 2px;
  line-height: 1;
}

.bp-star-filled { color: #D4A017; }
.bp-star-empty { color: #F0ECE3; }

.bp-rating-value {
  font-weight: 700;
  font-size: 16px;
  font-family: 'Montserrat', sans-serif;
}

.bp-review-count {
  font-size: 14px;
  color: #A0A0A0;
}

/* Storefront Score badge */
.bp-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 12px;
}

.bp-score-badge.bp-score-high { background-color: #C6F6D5; }
.bp-score-badge.bp-score-mid { background-color: #FEFCBF; }
.bp-score-badge.bp-score-low { background-color: #FED7D7; }

.bp-score-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.bp-score-high .bp-score-number { color: #38A169; }
.bp-score-mid .bp-score-number { color: #D69E2E; }
.bp-score-low .bp-score-number { color: #E53E3E; }

.bp-score-label {
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
  line-height: 1.2;
}

.bp-score-high .bp-score-label { color: #38A169; }
.bp-score-mid .bp-score-label { color: #D69E2E; }
.bp-score-low .bp-score-label { color: #E53E3E; }

/* Contact info */
.bp-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555555;
}

.bp-contact-row svg { flex-shrink: 0; }

.bp-link {
  color: #D4A017;
  text-decoration: none;
}

.bp-link:hover {
  text-decoration: underline;
}

/* Share bar */
.bp-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.bp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #F0ECE3;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Open Sans', sans-serif;
  color: #A0A0A0;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.bp-share-btn:hover {
  color: #D4A017;
  border-color: #D4A017;
}

/* ===== ACTION BUTTONS ===== */
.bp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.bp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding: 12px 18px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  min-height: 44px;
  transition: opacity 0.2s;
}

.bp-action-btn:active { opacity: 0.85; }

.bp-action-primary {
  background: linear-gradient(135deg, #D4A017, #E8C860);
  color: #fff;
}

.bp-action-secondary {
  background: #fff;
  color: #2E2E2E;
  border: 1.5px solid #E8E2D5;
}

/* ===== SECTIONS ===== */
.bp-section {
  margin-bottom: 32px;
}

.bp-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #2E2E2E;
  margin: 0 0 16px 0;
}

.bp-description {
  font-size: 15px;
  line-height: 1.7;
  color: #555555;
  margin: 0;
}

.bp-empty {
  font-size: 14px;
  color: #A0A0A0;
}

/* ===== MAP ===== */
.bp-map-container {
  margin-bottom: 32px;
}

/* Leaflet tiles are <img>; counter the global `img { max-width:100% }` (global.css)
   which otherwise squishes/hides map tiles. */
.leaflet-container img,
.leaflet-container .leaflet-tile,
#bp-map img {
  max-width: none !important;
  max-height: none !important;
}

/* Keep the map below the fixed nav (z-index:100). Leaflet's control containers
   default to z-index:1000 and would otherwise overlap the nav on scroll; making
   the map its own stacking context at z-index:0 caps all its panes/controls
   beneath the nav without disturbing Leaflet's internal layering. */
#bp-map {
  position: relative;
  z-index: 0;
}

.bp-map-placeholder {
  width: 100%;
  height: 200px;
  background-color: #E4F3FB;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #B5DFF5;
  text-align: center;
}

.bp-map-label {
  font-size: 13px;
  color: #87CEEB;
  margin: 8px 0 0;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
}

/* ===== PHOTOS ===== */
.bp-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.bp-photo-placeholders {
  grid-template-columns: repeat(3, 1fr);
}

.bp-photo-item {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background-color: #F0ECE3;
}

.bp-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bp-photo-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 10px;
  background-color: #F0ECE3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== HOURS ===== */
.bp-hours-card {
  background: #FFFFFF;
  border: 1px solid #F0ECE3;
  border-radius: 12px;
  overflow: hidden;
}

.bp-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
}

.bp-hours-table tr {
  border-bottom: 1px solid #F0ECE3;
}

.bp-hours-table tr:last-child {
  border-bottom: none;
}

.bp-hours-today {
  background-color: #FBF3DC;
}

.bp-hours-day {
  padding: 10px 16px;
  font-weight: 500;
  color: #2E2E2E;
  width: 120px;
}

.bp-hours-today .bp-hours-day {
  font-weight: 700;
  color: #D4A017;
}

.bp-today-badge {
  font-size: 10px;
  margin-left: 6px;
  color: #D4A017;
  font-weight: 600;
}

.bp-hours-value {
  padding: 10px 16px;
  color: #555555;
  text-align: right;
}

.bp-hours-closed {
  color: #A0A0A0;
}

/* ===== REVIEWS ===== */
.bp-reviews {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bp-review-card {
  background: #FFFFFF;
  border: 1px solid #F0ECE3;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.bp-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bp-sentiment-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bp-sentiment-positive { background-color: #38A169; }
.bp-sentiment-neutral { background-color: #D69E2E; }
.bp-sentiment-negative { background-color: #E53E3E; }

.bp-review-stars {
  display: flex;
  align-items: center;
}

.bp-review-star {
  font-size: 16px;
  margin-right: 1px;
  line-height: 1;
}

.bp-review-author {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #2E2E2E;
}

.bp-review-date {
  font-size: 13px;
  color: #A0A0A0;
  margin-left: auto;
}

.bp-review-text {
  font-size: 14px;
  line-height: 1.6;
  color: #555555;
  margin: 0;
}

/* Owner response */
.bp-owner-response {
  margin-top: 14px;
  margin-left: 8px;
  border-left: 3px solid #E8C860;
  background: #FFFCF5;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
}

.bp-response-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: #2E2E2E;
  display: block;
  margin-bottom: 6px;
}

.bp-response-text {
  font-size: 13px;
  line-height: 1.6;
  color: #777777;
  margin: 0;
}

.bp-responded-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #E6F6EE;
  color: #38A169;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 10px;
}

/* ===== AD ZONES ===== */
.bp-ad-zone {
  margin-bottom: 12px;
}

.bp-ad-cityprint {
  background: #FFFCF5;
  border: 1px solid #F0ECE3;
  border-radius: 12px;
  padding: 20px 24px;
  text-align: center;
}

.bp-ad-label {
  font-size: 10px;
  color: #A0A0A0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
}

.bp-ad-headline {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #2E2E2E;
  margin: 0 0 6px 0;
}

.bp-ad-body {
  font-size: 13px;
  color: #777777;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.bp-ad-cta {
  display: inline-block;
  background: #D4A017;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.bp-ad-cta:hover {
  background: #C4920F;
}

/* ===== CLAIM CTA ===== */
.bp-claim-banner {
  margin-bottom: 32px;
}

.bp-claim-inner {
  background: linear-gradient(135deg, #FFFCF5 0%, #FBF3DC 100%);
  border: 2px solid #E8C860;
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
}

.bp-claim-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #2E2E2E;
  margin: 0 0 8px 0;
}

.bp-claim-body {
  font-size: 14px;
  color: #777777;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.bp-claim-btn {
  display: inline-block;
  background: #D4A017;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.bp-claim-btn:hover {
  background: #C4920F;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .bp-container {
    padding: 80px 16px 24px;
  }

  .bp-name {
    font-size: 26px;
  }

  .bp-rating-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Action buttons — full width on mobile for easy tapping */
  .bp-actions {
    gap: 8px;
  }

  .bp-action-btn {
    padding: 14px 18px;
    font-size: 14px;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 48px;
  }

  /* Share buttons — bigger touch targets */
  .bp-share-bar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .bp-share-btn {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 44px;
  }

  /* Review cards — tighter padding on narrow screens */
  .bp-review-card {
    padding: 16px;
  }

  .bp-review-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .bp-review-date {
    margin-left: 0;
    width: 100%;
  }

  /* Hours table — prevent overflow */
  .bp-hours-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .bp-hours-day {
    width: auto;
    min-width: 90px;
  }

  /* Photos */
  .bp-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bp-photo-placeholders {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Claim CTA — fit on narrow screens */
  .bp-claim-inner {
    padding: 22px 18px;
  }

  .bp-claim-title {
    font-size: 18px;
  }

  /* Ad zone */
  .bp-ad-cityprint {
    padding: 16px;
  }

  .bp-ad-cta {
    padding: 12px 24px;
    min-height: 44px;
    font-size: 14px;
  }
}
