/* Shared results UI */

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #374151;
    color: white;
    text-decoration: none;
    font-size: 24px;
    line-height: 1;
    font-weight: 400;
    transition: background 0.15s ease;
}

.btn-icon:hover {
    background: #4b5563;
}

.result-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.result-links li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.result-links li:last-child {
    border-bottom: none;
}

.file-link {
    display: inline;
    width: auto;
    color: #72afff;
    text-decoration: none;
    word-break: break-word;
    line-height: 1.35;
    font-size: 17px;
    font-weight: 700;
}

.file-link:hover {
    color: #a5ceff;
}

.small-text {
    font-size: 12px;
    margin-top: 0;
    color: #7688a6;
    letter-spacing: 0.01em;
}

.result-list-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    padding: 18px;
}

.results-page {
    height: calc(100vh - 120px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.results-page h1 {
    margin: 0 0 10px;
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
}

.results-page > .muted {
    margin: 0 0 20px;
    font-size: 15px;
    color: #8ea2c0;
}

.results-cards {
    flex: 1;
    overflow: hidden;
}

.scroll-shell {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #0b1220 0%, #0a1324 100%);
    display: flex;
    flex-direction: column;
}

.scroll-box {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px 16px 24px;
    background: transparent;
    min-height: 0;
    border-radius: 20px;
}

.scroll-content {
    max-height: calc(100vh - 340px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px;
    border-radius: 18px;
    background: #0b1220;
    min-height: 0;
}

.scroll-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.content-scroll-shell {
    border-radius: 18px;
    overflow: hidden;
    background: #0b1220;
    padding: 0;
    min-height: 0;
}

.results-inner-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 12px;
    background: #0b1220;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
    min-height: 64px;
}

.results-meta {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #94a3b8;
}

.tg-search {
    height: 44px;
    border-radius: 18px;
    background: #0b1220;
    border: 1px solid transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tg-search:hover {
    border-color: rgba(255,255,255,0.03);
    background: #0b1220;
}

.tg-search:focus-within {
    border-color: rgba(255,255,255,0.06);
    background: #0b1220;
    box-shadow: 0 0 0 3px rgba(15,23,42,0.22);
}

.tg-search-fixed,
.tg-search-expanded,
.tg-search-collapsed {
    width: 360px;
    max-width: 100%;
    border-radius: 18px;
}

.tg-search-collapsed .tg-search-input {
    display: block;
}

.search-btn-inside {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #7d8daa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    padding: 0;
    font-size: 17px;
    line-height: 1;
    border-radius: 0;
}

.search-btn-inside:hover {
    color: #aab8cf;
    background: transparent;
}

.search-btn-inside:active {
    transform: none;
}

.tg-search-input {
    border: none;
    outline: none;
    background: transparent;
    color: #f1f5f9;
    padding: 0 16px 0 2px;
    width: 100%;
    min-width: 0;
    height: 44px;
    font-size: 14px;
}

.tg-search-input::placeholder {
    color: #7486a4;
}

.floating-layer {
    position: fixed;
    z-index: 99999;
}

.floating-layer.hidden {
    display: none;
}

.file-menu-panel {
    min-width: 180px;
    background: #16243a;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.file-menu-item {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #e7eefc;
    font-size: 14px;
    text-decoration: none;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.file-menu-item:hover {
    background: rgba(255,255,255,0.06);
}

.file-menu-link {
    color: #e7eefc;
}

.file-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0;
}

.submenu-arrow {
    opacity: 0.75;
    font-size: 16px;
}

.file-folder-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.file-folder-tags:empty {
    display: none;
}

.file-folder-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(139,160,196,0.14);
    color: #8da2c6;
    font-size: 11px;
    line-height: 1;
    text-decoration: none;
    cursor: default;
}

.file-folder-tag[href],
.file-folder-tag[href]:link,
.file-folder-tag[href]:visited,
.file-folder-tag[href]:hover,
.file-folder-tag[href]:focus,
.file-folder-tag[href]:active {
    text-decoration: none !important;
    text-decoration-line: none !important;
}

.file-folder-tag:hover,
.file-folder-tag:focus,
.file-folder-tag:active,
.file-folder-tag:visited {
    text-decoration: none;
}

@media (max-width: 900px) {
    .results-page {
        height: auto;
        overflow: visible;
    }

    .results-cards {
        overflow: visible;
    }

    .scroll-box {
        max-height: 320px;
        padding: 12px 18px;
    }

    .scroll-content {
        max-height: 50vh;
    }

    .results-page h1 {
        font-size: 30px;
    }
}
