/* Legal / CMS content */
.legal-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.legal-content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul, .legal-content ol { margin-bottom: 1rem; }
.legal-content a { color: #059669; text-decoration: underline; }
.legal-content a:hover { color: #047857; }
.legal-content table { margin: 1rem 0; }
.legal-content td, .legal-content th { vertical-align: top; }


.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.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; }

.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); }

body { padding-bottom: 64px; }
@media (min-width: 1024px) { body { padding-bottom: 0; } }

/* Badges */
.badge { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.625rem; border-radius: 9999px; }
.badge-basic { background: #e5e7eb; color: #374151; }
.badge-verified { background: #d1fae5; color: #065f46; }
.badge-zta { background: #006400; color: white; }
.badge-premium { background: linear-gradient(135deg, #FFD700, #FFA500); color: #1a1a2e; }

/* Hero */
.hero-gradient { background: linear-gradient(135deg, rgba(0,100,0,0.85) 0%, rgba(26,26,46,0.75) 100%); }

/* Cards */
.listing-card:hover { transform: translateY(-2px); }

/* Search bar */
.search-bar { backdrop-filter: blur(12px); background: rgba(255,255,255,0.95); }

/* Map */
#map, .map-container { height: 400px; border-radius: 1rem; z-index: 1; }
#map-full { height: calc(100vh - 200px); min-height: 400px; }

.leaflet-popup-content { margin: 12px; }
.leaflet-popup-content h3 { font-weight: 600; margin-bottom: 4px; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Flash messages */
.flash-msg { animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Category cards */
.category-card { transition: all 0.3s ease; }
.category-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,100,0,0.15); }

/* Province cards */
.province-card { position: relative; overflow: hidden; }
.province-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #006400; border-radius: 3px; }

/* Gallery */
.gallery-thumb { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; }
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; }

/* Compare bar */
.compare-bar { position: fixed; bottom: 80px; left: 0; right: 0; z-index: 35; }
@media (min-width: 1024px) { .compare-bar { bottom: 0; } }

/* Dashboard sidebar */
.dashboard-sidebar a.active { background: #ecfdf5; color: #059669; border-right: 3px solid #059669; }

/* Calendar */
.calendar-day { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; }
.calendar-day:hover { background: #ecfdf5; }
.calendar-day.selected { background: #059669; color: white; }
.calendar-day.blocked { color: #d1d5db; cursor: not-allowed; }
.calendar-day.in-range { background: #d1fae5; }

/* Rating stars */
.star-rating { color: #fbbf24; }

/* Print */
@media print { .mobile-bottom-nav, header, footer, .no-print { display: none !important; } body { padding: 0; } }

/* Swipeable cards on mobile */
@media (max-width: 640px) {
    .scroll-snap-x { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .scroll-snap-x > * { scroll-snap-align: start; }
}

/* Filter panel */
.filter-panel { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.filter-panel.open { max-height: 2000px; }

/* Sticky booking widget */
.booking-widget { position: sticky; top: 100px; }

/* Amenity checkboxes (provider add listing) */
.amenity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}
.amenity-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}
.amenity-grid label:has(input:checked) {
    border-color: #059669;
    background: #ecfdf5;
}

/* Image carousel (4s auto-rotate) */
.image-carousel { overflow: hidden; position: relative; }
.image-carousel-track { position: relative; width: 100%; height: 100%; }
.image-carousel-slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}
.image-carousel-slide.active { opacity: 1; pointer-events: auto; z-index: 1; }
.image-carousel-dots {
    position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
    display: flex; gap: 0.5rem; z-index: 10;
}
.image-carousel-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.5); border: none; cursor: pointer;
    padding: 0; transition: background 0.2s, transform 0.2s;
}
.image-carousel-dot.active { background: #fff; transform: scale(1.2); }

.listing-gallery-carousel { height: 300px; }
@media (min-width: 768px) { .listing-gallery-carousel { height: 450px; } }

/* Image gallery lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 100; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; }
