/* Search Rotator Styles */
.search-container {
    position: relative;
    cursor: text;
}

.search-container .search-input {
    cursor: text;
    position: relative;
    z-index: 20;
    background: transparent;
}

.search-form {
    position: relative;
    cursor: text;
}

.search-rotator-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 170px;
    right: 50px;
    display: flex;
    align-items: center;
    pointer-events: auto;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    background: transparent;
    overflow: hidden;
}

.search-rotator-overlay:hover {
    background: rgba(230, 0, 35, 0.03);
}

.search-rotator-overlay::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 60px;
    color: #ccc;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.search-rotator-overlay:hover::after {
    opacity: 1;
    color: #E60023;
}

.search-rotator-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.search-rotator-overlay.inactive {
    opacity: 0;
    pointer-events: none;
}

.search-rotator-text {
    font-size: 14px;
    color: #666;
    padding-left: 10px;
    padding-right: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.search-rotator-overlay:hover .search-rotator-text {
    color: #E60023;
}

.search-rotator-overlay.active .search-rotator-text {
    transform: translateY(0);
    opacity: 1;
}

.search-rotator-text .rotator-type {
    font-weight: 600;
}

.search-rotator-text .rotator-type.category {
    color: #1976d2;
}

.search-rotator-text .rotator-type.product {
    color: #c2185b;
}

/* When rotator is active, make input text transparent so rotator shows */
.search-input.with-rotator {
    color: #333 !important;
}

.search-input.with-rotator::placeholder {
    color: transparent !important;
}

/* Keep input text visible when user is typing */
.search-input {
    color: #333 !important;
}

.search-input::placeholder {
    color: #999 !important;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 350px;
    overflow-y: auto;
    z-index: 100000;
    display: none;
}

.search-dropdown.show {
    display: block;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.search-dropdown-item:hover {
    background: #f5f5f5;
}

.search-dropdown-item .item-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 12px;
}

.search-dropdown-item .item-icon.category {
    background: #e3f2fd;
    color: #1976d2;
}

.search-dropdown-item .item-icon.subcategory {
    background: #e8f5e9;
    color: #388e3c;
}

.search-dropdown-item .item-icon.product {
    background: #fce4ec;
    color: #c2185b;
}

.search-dropdown-item .item-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.search-dropdown-item .item-type-label {
    font-size: 10px;
    color: #999;
    margin-right: 8px;
    text-transform: uppercase;
    font-weight: 500;
}

.search-dropdown-item .item-text mark {
    background: #fff3cd;
    padding: 0 2px;
}

.search-dropdown-empty {
    padding: 20px;
    text-align: center;
    color: #999;
}

/* Plans page search styles */
.plans-search .search-rotator-overlay {
    left: 42px;
    right: 70px;
}

.plans-search .search-rotator-overlay:hover {
    background: rgba(59, 130, 246, 0.03);
}

.plans-search .search-rotator-overlay:hover .search-rotator-text {
    color: #3B82F6;
}

/* Become Seller page search styles */
.bs-search .search-rotator-overlay {
    left: 42px;
    right: 70px;
}

.bs-search .search-rotator-overlay:hover {
    background: rgba(239, 68, 68, 0.03);
}

.bs-search .search-rotator-overlay:hover .search-rotator-text {
    color: #EF4444;
}

@media (max-width: 768px) {
    .search-rotator-overlay {
        left: 14px !important;
        right: 50px !important;
    }
    
    .plans-search .search-rotator-overlay,
    .bs-search .search-rotator-overlay {
        left: 14px !important;
        right: 50px !important;
    }
    
    /* Mobile search without category dropdown */
    .bs-mobile-search .search-rotator-overlay {
        left: 14px !important;
        right: 50px !important;
    }
    
    /* Mobile dropdown adjustments */
    .search-dropdown {
        border-radius: 0 0 12px 12px;
        max-height: 280px;
    }
    
    .search-dropdown-item {
        padding: 10px 14px;
    }
    
    .search-dropdown-item .item-icon {
        width: 26px;
        height: 26px;
        margin-right: 10px;
        font-size: 11px;
    }
}
