.dropdown.followed-threads {
    z-index: 91;
    margin: 0;
    max-height: min(800px, calc(100vh - var(--navbar-height))) !important;
    display: grid;
    grid-template-rows: 1fr min-content;
    max-width: 500px;
    position: fixed;

    @media (max-width: 900px) {
        bottom: calc(env(safe-area-inset-bottom, 0) + var(--navbar-height)) !important;
    }

    @media (max-width: 500px) {
        width: 100%;
        max-height: initial !important;
        left: initial !important;
        right: initial !important;
        top: env(safe-area-inset-top, 0) !important;
    }

    .loading {
        justify-self: center;
    }

    section {
        padding: 16px 16px 0 16px;
        overflow: auto;
        scrollbar-width: thin;

        &:last-child {
            padding: 16px;
        }
    }

    footer {
        display: flex;
        gap: 4px;
        padding: 8px 16px 16px 16px;

        .right {
            margin-left: auto;
        }
    }

    section,
    footer {
        padding: 8px;
    }

    h3,
    h4 {
        margin: 0 0 4px 0;
    }

    .followed-thread {
        padding: 4px 0;
        margin: 0;
        user-select: none;
        display: flex;
        align-items: flex-start;

        a {
            flex-grow: 1;
        }

        .unfollow-button {
            padding: 4px;
        }

        .meta {
            display: block;
            font-size: 0.85em;
            color: var(--meta-info-color);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        &:not(:last-of-type) {
            border-bottom: 1px solid var(--h-ruler-color);
        }
    }
}

body[data-opened-dropdown*="followed-threads"] {
    overflow: hidden;
}