.search-results-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.search-results-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    justify-self: start;
}

.search-results-tab::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: #4CAF50;
    border-radius: 2px 2px 0 0;
}

.search-results-label {
    font-size: var(--base-font-size);
	color: var(--gi-body-font-color);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.search-results-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: var(--gi-border-radius-5);
    min-width: 1.5rem;
    text-align: center;
}

.search-results-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 0.25rem;
}

.search-results-input {
    display: flex;
    justify-content: center;
    min-width: 280px;
    max-width: 400px;
}

.search-results-input .input_flexi {
    width: 100%;
    margin: 0;
}

.search-results-input input[type="text"],
.search-results-input input[type="search"] {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.search-results-input button,
.search-results-input input[type="submit"] {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.search-results-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
}

.search-results-sort-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.sort-select {
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    min-width: 140px;
}

@media (max-width: 580px) {
    .search-results-header {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem 1rem 1rem 1rem;
    }
    
    .search-results-header::before {
        content: none;
    }
    
    .search-results-tab {
        order: 1;
        align-self: flex-start;
    }
    
    .search-results-sort {
        order: 2;
        align-self: flex-end;
        margin-top: -2.5rem;
    }
    
    .search-results-sort-label {
        display: none;
    }
    
    .search-results-input {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 0.5rem;
    }
    
    .search-results-input .input_flexi {
        width: 100%;
    }
    
    .sort-select {
        min-width: 120px;
    }
    
    .search-results-time {
        display: none;
    }
    
    .search-results-tab::after {
        bottom: -0.5rem;
    }
}

.search-results-header--single .search-results-sort {
    visibility: hidden;
}

@media (max-width: 580px) {
    .search-results-header--single .search-results-sort {
        display: none;
        margin-top: 0;
    }
    
    .search-results-header--single .search-results-input {
        margin-top: 0;
    }
}

.search-results-header--empty {
    border-bottom-color: rgba(255, 87, 87, 0.3);
}

.search-results-header--empty .search-results-tab::after {
    background: #ff5757;
}

.search-results-header--empty .search-results-count {
    color: #ff5757;
    background: rgba(255, 87, 87, 0.15);
}

.search-results-header--error {
    grid-template-columns: 1fr;
    justify-items: center;
    border-bottom: none;
    margin-bottom: 0;
}

.search-results-header--error .search-results-input {
    max-width: 500px;
    width: 100%;
}