/* allegany-galactic-nucleus/source/_static/css/widgets/mastodon.css */

.mastodon-feed-container {
    display: none; /* Hidden by default on mobile and tablet */
    font-family: var(--font-family-body);
    width: 320px;
    flex-shrink: 0;
}

/* Show and "stick" the feed only on wider screens */
@media screen and (min-width: 1400px) {
    .mastodon-feed-container {
        display: block;
        position: sticky;
        /* Stick 2rem from the top of the viewport after scrolling past the nav */
        top: 2rem; 
        /* The container for the feed will be this tall */
        height: fit-content;
    }
}

.mastodon-feed-wrapper {
    background-color: var(--color-background-paper);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    padding: 1.5rem;
    box-sizing: border-box;
    /* Allow the contents to scroll if the feed is very long */
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    margin-top: 32px;
    margin-bottom: 32px;
}

.mastodon-feed-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-md);
    color: var(--color-primary-light);
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
    text-transform: var(--text-transform-uppercase);
    letter-spacing: var(--letter-spacing-wide);
}

.mastodon-feed-title a {
    color: inherit !important;
    border-bottom: none !important;
    transition: color 0.3s ease;
}

.mastodon-feed-title a:hover {
    color: var(--color-primary-main) !important;
}

.mastodon-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mastodon-post {
    background-color: var(--color-background-hover);
    border-radius: 4px;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.mastodon-post:hover {
    background-color: #333333; /* Slightly lighter hover */
}

.mastodon-post-link {
    display: block;
    padding: 1rem;
    color: var(--color-text-primary) !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.mastodon-post-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mastodon-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.mastodon-author-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.mastodon-author-name {
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.mastodon-author-handle {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.mastodon-post-content {
    font-size: 0.95rem; /* Slightly smaller for the feed */
    line-height: var(--line-height-normal);
    word-wrap: break-word;
    margin-right: 5px;
    margin-left: 5px;
}

.mastodon-post-content p { 
    margin: 0 0 0.5rem 0; 
}

.mastodon-post-content p:last-child { 
    margin-bottom: 0; 
}

.mastodon-post-content { 
    color: var(--color-text-secondary) !important; 
    text-decoration: none !important; 
}

.mastodon-post-media { 
    margin-top: 1rem; 
}

.mastodon-post-media img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
}

.mastodon-post-footer { 
    margin-top: 1rem; 
    text-align: right; 
}

.mastodon-post-timestamp { 
    font-size: var(--font-size-xs); 
    color: var(--color-text-secondary) !important; 
    border-bottom: none !important; 
}