/* ==========================================================
   🔍 DAF MARKETPLACE - PREMIUM INLINE SEARCH STYLING
   ========================================================== */

/* 1. Main Wrapper (Jo icon aur input ko pack karta hai) */
.daf-mp-inline-search-wrap {
    display: flex;
    align-items: center;
    position: relative;
    background: transparent; /* Band hone par koi background nahi dikhega */
    border-radius: 999px;
    padding: 2px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* Jab search active/open ho jaye (JS class add karega) */
.daf-mp-inline-search-wrap.is-active {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 2. Search Toggle Button (Sirf Icon) */
.daf-mp-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    transition: color 0.2s;
}

.daf-mp-search-toggle:hover {
    color: var(--daf-color-primary, #2563eb);
}

/* Icon ka perfect size */
.daf-mp-search-icon-svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}

/* 3. Search Form & Input (Jo slide ho kar khulta hai) */
.daf-mp-search-form {
    width: 0; /* Shuru mein width zero hogi (hidden) */
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    margin: 0;
}

/* Jab active ho toh 350px tak phel jaye */
.daf-mp-inline-search-wrap.is-active .daf-mp-search-form {
    width: 350px; 
    opacity: 1;
    padding: 0 10px;
}

.daf-mp-search-input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    font-size: 14px;
    color: #0f172a;
    outline: none !important;
    box-shadow: none !important;
    font-weight: 500;
}

/* 4. 🚀 AJAX LIVE RESULTS DROPDOWN (Results Box) */
.daf-live-results-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 400px; /* Dropdown thora bara rakha hai results ke liye */
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    margin-top: 12px;
    z-index: 999;
    max-height: 380px;
    overflow-y: auto;
}

/* Individual Result Item (Product Row) */
.daf-search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 12px;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.daf-search-result-item:hover {
    background: #f8fafc;
}

/* Thumbnail Styling */
.daf-search-result-thumb img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

/* Text Info Styling */
.daf-search-result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.daf-search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.daf-search-result-cat {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Price Tag */
.daf-search-result-price {
    margin-left: auto;
    font-weight: 700;
    color: #10b981;
    font-size: 13px;
}

/* Scrollbar for Results */
.daf-live-results-dropdown::-webkit-scrollbar {
    width: 5px;
}
.daf-live-results-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Empty State */
.daf-no-results {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* Placeholder Image Styling */
.daf-search-placeholder {
    width: 44px; height: 44px; background: #f1f5f9; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: #94a3b8;
}
.daf-search-placeholder svg { width: 24px; height: 24px; }

/* Category Badges */
.daf-type-badge {
    font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 800;
    background: #e2e8f0; color: #475569; margin-top: 4px; display: inline-block;
}
.type-theme { background: #dcfce7; color: #15803d; }
.type-plugin { background: #dbeafe; color: #1d4ed8; }
.type-saas { background: #fef9c3; color: #a16207; }

/* Results Header & Footer */
.daf-search-results-header {
    padding: 10px 15px; font-size: 11px; font-weight: 700; 
    text-transform: uppercase; color: #94a3b8; border-bottom: 1px solid #f1f5f9;
}
.daf-search-view-all {
    display: block; padding: 12px; text-align: center; font-size: 13px; 
    font-weight: 600; color: var(--daf-color-primary, #2563eb); background: #f8fafc;
    text-decoration: none; border-top: 1px solid #f1f5f9;
}
.daf-search-view-all:hover { background: #f1f5f9; }

/* Price Styling Fix */
.price-free { color: #f59e0b; font-weight: 800; }