/* Shared styles for Things.in that can't be easily replicated with Tailwind */

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hide scrollbar utility */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Background gradient for pages */
.bg-gradient-page {
  background: linear-gradient(160deg, #FFFDF7 0%, #ffffff 50%, #FFF9F0 100%);
}

/* Decorative background blurs */
.bg-decoration {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.bg-decoration-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, #FFF3C4 0%, #FFE066 100%);
  top: -200px;
  right: -100px;
}

.bg-decoration-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #E0F7F5 0%, #B8F0EC 100%);
  bottom: 20%;
  left: -100px;
}

.bg-decoration-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #EDE9FF 0%, #D4CCFF 100%);
  top: 50%;
  right: 10%;
}

/* Highlight text with accent background */
.highlight-text {
  position: relative;
  display: inline-block;
}

.highlight-text::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: -4px;
  right: -4px;
  height: 14px;
  background: #FFCF00;
  z-index: -1;
  border-radius: 4px;
  opacity: 0.7;
}

/* Search input prefix divider */
.search-prefix::after {
  content: '';
  width: 1px;
  height: 24px;
  background: #e2e8f0;
  margin-left: 12px;
}

/* Animation delays */
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* Google Places Autocomplete styling */
.pac-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  margin-top: 8px;
  padding: 8px;
  font-family: 'DM Sans', sans-serif;
}

.pac-item {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.pac-item:hover {
  background: #f1f5f9;
}

.pac-item-query {
  font-weight: 600;
  color: #2D2A4A;
}

.pac-logo:after {
  margin: 12px 16px;
}

/* Star rating colors */
.star-rating {
  color: #FFCF00;
  display: inline-flex;
  align-items: center;
}

.star-rating .far,
.star-rating .fas,
.star-rating .fa-star-half-alt {
  font-size: 0.875rem;
  padding: 0 1px;
}

/* City link bullet */
.city-link::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #4ECDC4;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.view-all-link::before {
  background: #9B8FE4;
}

/* Category switcher */
.category-switcher {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  gap: 8px;
}

.category-switcher::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Category button loading state */
.category-button.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.category-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1rem;
  height: 1rem;
  border: 2px solid #FFCF00;
  border-radius: 50%;
  border-top: 2px solid #2D2A4A;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Header scroll effect */
.header-scroll {
  transition: all 0.3s;
}

.header-scroll.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.header-scroll.scrolled img {
  height: 1.75rem;
}

.header-scroll.scrolled h1 {
  font-size: 1.25rem;
}

/* Adjust layout when header is fixed */
@media (min-width: 768px) {
  body.header-fixed main {
    padding-top: 4rem;
  }

  body.header-fixed .sticky-map {
    top: 4rem;
    height: calc(100vh - 5rem);
  }
}

/* Award badge positioning */
.award {
  top: -15px;
  right: -15px;
}

/* Mapbox popup close button */
button.mapboxgl-popup-close-button {
  right: 5px;
  top: 5px;
  width: 15px;
  font-size: 1.4rem;
}

/* Location input styling */
#locationDisplay {
  display: inline-block;
  padding: 0 4px;
  border-bottom: 2px dashed #2d2a4a;
  cursor: pointer;
  transition: border-color 0.2s;
}

#locationDisplay:hover {
  border-color: #2D2A4A;
}

#locationInput {
  display: none;
  width: auto;
  min-width: 200px;
  padding: 0 4px;
  background-color: transparent;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  border-bottom: 2px solid #FFCF00;
}

#locationInput:focus {
  outline: none;
}

/* Place title external link indicator */
.place-title {
  position: relative;
  display: inline-block;
  color: #2D2A4A;
}

.place:hover .place-title::after {
  content: '\f35d';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: -1.2em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7em;
  color: #4ECDC4;
}

/* Guide content styling */
.guide-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2D2A4A;
}

.guide-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #2D2A4A;
}

