/* Sonipat Home Service - Master Site & Admin Mobile Stylesheet */

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --accent-orange: #f97316;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Master Primary Buttons */
.btn-primary, .btn-book-service {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25) !important;
    transition: all 0.25s ease !important;
}

.btn-primary:hover, .btn-book-service:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.35) !important;
}

/* Sticky Booking Card Viewport Bounding */
.sticky-booking-card {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 85px !important;
    max-height: calc(100vh - 170px) !important;
    overflow-y: auto !important;
    z-index: 1010 !important;
    margin-bottom: 90px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.sticky-booking-card::-webkit-scrollbar {
    width: 6px;
}
.sticky-booking-card::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 10px;
}

/* High-Contrast Checkout Payment Cards */
.checkout-payment-card {
    background-color: #f0f7ff !important;
    border: 2px solid #0d6efd !important;
    border-radius: 14px !important;
    padding: 16px !important;
    color: #1e293b !important;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.1) !important;
}

.checkout-payment-card small {
    color: #475569 !important;
}

/* Service Card Hover Styling */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Category Grid Pill Cards */
.category-grid-card {
    background: #ffffff;
    color: #334155;
    border-radius: 20px;
    padding: 10px 6px;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 95px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    white-space: normal !important;
    text-align: center !important;
    word-break: break-word !important;
}

.category-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.cat-title-text {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 6px;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
}

/* Service Variant Selection Cards */
.variant-select-card {
    border-width: 2px !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    min-height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 6px !important;
    white-space: normal !important;
    word-break: break-word !important;
}

.variant-select-card strong {
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.25 !important;
    font-size: 0.82rem !important;
    text-align: center !important;
    margin-bottom: 4px !important;
}

/* Hero Slider Images */
.hero-slide-img {
    height: 420px;
    object-fit: cover;
    border-radius: 12px;
}

/* Food Delivery Module Mobile Optimization */
.food-hero-banner {
    background: linear-gradient(135deg, #e63946 0%, #1e293b 100%);
    border-radius: 20px;
}

.food-card-img {
    height: 190px;
    object-fit: cover;
}

.food-restaurant-card {
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Admin Mobile Responsiveness Fixes */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.custom-admin-scroll-menu {
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
}

.custom-admin-scroll-menu::-webkit-scrollbar {
    height: 4px;
}
.custom-admin-scroll-menu::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

/* Mobile Devices (Max-width 768px) CSS Overrides */
@media (max-width: 768px) {
    /* Food Hero Banner Compact Typography */
    .food-hero-banner {
        padding: 20px 15px !important;
        border-radius: 16px !important;
        margin-bottom: 20px !important;
    }

    .food-hero-banner h1 {
        font-size: 1.35rem !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
    }

    .food-hero-banner p.lead {
        font-size: 0.85rem !important;
        margin-bottom: 12px !important;
        line-height: 1.35 !important;
    }

    .food-hero-banner .badge {
        font-size: 0.72rem !important;
        padding: 4px 10px !important;
        margin-bottom: 8px !important;
    }

    .food-hero-banner .input-group input {
        font-size: 0.82rem !important;
        padding-left: 12px !important;
    }

    .food-hero-banner .input-group button {
        font-size: 0.82rem !important;
        padding: 6px 14px !important;
    }

    /* Food Restaurant Cards Compact Layout */
    .food-card-img {
        height: 140px !important;
    }

    .food-restaurant-card {
        border-radius: 14px !important;
    }

    .food-restaurant-card .card-body {
        padding: 14px !important;
    }

    .food-restaurant-card h5.card-title {
        font-size: 1.05rem !important;
        margin-bottom: 2px !important;
    }

    .food-restaurant-card small {
        font-size: 0.78rem !important;
    }

    .food-restaurant-card .btn {
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
    }

    .variant-select-card {
        padding: 8px 4px !important;
        min-height: 80px;
    }
    .variant-select-card strong {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }

    .category-grid-card {
        padding: 8px 4px !important;
        min-height: 85px !important;
        border-radius: 16px !important;
    }
    .cat-title-text {
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
    }

    .hero-slide-img {
        height: auto !important;
        max-height: 220px;
        object-fit: cover !important;
        border-radius: 8px;
    }
    
    .table-responsive table {
        font-size: 0.85rem !important;
    }

    .card {
        padding: 14px !important;
        border-radius: 14px !important;
    }

    .sticky-booking-card {
        max-height: none !important;
        position: static !important;
        margin-bottom: 20px !important;
    }

    h2, .fs-2 { font-size: 1.35rem !important; }
    h3, .fs-3 { font-size: 1.2rem !important; }
    h4, .fs-4 { font-size: 1.05rem !important; }
    h5, .fs-5 { font-size: 0.95rem !important; }
}

/* Mobile Navbar Dropdown Styling */
.navbar-toggler {
    border: 2px solid var(--primary-color) !important;
    padding: 6px 10px;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: #ffffff;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        margin-top: 10px;
    }
}

/* Sonipat Home Service - AI Assistant Floating Bot Styles */
.ai-assistant-floating-btn {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 998;
    background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-assistant-floating-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.55);
    color: #ffffff !important;
}

.ai-pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: aiPulse 1.8s infinite;
}

@keyframes aiPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.ai-chat-drawer {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 30px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(226, 232, 240, 0.9);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-chat-header {
    background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 100%);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-msg-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
}

.ai-msg-bot {
    background: #ffffff;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.ai-msg-user {
    background: #0d6efd;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-quick-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.ai-chip-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0d6efd;
    border-radius: 50px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-chip-btn:hover {
    background: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
}

.ai-action-btn-bubble {
    display: inline-block;
    margin-top: 8px;
    background: #f59e0b;
    color: #1e293b !important;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 50px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.ai-action-btn-bubble:hover {
    background: #d97706;
    color: #ffffff !important;
}

.ai-chat-footer {
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #ffffff;
    border-radius: 12px;
    width: fit-content;
    border: 1px solid #e2e8f0;
}

.ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 576px) {
    .ai-assistant-floating-btn {
        bottom: 80px;
        right: 14px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .ai-chat-drawer {
        bottom: 75px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 480px;
    }
}

/* WhatsApp Floating Action Button */
.whatsapp-floating-btn {
    position: fixed;
    bottom: 85px; /* मोबाइल बॉटम बार से ऊपर */
    right: 20px;
    background-color: #25d366;
    color: #ffffff !important;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.whatsapp-floating-btn:hover {
    transform: scale(1.1);
    background-color: #1eb956;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Tooltip Badge */
.whatsapp-floating-btn .wa-tooltip {
    position: absolute;
    right: 70px;
    background: #1e293b;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.whatsapp-floating-btn:hover .wa-tooltip {
    opacity: 1;
}

@media (max-width: 768px) {
    .whatsapp-floating-btn {
        bottom: 75px;
        right: 15px;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
}