/**
 * Bindura Connect Deals - Custom Styles
 */

/* Line clamp utilities (Tailwind CDN may not include these) */
.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 for mobile bottom nav / notched devices */
.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.pb-safe {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0));
}

/* Live search suggestions */
#search-suggestions .suggestion-item {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
}

#search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

#search-suggestions .suggestion-item:hover,
#search-suggestions .suggestion-item.active {
    background-color: #f9fafb;
}

#search-suggestions .suggestion-type {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: capitalize;
}

/* Track click loading state */
.track-click.loading,
.save-business.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Rating stars in review form */
.rating-star.active {
    color: #fbbf24;
}

/* Scrollbar hide for horizontal carousels */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Mobile bottom navigation */
.mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
}

/* Product image carousel */
.product-image-carousel {
    position: relative;
}

.product-image-carousel .carousel-slide {
    transition: opacity 0.5s ease;
}

.product-image-carousel .carousel-dot {
    transition: opacity 0.3s ease;
}

#mobile-menu-drawer.open {
    transform: translateX(0);
}

#mobile-menu-overlay.open {
    display: block;
}

/* Mobile listing grids: 2 per row */
@media (max-width: 640px) {
    .product-card .p-4 {
        padding: 0.625rem;
    }
    .product-card .text-lg {
        font-size: 0.95rem;
    }
    .product-card .text-sm {
        font-size: 0.7rem;
    }
    .product-card .h-48 {
        height: 7.5rem;
    }
}

.mobile-bottom-nav a {
    min-width: 0;
}

@media (max-width: 768px) {
    body.has-mobile-nav {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
    }

    body.has-mobile-nav .fixed.bottom-20 {
        bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
    }
}

/* Dashboard sidebar transition */
#sidebar.open {
    transform: translateX(0);
}

/* Chart container */
.chart-container {
    position: relative;
    height: 200px;
}

.chart-bar {
    transition: height 0.3s ease;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Near me button pulse */
.near-me-btn.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
