#search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#search-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #f9fbfc 0%, #ffffff 100%);
    width: 80%;
    max-width: 650px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    animation: slideIn 0.3s ease-in-out;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        top: 45%;
        opacity: 0;
    }

    to {
        top: 50%;
        opacity: 1;
    }
}

#search-modal .search-box {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #32325d;
}

#search-modal .search-box:focus {
    border-color: #6772e5;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
}

#search-modal .close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #8898aa;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#search-modal .close-button:hover {
    color: #32325d;
    background-color: #f0f4f8;
}

#search-results {
    margin-top: 25px;
    max-height: 350px;
    overflow-y: auto;
    border-top: 2px solid #f0f4f8;
    padding-top: 20px;
}

#search-results::-webkit-scrollbar {
    width: 8px;
}

#search-results::-webkit-scrollbar-thumb {
    background-color: #d1dce8;
    border-radius: 4px;
}

#search-results .result-item {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

#search-results .result-item:hover {
    background-color: #f6f9fc;
    transform: translateX(5px);
}

#search-results .result-title {
    font-weight: 600;
    color: #32325d;
    font-size: 16px;
    margin-bottom: 6px;
}

#search-results .result-excerpt {
    color: #6b7c93;
    font-size: 14px;
    line-height: 1.5;
}

#search-results .result-item:empty {
    text-align: center;
    padding: 40px 0;
    color: #8898aa;
}

/* Sidebar Sticky States */
.sidebar-is-fixed {
    position: fixed !important;
    z-index: 10 !important;
    top: 80px !important; /* Corresponds to top-20 in Tailwind */
}

.sidebar-is-at-bottom {
    position: absolute !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
}
