#intelligent-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity 0.3s ease;
}

#intelligent-search-overlay.hidden {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

#intelligent-search-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 500px;
}

#intelligent-search-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all cubic-bezier(0.25,-0.25, 0.25, 1.25) 1s;
}

#intelligent-search-box:after {
    content: "Not using Generative AI. Doing our part for the planet. Learn More";
    font-size: 8px;
    color: #fff;
    font-family: inherit;
    opacity: 0;
    transform: translateY(-5px);
    transition: all cubic-bezier(0.25,-0.25, 0.25, 1.25) 0.6s;
    position: absolute;
    top: 100%;
    width: 100%;
}

#intelligent-search-box:hover, #intelligent-search-box:focus-within{
    transform: translateY(-5px);
    box-shadow: 0 0 25px 0 rgba(123, 184, 224, 0.20);
    background: radial-gradient(305.51% 155.6% at 84.33% 148.75%, rgba(162, 180, 255, 0.20) 0%, rgba(162, 211, 245, 0.00) 100%), radial-gradient(179.33% 92.92% at 3.57% 2.76%, rgba(101, 199, 184, 0.12) 0%, rgba(101, 199, 184, 0.00) 100%), rgba(255, 255, 255, 0.10);
}

#intelligent-search-box:hover:after, #intelligent-search-box:focus-within:after{
    transform: translateY(5px);
    opacity: 0.5;
}

#intelligent-search-box svg {
    /*color: #fff;*/
    flex-shrink: 0;
    transform: rotate(0deg) scale(0.9);
    transition: cubic-bezier(0.25,-0.25, 0.25, 1.25) 0.6s;
}

#intelligent-search-box:hover svg, #intelligent-search-box:focus-within svg{
    transform: rotate(-90deg) scale(1.1);
}

#intelligent-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
    width: 200px;
    transition: width cubic-bezier(0.25,-0.25, 0.25, 1.25) 0.6s;
    padding: 15px 0 15px 5px;
    margin: 0 0 0 20px;
}

#intelligent-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/*
#intelligent-search-input:focus {
    width: 350px;
}
*/

#intelligent-search-results {
    /*background: rgba(255, 255, 255, 0.95);*/
    /*backdrop-filter: blur(20px);*/
    /*-webkit-backdrop-filter: blur(20px);*/
    /*border-radius: 20px;*/
    /*padding: 20px;*/
    margin-bottom: 15px;
    /*box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);*/
    max-height: 90vh;
    overflow-y: visible;
    width: 500px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#intelligent-search-results.hidden {
    display: none;
}

#search-tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    /*padding-bottom: 15px;*/
    /*border-bottom: 1px solid rgba(0, 0, 0, 0.1);*/
}

.tag-filter {
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.tag-filter:hover {
    background: rgba(76, 175, 80, 0.2);
    transform: translateY(-2px);
}

.tag-filter .count {
    background: rgba(76, 175, 80, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
}

#search-results-list {
    display: flex;
    flex-direction: column;
}

.search-result-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    transition: all cubic-bezier(0.25,-0.25, 0.25, 1.25) 0.6s;
    cursor: pointer;
    text-decoration: none;
    color: white;
    border: 1px solid #ffffff00;
}

.search-result-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border: 1px solid #ffffff1a;
    background: #ffffff1a;
    backdrop-filter: blur(5px);
}

.result-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.result-type {
    background: #4CAF50;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.result-type.page {
    background: #2196F3;
}

.result-type.case-study {
    background: #FF9800;
}

.result-date {
    color: #999;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.result-tag {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
}

.show-all-results {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    text-decoration: none;
    display: block;
}

.show-all-results:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.no-results {
    text-align: left;
    padding-left: 20px;
    margin-bottom: 10px;
    color: #666;
}

.no-results h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.cross-link-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.cross-link-card img{
    max-height: 22px;
    width: auto;
    margin-bottom: 5px;
}

.cross-link-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cross-link-card p {
    margin: 0 0 15px 0;
    opacity: 0.95;
}

.cross-link-card a {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.cross-link-card a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.ai-chat-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ai-chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.ai-chat-button svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* Scrollbar styling */
#intelligent-search-results::-webkit-scrollbar {
    width: 8px;
}

#intelligent-search-results::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

#intelligent-search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#intelligent-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    #intelligent-search-container {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: 100%;
    }
    
    #intelligent-search-results {
        width: 100%;
    }
    
    #intelligent-search-input {
        width: 150px;
    }
    
    #intelligent-search-input:focus {
        width: calc(100vw - 140px);
    }
}