/* ========================================
   SEARCH ICON TRANSFORMATION STYLES
   ======================================== */
/* Mobile Icons Container - Search + Hamburger + Login */
.d-lg-none.d-flex.align-items-center {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align icons to the right */
    gap: 0.5rem; /* space between icons */
    flex-wrap: wrap; /* prevent items from disappearing on small screens */
}

/* Login button for guests */
.d-lg-none a.btn {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-left: 0.3rem; /* small space from search icon */
}
/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center; /* center content inside container */
    margin-left: 0; /* removed fixed 5cm */
    transition: all 0.3s ease;
    min-width: 40px;
}

/* Search Icon (Default State) */
.search-icon {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Search Input Wrapper (Expanded State) */
.search-input-wrapper {
    position: fixed;
    left: 50%;
    top: 80px;
    transform: translateX(-50%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 90%;
    max-width: 500px;
    z-index: 1060;
}

.search-input-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* Search Input Group */
.search-input-group {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    padding: 6px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
}

/* Search Input Field */
.search-input-group input {
    border: none;
    outline: none;
    padding: 10px 15px;
    flex: 1;
    background: transparent;
    font-size: 1rem;
    color: #333;
}

.search-input-group input::placeholder {
    color: #999;
}

/* Close Button */
.search-input-group .search-close-btn {
    background: transparent;
    color: #6c757d;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.search-input-group .search-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #dc3545;
}

.search-input-group .search-close-btn i {
    font-size: 1.1rem;
}

/* Submit Button */
.search-input-group .search-submit-btn {
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.search-input-group .search-submit-btn:hover {
    background: #0b5ed7;
    transform: scale(1.05);
}

.search-input-group .search-submit-btn i {
    font-size: 1rem;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1055;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.search-suggestions .list-group {
    margin: 0;
    border-radius: 15px;
}

.search-suggestions .list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 12px 20px;
}

.search-suggestions .list-group-item:hover {
    background: #f8f9fa;
}

.search-suggestions .list-group-item:last-child {
    border-bottom: none;
    border-radius: 0 0 15px 15px;
}

.search-suggestions .list-group-item:first-child {
    border-radius: 15px 15px 0 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .search-input-wrapper {
        top: 70px;
        width: 92%;
        max-width: 450px;
    }
    
    .search-input-group input {
        font-size: 0.95rem;
        padding: 8px 12px;
    }
    
    .search-input-group .search-close-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
    
    .search-input-group .search-submit-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
}

/* Mobile Phones (576px and below) */
@media (max-width: 576px) {
    .search-input-wrapper {
        top: 65px;
        width: 95%;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .search-input-group {
        padding: 4px 8px;
        border-radius: 25px;
    }
    
    .search-input-group input {
        font-size: 0.9rem;
        padding: 8px 10px;
    }
    
    .search-input-group .search-close-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .search-input-group .search-close-btn i {
        font-size: 1rem;
    }
    
    .search-input-group .search-submit-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .search-input-group .search-submit-btn i {
        font-size: 0.9rem;
    }
    
    .search-suggestions {
        max-height: 250px;
    }
    
    .search-suggestions .list-group-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Small Mobile (400px and below) */
@media (max-width: 400px) {
    .search-input-wrapper {
        top: 60px;
    }
    
    .search-input-group input {
        font-size: 0.85rem;
        padding: 6px 8px;
    }
    
    .search-input-group .search-close-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
    
    .search-input-group .search-submit-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
}