/* Modern Search Bar Styles - Dashboard */
.modern-search-bar {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    gap: 0;
    max-width: 100%;
    margin-bottom: 20px;
}

/* Force spacing between elements */
.search-input-container {
    margin-right: 20px !important;
}

.items-per-page {
    margin-right: 20px !important;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}

.all-services-btn {
    background: #8B6F4A;
    color: white;
    border-radius: 8px 0 0 8px;
    border: none;
    margin-right: 0;
}

.all-services-btn:hover {
    background: #7A5E3F;
    transform: translateY(-1px);
}

.all-services-btn:active {
    transform: translateY(0);
}

.search-input-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #E5E5E5;
    border-radius: 0 8px 8px 0;
    border-left: none;
    font-size: 14px;
    color: #333;
    background: white;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    border-color: #8B6F4A;
    box-shadow: 0 0 0 2px rgba(139, 111, 74, 0.1);
}

.search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.6;
}

.items-per-page {
    position: relative;
    min-width: 80px;
}

.items-select {
    width: 100%;
    padding: 12px 30px 12px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    background: #F8F8F8;
    font-size: 14px;
    color: #333;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.items-select:hover {
    background: #F0F0F0;
    border-color: #D0D0D0;
}

.items-select:focus {
    border-color: #8B6F4A;
    background: white;
}

.dropdown-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.6;
}

.filters-btn {
    background: #8B6F4A;
    color: white;
    border-radius: 8px;
    border: none;
}

.filters-btn:hover {
    background: #7A5E3F;
    transform: translateY(-1px);
}

.filters-btn:active {
    transform: translateY(0);
}

/* All Services Dropdown Styles */
.all-services-dropdown {
    position: relative;
    display: inline-block;
}

.all-services-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 8px 0 0 0;
    z-index: 1000;
    list-style: none;
}

.all-services-menu .dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #8B6F4A;
    font-size: 14px;
}

.all-services-menu .dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.all-services-menu .dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.all-services-menu .dropdown-item:hover {
    background-color: #F8F8F8;
    color: #7A5E3F;
}

.all-services-menu .dropdown-item:active {
    background-color: #F0F0F0;
}

/* Animation for search bar */
.modern-search-bar {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-search-bar {
        flex-direction: column;
        gap: 12px;
        padding: 0;
    }
    
    .all-services-btn {
        border-radius: 8px;
        width: 100%;
        justify-content: center;
        padding: 14px 16px;
        margin-right: 0;
    }
    
    .search-input-container {
        width: 100%;
        min-width: unset;
    }
    
    .search-input {
        border-radius: 8px;
        border-left: 1px solid #E5E5E5;
        padding: 14px 16px 14px 40px;
        margin-right: 0;
    }
    
    .items-per-page {
        width: 100%;
        min-width: unset;
    }
    
    .items-select {
        border-radius: 8px;
        padding: 14px 30px 14px 16px;
        margin-right: 0;
    }
    
    .filters-btn {
        border-radius: 8px;
        width: 100%;
        justify-content: center;
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .search-btn {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .search-input {
        padding: 12px 14px 12px 36px;
        font-size: 13px;
    }
    
    .items-select {
        padding: 12px 28px 12px 14px;
        font-size: 13px;
    }
    
    .modern-search-bar {
        padding: 10px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modern-search-bar {
        background: #2d2d2d;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .search-input {
        background: #3d3d3d;
        border-color: #555;
        color: #fff;
    }
    
    .search-input::placeholder {
        color: #aaa;
    }
    
    .items-select {
        background: #3d3d3d;
        border-color: #555;
        color: #fff;
    }
    
    .items-select:hover {
        background: #4d4d4d;
        border-color: #666;
    }
}

/* Filters Dropdown Styles */
.filters-btn {
    position: relative;
}

.filters-btn .fa-filter {
    margin-left: 8px;
}

.filters-btn .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    margin: 8px 0 0 0;
    z-index: 1000;
    list-style: none;
}

.filters-btn .dropdown-menu li {
    border-bottom: 1px solid #F0F0F0;
}

.filters-btn .dropdown-menu li:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.filters-btn .dropdown-menu li:first-child {
    border-radius: 8px 8px 0 0;
}

.filters-btn .dropdown-menu li a {
    display: block;
    padding: 12px 16px;
    color: #8B6F4A;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.filters-btn .dropdown-menu li a:hover {
    background-color: #F8F8F8;
    color: #7A5E3F;
}

/* Mobile responsive for filters dropdown */
@media (max-width: 768px) {
    .filters-btn .dropdown-menu {
        right: 0;
        left: auto;
        min-width: 180px;
    }
}
