/* Small table helper */
.docs-section .table td code,
.docs-section .table th code {
    white-space: nowrap;
}

.docs-section details summary {
    cursor: pointer;
    padding: .4rem 0;
}

.docs-section .accordion-button {
    font-size: .95rem;
}

.docs-section .accordion {
    border-radius: .5rem;
    overflow: hidden;
}

/* ── SEARCH OVERLAY ─────────────────────────────────────────── */
#clot-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 5vh 1rem 1rem;
    animation: fadeInOverlay .15s ease;
}

#clot-search-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#clot-search-panel {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
    overflow: hidden;
    animation: slideDownPanel .18s cubic-bezier(.22, .68, 0, 1.2);
}

@keyframes slideDownPanel {
    from {
        transform: translateY(-16px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

#clot-search-input-wrap {
    display: flex;
    align-items: center;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid #e8edf3;
    gap: .6rem;
}

#clot-search-input-wrap .search-icon {
    color: #7b8fa6;
    font-size: 1rem;
    flex-shrink: 0;
}

#clot-search-main-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.05rem;
    font-family: inherit;
    color: #1a2332;
    background: transparent;
}

#clot-search-main-input::placeholder {
    color: #a0aec0;
}

#clot-search-kbd {
    font-size: .7rem;
    color: #8898a8;
    background: #f0f4f8;
    border: 1px solid #d4dce6;
    border-radius: 5px;
    padding: .15rem .45rem;
    font-family: monospace;
    flex-shrink: 0;
}

#clot-search-results {
    max-height: 60vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

#clot-search-results::-webkit-scrollbar {
    width: 5px;
}

#clot-search-results::-webkit-scrollbar-track {
    background: transparent;
}

#clot-search-results::-webkit-scrollbar-thumb {
    background: #c5d0dc;
    border-radius: 99px;
}

.clot-search-empty,
.clot-search-hint {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #8898a8;
    font-size: .92rem;
}

.clot-search-hint i {
    font-size: 2rem;
    margin-bottom: .6rem;
    display: block;
    opacity: .4;
}

.clot-search-section-label {
    padding: .55rem 1.2rem .25rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9aacbb;
    background: #f7fafc;
    border-bottom: 1px solid #edf2f7;
}

.clot-result-item {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .85rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f4f8;
    text-decoration: none;
    color: inherit;
    transition: background .1s;
}

.clot-result-item:hover,
.clot-result-item.focused {
    background: #eef4ff;
    text-decoration: none;
    color: inherit;
}

.clot-result-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4a6fa5;
    font-size: .8rem;
    margin-top: .1rem;
}

.clot-result-item.focused .clot-result-icon {
    background: #4a6fa5;
    color: #fff;
}

.clot-result-body {
    flex: 1;
    min-width: 0;
}

.clot-result-title {
    font-size: .92rem;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clot-result-breadcrumb {
    font-size: .72rem;
    color: #7b8fa6;
    margin-bottom: .25rem;
    font-weight: 500;
}

.clot-result-excerpt {
    font-size: .8rem;
    color: #5a6a7a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clot-result-arrow {
    color: #c8d5e3;
    font-size: .85rem;
    align-self: center;
    flex-shrink: 0;
    transition: color .1s, transform .1s;
}

.clot-result-item.focused .clot-result-arrow {
    color: #4a6fa5;
    transform: translateX(3px);
}

mark.clot-hl {
    background: #fef08a;
    color: #1a2332;
    padding: 0 .1em;
    border-radius: 3px;
    font-weight: 600;
}

#clot-search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 1.2rem;
    background: #f7fafc;
    border-top: 1px solid #edf2f7;
    font-size: .72rem;
    color: #9aacbb;
    gap: 1rem;
}

.clot-search-shortcuts {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

.clot-search-shortcuts span {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.clot-search-shortcuts kbd {
    background: #e8edf3;
    border: 1px solid #d0d9e4;
    border-radius: 4px;
    padding: .1rem .35rem;
    font-size: .68rem;
    font-family: monospace;
    color: #5a6a7a;
}

#clot-result-count {
    font-size: .72rem;
    color: #9aacbb;
}

/* Pulse animation for search inputs when no results */
@keyframes inputPulse {

    0%,
    100% {
        border-color: transparent;
    }

    50% {
        border-color: #fc8181;
    }
}

.search-no-results #clot-search-main-input {
    animation: inputPulse .4s ease;
}