/* 
* CampusUdaan - Search Modal Stylesheet
* Styling for the college search functionality
*/

/* Search icon in navigation */
.search-icon-container {
    margin-left: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style the search icon container */
.search-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(76, 175, 145, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Position the icon perfectly centered */
.search-icon i {
    font-size: 16px;
    color: #4CAF91;
    transition: all 0.3s ease;
}

/* Hover effects */
.search-icon:hover {
    background-color: #4CAF91;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 145, 0.3);
}

.search-icon:hover i {
    color: white;
}

/* Mobile search icon */
.mobile-search-icon {
    display: none;
    margin-right: 15px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    background-color: rgba(76, 175, 145, 0.15);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-search-icon i {
    font-size: 16px;
    color: #4CAF91;
    transition: all 0.3s ease;
}

.mobile-search-icon:hover {
    background-color: #4CAF91;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 145, 0.3);
}

.mobile-search-icon:hover i {
    color: white;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 90%;
    max-width: 700px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(-50px);
    transition: all 0.4s ease;
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--medium-gray);
}

.search-modal-header h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.5rem;
}

.search-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--dark-gray);
    transition: all 0.3s ease;
}

.search-close:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.search-modal-body {
    padding: 25px;
}

.search-input-container {
    position: relative;
    margin-bottom: 15px;
}

.search-icon-input {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-gray);
    font-size: 18px;
}

#collegeSearch {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid var(--medium-gray);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

#collegeSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 145, 0.2);
}

.search-note {
    font-size: 0.9rem;
    color: #555555;
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: rgba(76, 175, 145, 0.1);
    border-left: 3px solid #4CAF91;
    border-radius: 4px;
}

.search-note i {
    color: #4CAF91;
    margin-right: 5px;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 0;
}

.search-result-item {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.search-result-item:hover {
    background-color: rgba(76, 175, 145, 0.1);
}

.search-result-item.active {
    background-color: rgba(76, 175, 145, 0.15);
}

.college-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.college-info {
    flex-grow: 1;
}

.college-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 3px;
}

.college-location {
    font-size: 0.85rem;
    color: var(--body-text-color);
}

.no-results {
    text-align: center;
    padding: 20px;
    color: var(--body-text-color);
}

.highlight {
    background-color: rgba(255, 127, 80, 0.2);
    padding: 0 2px;
    border-radius: 3px;
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 10px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* Responsive styles */
@media (max-width: 768px) {
    /* Hide desktop search icon in mobile view */
    .search-icon-container {
        display: none;
    }
    
    /* Show mobile search icon */
    .mobile-search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-modal {
        padding-top: 70px;
    }
    
    .search-modal-content {
        width: 95%;
    }
    
    .search-modal-header h3 {
        font-size: 1.3rem;
    }
    
    .search-modal-header, .search-modal-body {
        padding: 15px 20px;
    }
    
    #collegeSearch {
        padding: 12px 12px 12px 45px;
        font-size: 15px;
    }
    
    .search-results {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .search-modal {
        padding-top: 50px;
    }
    
    .search-modal-header h3 {
        font-size: 1.2rem;
    }
    
    .college-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .college-name {
        font-size: 15px;
    }
    
    .college-location {
        font-size: 12px;
    }
}
