/* Home Page Styles for Alvasya */

/* ===== Mobile Responsive Search Form ===== */
/* Main search row: responsive flex layout */
#main-search-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Input field - full width on mobile */
#main-search-row .form-control {
    width: 100%;
    min-width: 0;
}

/* Button container - stack on mobile, side-by-side on desktop */
#main-search-row .d-flex {
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    #main-search-row .d-flex {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    #main-search-row .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    #main-search-row .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Services form mobile stack */
@media (max-width: 575px) {
    .row.g-3 {
        gap: 0.75rem !important;
    }
    
    .row.g-3 > [class*="col-"] {
        width: 100% !important;
        flex-basis: 100% !important;
    }
    
    #services-inputs .col-md-3,
    #services-inputs .col-md-2,
    #services-inputs .col-md-4,
    #bookings-inputs .col-md-4,
    #bookings-inputs .col-md-3,
    #bookings-inputs .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Bookings buttons responsive */
#bookings-inputs .d-flex.gap-2 {
    flex-wrap: wrap;
    gap: 0.75rem !important;
}

#bookings-inputs .btn {
    flex: 1 1 auto;
    min-width: 120px;
}

@media (max-width: 575px) {
    #bookings-inputs .btn {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Loading Cart Animations */
@keyframes bounceCart {
    0%, 100% { transform: translateY(0) }
    50% { transform: translateY(-20px) }
}
@keyframes pushCart {
    0% { transform: translateX(-30px); opacity: 0 }
    20% { opacity: 1 }
    80% { opacity: 1 }
    100% { transform: translateX(30px); opacity: 0 }
}
.cart-wrapper { display: inline-block; animation: pushCart 2s linear infinite }
.loading-cart { font-size: 3rem; color: #0d6efd; animation: bounceCart .5s cubic-bezier(.8, 0, 1, 1) infinite alternate }

@keyframes userPulse {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 14px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}
.user-location-dot {
    width: 14px; height: 14px; background: #198754; border: 2px solid #fff;
    border-radius: 50%; box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); animation: userPulse 1.8s infinite;
}

/* Doctors Card Animation */
@keyframes docFadeIn { 
    to { opacity: 1; transform: translateY(0); } 
} 
.doc-card { 
    animation-name: docFadeIn !important; 
}
/* API Cards Section */
.api-cards-container {
    gap: 1rem;
}
.api-source-card {
    min-width: 180px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid #0d6efd;
    background: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.api-source-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.18);
}

/* Deals Carousel */
#deals-carousel .carousel-item {
    transition: transform 0.6s ease-in-out;
}
#deals-carousel .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#deals-carousel .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.deal-card {
    border-radius: 0.5rem;
}

.slickdeals-wrapper {
    position: relative;
}

.slickdeals-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.slickdeals-slider::-webkit-scrollbar {
    height: 8px;
}

.slickdeals-slider::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.5);
    border-radius: 999px;
}

.deal-slide {
    min-width: calc((100% / 4) - 0.75rem);
    max-width: calc((100% / 4) - 0.75rem);
    box-sizing: border-box;
}

.deal-card {
    cursor: pointer;
}

.deal-card img {
    height: 160px;
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

@media (max-width: 992px) {
    .deal-slide {
        min-width: calc((100% / 2) - 0.75rem);
        max-width: calc((100% / 2) - 0.75rem);
    }
}

@media (max-width: 768px) {
    .deal-slide {
        min-width: 100%;
        max-width: 100%;
    }
}

/* old carousel fallback style removed */

/* API Cards Section */
.api-cards-container {
    gap: .5rem;
    justify-content: center;
    margin-bottom: 0;
}
.api-cards-container .rounded-pill {
    min-width: 130px;
    border: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

/* Remove HR under search in each tab */
#main-search-form hr { display: none; }
