/* Faculty Floating Avatars Styles */
.faculty-avatars {
    position: relative;
    transition: all 0.3s ease-in-out;
}

.faculty-avatars.floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: scale(1.0);
    border: 2px solid rgba(0, 123, 255, 0.3);
    opacity: 0.85;
}

.faculty-avatars.floating .avatar-row {
    margin-bottom: 8px;
}

.faculty-avatars.floating .avatar-row:last-child {
    margin-bottom: 0;
}

.faculty-avatars.floating .faculty-avatar {
    width: 45px;
    height: 45px;
    margin: 0 3px;
    opacity: 0.9;
}

.faculty-avatars.floating .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faculty-avatars.floating .cohort-badge {
    width: 45px;
    height: 45px;
    font-size: 10px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

/* Floating indicator */
.faculty-avatars.floating::before {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Placeholder to maintain layout when avatars float */
.faculty-avatars-placeholder {
    width: 100%;
    visibility: hidden;
}

/* Smooth transitions for faculty profile card */
.faculty-profile-card {
    transition: margin-top 0.3s ease-in-out;
}

.faculty-profile-card.with-floating-avatars {
    margin-top: 20px;
}

/* Enhanced active state for floating avatars */
.faculty-avatars.floating .faculty-avatar.active {
    transform: scale(1.1);
    border: 3px solid #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Hover effects for floating avatars */
.faculty-avatars.floating .faculty-avatar:hover {
    transform: scale(1.05);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faculty-avatars.floating {
        right: 5px;
        top: 15px;
        transform: scale(0.8);
        padding: 12px;
        max-width: calc(100vw - 20px);
        transform-origin: top right;
        opacity: 0.8;
    }

    .faculty-avatars.floating .avatar-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 8px;
    }

    .faculty-avatars.floating .faculty-avatar {
        width: 45px;
        height: 45px;
        margin: 0 2px 3px 2px;
        opacity: 0.85;
    }

    .faculty-avatars.floating .cohort-badge {
        width: 45px;
        height: 45px;
        font-size: 8px;
        opacity: 0.85;
    }

    .faculty-avatars.floating::before {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .faculty-avatars.floating {
        right: 3px;
        top: 10px;
        transform: scale(0.55);
        padding: 6px;
        max-width: calc(100vw - 15px);
        border-radius: 15px;
    }

    .faculty-avatars.floating .faculty-avatar {
        width: 45px;
        height: 45px;
        margin: 0 0.5px 1px 0.5px;
    }

    .faculty-avatars.floating .cohort-badge {
        width: 45px;
        height: 45px;
        font-size: 5px;
    }

    .faculty-avatars.floating::before {
        width: 6px;
        height: 6px;
        top: -3px;
        right: -3px;
    }
}

@media (max-width: 360px) {
    .faculty-avatars.floating {
        right: 2px;
        top: 8px;
        transform: scale(0.5);
        padding: 5px;
        max-width: calc(100vw - 10px);
    }

    .faculty-avatars.floating .faculty-avatar {
        width: 22px;
        height: 22px;
        margin: 0 0.5px 1px 0.5px;
    }

    .faculty-avatars.floating .cohort-badge {
        width: 22px;
        height: 22px;
        font-size: 4px;
    }
}

/* Smooth entrance animation */
.faculty-avatars.floating {
    animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100px) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(0.8);
        opacity: 1;
    }
}

/* Smooth exit animation */
.faculty-avatars.floating-exit {
    animation: slideOutToRight 0.3s ease-in;
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0) scale(0.8);
        opacity: 1;
    }
    to {
        transform: translateX(100px) scale(0.8);
        opacity: 0;
    }
}
