/* Feature Modules */

/* Searchable Select Module */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.searchable-input:focus {
    outline: none;
    border-color: #ED6A00;
    box-shadow: 0 0 0 2px rgba(237, 106, 0, 0.1);
    cursor: text;
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.searchable-select.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.searchable-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.searchable-dropdown.show {
    display: block;
}

.dropdown-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

.dropdown-option.highlighted {
    background-color: #e3f2fd;
    color: #1976d2;
}

.dropdown-option.selected {
    background-color: #ED6A00;
    color: white;
    font-weight: 600;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option.no-results {
    padding: 10px 12px;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* Autocomplete Module (Legacy) */
.autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ff6b35;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.autocomplete-item:hover,
.autocomplete-item-selected {
    background-color: #fff3e0;
    color: #ff6b35;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ED6A00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter Status Indicators */
.filter-active::after {
    content: "●";
    color: #ED6A00;
    margin-left: 5px;
    font-size: 0.8rem;
}

.search-active {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

/* Performance Optimizations */
.members-grid {
    will-change: transform;
}

.member-card {
    will-change: transform;
    contain: layout style paint;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Mobile Module Adjustments */
@media (max-width: 768px) {
    .searchable-dropdown {
        max-height: 200px;
        font-size: 0.85rem;
    }

    .dropdown-option {
        padding: 12px;
    }

    .searchable-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .loading-spinner {
        width: 30px;
        height: 30px;
        border-width: 3px;
    }
} 