.guide-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #6B6889;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  .header-scroll {
    position: static;
  }

  .mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    padding: 8px 16px;
    gap: 8px;
  }

  .mobile-tab-button {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #6B6889;
    border-radius: 10px;
    background: transparent;
    transition: all 0.2s;
  }

  .mobile-tab-button.active {
    color: #2D2A4A;
    background: #FFF8D6;
  }

  #map-container {
    display: none;
  }

  #list-container,
  #map-container {
    margin-bottom: 80px;
  }

  #map-container {
    height: calc(100vh - 180px);
    height: calc(100dvh - 180px);
  }

  #map {
    height: 100%;
  }

  footer {
    margin-bottom: 80px;
  }

  .category-button {
    flex: 0 0 auto;
  }

  #placesList {
    display: none;
  }

  #placesListMobile {
    display: block;
  }
}

/* Desktop-specific styles */
@media (min-width: 768px) {
  .sticky-map {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 2rem);
    height: calc(100dvh - 2rem);
  }

  #map {
    height: 100%;
  }

  #placesList {
    display: block;
  }

  #placesListMobile {
    display: none;
  }

  #shareButton .share-text {
    display: inline;
    margin-left: 0.5rem;
  }
}

/* Map styling */
#map {
  width: 100%;
  height: 100%;
}

/* ========================================
   Creative Rank Badges - Medal Style
   ======================================== */

.rank-badge {
  width: 44px;
  height: 54px;
  z-index: 10;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
}

.rank-badge-mobile {
  width: 32px;
  height: 40px;
}

/* Ribbon behind the medal */
.badge-ribbon {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 24px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
}

.rank-badge-mobile .badge-ribbon {
  width: 16px;
  height: 18px;
}

/* Medal circle */
.badge-medal {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

.rank-badge-mobile .badge-medal {
  width: 28px;
  height: 28px;
}

/* Inner circle of medal */
.badge-inner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rank-badge-mobile .badge-inner {
  width: 20px;
  height: 20px;
  border-width: 1px;
}

/* Number styling */
.badge-number {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

.rank-badge-mobile .badge-number {
  font-size: 0.75rem;
}

/* Crown for #1 */
.badge-crown {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 13px;
  color: #FFD700;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.rank-badge-mobile .badge-crown {
  width: 14px;
  height: 9px;
  top: -5px;
}

/* === GOLD - Rank 1 === */
.rank-1 .badge-ribbon {
  background: linear-gradient(180deg, #CD853F 0%, #8B4513 100%);
}

.rank-1 .badge-medal {
  background: linear-gradient(145deg, #FFE55C 0%, #FFD700 30%, #FFA500 70%, #FF8C00 100%);
}

.rank-1 .badge-inner {
  background: linear-gradient(145deg, #FFD700 0%, #FFC125 50%, #FF8C00 100%);
}

.rank-1 .badge-number {
  color: #7A4E00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* === SILVER - Rank 2 === */
.rank-2 .badge-ribbon {
  background: linear-gradient(180deg, #708090 0%, #4A5568 100%);
}

.rank-2 .badge-medal {
  background: linear-gradient(145deg, #F8F8FF 0%, #E8E8E8 30%, #C0C0C0 70%, #A8A8A8 100%);
}

.rank-2 .badge-inner {
  background: linear-gradient(145deg, #E8E8E8 0%, #D3D3D3 50%, #B8B8B8 100%);
}

.rank-2 .badge-number {
  color: #4A5568;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* === BRONZE - Rank 3 === */
.rank-3 .badge-ribbon {
  background: linear-gradient(180deg, #8B4513 0%, #5D3A1A 100%);
}

.rank-3 .badge-medal {
  background: linear-gradient(145deg, #E8A060 0%, #CD7F32 30%, #B87333 70%, #A0522D 100%);
}

.rank-3 .badge-inner {
  background: linear-gradient(145deg, #D4956B 0%, #CD7F32 50%, #B8733F 100%);
}

.rank-3 .badge-number {
  color: #4A2C17;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}


