/**
 * Team Search Autocomplete Styles
 */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    margin-top: 2px;
}

.autocomplete-results.show {
    display: block !important;
}

body[data-theme="dark"] .autocomplete-results {
    background-color: #2d2d2d;
    border-color: #444;
}

.team-search-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
    color: #212529;
}

body[data-theme="dark"] .team-search-item {
    border-bottom-color: #3d3d3d;
    color: #e9ecef;
}

.team-search-item:last-child {
    border-bottom: none;
}

.team-search-item:hover,
.team-search-item.selected {
    background-color: #f8f9fa;
}

body[data-theme="dark"] .team-search-item:hover,
body[data-theme="dark"] .team-search-item.selected {
    background-color: #3d3d3d;
}

.team-search-item.no-results,
.team-search-item.error {
    cursor: default;
    color: #6c757d;
    text-align: center;
}

.team-search-item.error {
    color: #dc3545;
}

body[data-theme="dark"] .team-search-item.no-results {
    color: #adb5bd;
}

body[data-theme="dark"] .team-search-item.error {
    color: #ff6b6b;
}

.team-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 2px;
}

body[data-theme="dark"] .team-name {
    color: #e9ecef;
}

.team-info {
    font-size: 12px;
    color: #6c757d;
}

body[data-theme="dark"] .team-info {
    color: #adb5bd;
}

/* Position the input container relatively for absolute positioning of results */
.form-group,
.col-md-5 {
    position: relative;
}

/* Admin panel search result styles */
.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
    color: #212529;
}

body[data-theme="dark"] .search-result-item {
    color: #e9ecef;
    border-bottom-color: #3d3d3d;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

body[data-theme="dark"] .search-result-item:hover {
    background-color: #3d3d3d;
}

.search-result-item:last-child {
    border-bottom: none;
}
