/* Fixed Author Card with Details */
.fixed-author-card {
    position: fixed;
    top: 200px;
    right: -240px;
    z-index: 100;
    transition: right 0.3s ease, width 0.3s ease, height 0.3s ease;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 200px;
    overflow: hidden;
}

.fixed-author-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Global collapsed state */
.author-cards-collapsed .fixed-author-card {
    width: 48px;
    height: 48px;
    cursor: pointer;
    padding: 12px;
    justify-content: center;
    align-items: center;
    top: auto;
    bottom: 80px;
    right: 24px;
}

.author-cards-collapsed .fixed-author-card .author-avatar,
.author-cards-collapsed .fixed-author-card .author-details,
.author-cards-collapsed .author-separator {
    display: none;
}

.author-cards-collapsed .toggle-btn {
    position: static;
    opacity: 1;
    height: auto;
}

/* Hover effect for collapsed cards */
.author-cards-collapsed .fixed-author-card:hover {
    transform: translateX(-5px);
}


/* Show cards on wide screens */
@media (min-width: 1400px) {
    .fixed-author-card {
        right: 24px;
    }
}

/* Show on hover for medium screens */
@media (min-width: 1200px) and (max-width: 1399px) {
    .fixed-author-card:hover {
        right: 24px;
    }
}


.fixed-author-card .author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.author-details {
    text-align: center;
    transition: opacity 0.3s ease, height 0.3s ease;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

.author-title {
    font-size: 0.7rem;
    color: var(--text);
    opacity: 0.7;
    margin: 2px 0 8px 0;
}

.author-social {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.author-social a {
    color: var(--primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.author-social a:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* Toggle button */
.toggle-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    top: 8px;
    right: 8px;
}

.toggle-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Author separator */
.author-separator {
    width: 100%;
    height: 1px;
    background: var(--border);
    margin: 16px 0;
    opacity: 0.5;
}


/* Mobile: Show collapsed by default */
@media (max-width: 1199px) {
    .fixed-author-card {
        right: 24px; /* Always visible on mobile */
    }
}